About the Site Invites API

The Wix Site Invites API allows you to manage the invitation process for collaborators on a Wix site. Through this API, you can send email invitations to individuals, enabling them to join a site as collaborators with specific roles and permissions.
Learn more about Site Collaborators. Note that site collaborators are managed with the Contributors API.

Use cases

Site invite lifecycle

Site invites progress from creation to assignment through a series of phases, as follows:

  1. Invite created: When Bulk Invite is called, an email invitation is created and sent to each invitee.
  2. Invitee receives email: The invitee receives the invite email.
  3. Invitee responds to invite: The invitee can take one of the following actions:
    • Accept the invite by following the link in the email, provided the invite is still valid (i.e., it is not expired or previously been used).
    • Ignore the invite until it expires.
  4. Role assigned: When an invitee accepts, they are assigned the role specified in the invite.

Terminology

  • Collaborator: A Wix user with edit or manage access to a site owned by a separate Wix account. See Roles & Permissions: Overview and Roles & Permissions: Information for Site Collaborators. Also referred to as a contributor.
  • Policy: See Role below.
  • Role: A defined type of access that an identity should have on a specific site or account. Wix provides several predefined roles, such as co-owner, website manager, and website designer. Account owners and co-owners can also define their own custom roles.
Did this help?

Setup

To use the SiteInvites API, install the @wix/user-management package using npm or Yarn:

Copy
npm install @wix/user-management

or

Copy
yarn add @wix/user-management

Then import { siteInvites } from @wix/user-management:

Copy
import { siteInvites } from "@wix/user-management";
Did this help?

Sample Flows

This article shares some typical use cases you can support, as well as an example flow that supports each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your implementation.

Manage invitations sent to customers for the Wix site your company created for them

If your company creates Wix sites before handing them over to customers, you can invite the relevant customers to manage their sites once the site design and setup are complete.

  1. Select the relevant roles (referred to in Bulk Invite as policies) to apply to the invitees when they accept the invitation. See Roles and Permissions for a list of available roles.
  2. Call Bulk Invite with the relevant email addresses and roles to apply to their access. For example, co-owner or website manager. Each invitee is assigned an invite ID.
  3. If a customer misplaces the invitation email, you can call Resend Invite to trigger a new invite email to the specific invitee, passing the inviteId returned from the Bulk Invite call.
  4. If the customer's invitation to the site needs to be revoked for any reason before it is accepted, you can call Revoke Invite, passing the inviteId returned from the Bulk Invite call.
Did this help?