Important: This part of the GraphQL API is currently in Preview status. For more information, see GraphQL API policy.
You can use the deleteAccountMembership mutation to delete an existing account membership, removing a user from an account. This mutation is the equivalent of the REST Delete company membership API.
To identify the membership, you must include the unique identifiers of both the account and the user.
Before you can delete the membership, you must first remove all of the user's application assignments. You must either cancel all of their subscriptions, or transfer them to another account membership.
When all account memberships are removed from a user, the user is deleted.
When all account memberships are removed from an account, such that the account currently has no members, the account still exists. You can assign new users to it by creating new account memberships for it.
Mutation
mutation { deleteAccountMembership( input: { accountId: "0438bc88-bd79-40be-bc89-93d27b5773eb", userId: "a22d9a85-22a6-48c9-adc7-1c17d3a14542" } ) }
Response
{ "data": { "deleteAccountMembership": { "success": true } } }