About the Account Invites API

The Wix Account Invites API enables you to invite individuals to join your Wix account as team members, so you can expand your team and delegate account responsibilities efficiently. With this API, you can send email invitations, granting new team members specific roles and access privileges within your account. Learn more about Managing your Team.

Use cases

Account invite lifecycle

The account invite lifecycle outlines the stages involved in sending, managing, and accepting invitations for individuals to become team members in a Wix account.

  1. Invite created: When Create 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

  • Account: A collection of Wix assets, including sites, managed by one or more Wix users.
  • Asset: Everything within an account, including sites, domains, custom templates, and payment and billing info. Sometimes referred to as resource.
  • Assignment: The pairing of a Wix user's access to an asset and their assigned role. For example, Sally has access to the XYZ site owned by Jennifer with a website manager role, and Alice has access to Selena’s Wix account with a co-owner role.
  • 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. See Roles and Permissions.
  • Team member: A Wix user that has been added to an account, with access to one or more sites and other assets. One Wix user can be a team member of multiple accounts.
Did this help?

Setup

To use the AccountInvites 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 { accountInvites } from @wix/user-management:

Copy
import { accountInvites } 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.

Invite company employees to join your company's Wix account

If your company has multiple employees, you can invite them to join your Wix account, whether or not they already have a Wix account.

Call Create Invite with the employees email addresses, the roles to assign (referred to here as policies), and any specific assets they should not have access to (referred to here as resources). If no assets are specified, the employee will be given access to all assets in the account.

When the employee accepts the invitation, their user ID is created (if relevant) and assigned as a team member of your account.

Did this help?