Create account memberships

Important: This part of the GraphQL API is currently in Preview status. For more information, see GraphQL API policy.

The first membership of a given account is created at the time that the account itself is created. You can associate more users with an account by creating new account memberships.

There are two mutations that can be used to create a new account membership. These mutations are equivalent to the REST Create company membership and Create company membership (Add User) commands:

When you create an account membership, you identify the user by email address. If no user with that email address exists on the marketplace, a new user is created.

Both of these mutations return the new AccountMembership object as the payload. An account membership does not have an identifier of its own. Mutations and queries that use or refer to an account membership must identify it by using the unique identifiers for both the account and the user.

The user in a new account membership is assigned the USER role by default if no other role is specified. You can modify roles after the user has been created by changing the role, or adding more roles (see Update account memberships).