> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/app-management/app-invites/introduction.md

## Article Content:

# About the App Invitations and Collaborators API

The App Invitations and Collaborators API lets authorized developers manage collaborator access to apps through email invitations and role assignments.

With the App Invitations and Collaborators API, you can:

- Invite a collaborator by email with selected roles for app access.
- Renew and resend an invitation, or cancel an unused invitation.
- Retrieve an app's collaborators and invitations.
- Remove an account's role assignments for an app.

Use the Apps API to create or retrieve the app, then specify its `id` as `appId` in this API. Invitation and collaborator operations manage access to that app; they don't create or configure the app itself.

## Invitations and assigned access

Creating an invitation sends an email but doesn't grant access immediately. The recipient must accept the invitation before the selected roles are assigned. Retrieve the app's collaborators and invitations to distinguish pending invitations from assigned access.

Deleting an invitation doesn't remove an existing collaborator. Removing role assignments doesn't delete the account or app, or cancel outstanding invitations. These are separate actions when removing access.

## Before you begin

It's important to note the following points before starting to code:

- Obtain the app ID from the Apps API. App access is distinct from the site access managed by the [Site Invites API](https://dev.wix.com/docs/api-reference/account-level/user-management/sites/site-invites.md).
- Creating and resending invitations require a signed-in user with account context. Role discovery through [Get Roles Info](https://dev.wix.com/docs/api-reference/account-level/user-management/accounts/users/get-roles-info.md) in the [Users API](https://dev.wix.com/docs/api-reference/account-level/user-management/accounts/users.md) has separate authentication requirements, including an account-level API key.
- Use role IDs applicable to app access in `invite.policyIds`, not assignment IDs or unrelated site roles. Get Roles Info returns `predefinedRoles` and `customRoles`; use a selected role's `id`, or the app-access role IDs supplied through your account's role configuration. This API doesn't define its own role catalog.
- Treat recipient email addresses and acceptance links as sensitive data.
- The app owner's account can't be removed with this API.

## Use cases

- [Invite a collaborator to an app](https://dev.wix.com/docs/api-reference/app-management/app-invites/sample-flows.md).
- [Resend an app invitation](https://dev.wix.com/docs/api-reference/app-management/app-invites/sample-flows.md).
- [Cancel an unused app invitation](https://dev.wix.com/docs/api-reference/app-management/app-invites/sample-flows.md).
- [Remove a collaborator's app access](https://dev.wix.com/docs/api-reference/app-management/app-invites/sample-flows.md).

## Terminology

- Invitation: An email invitation with a status, expiration, and acceptance link. Accepting it assigns the selected roles.
- Role: A set of permissions that determines what a collaborator can do with an app.
- Policy ID (role ID): A role's ID, specified in `policyIds` to select access to grant. It isn't an invitation ID or assignment ID.
- Collaborator: A user with access to the app, represented by an entry in the `contributors` array returned by Get App Contributors Proxy. The entry's `id` is a user ID, while `metaData.id` is the account ID required when removing role assignments. In SDK responses, these fields are `_id` and `metaData._id`.
- Assignment ID: Identifies a role assignment. Clear Assigned App Policies Proxy returns the IDs it removed.

