Skip to main content

Update company/account memberships

The APIs in this topic allow you to update company and account memberships. You can use these APIs to enable or disable memberships and change membership roles.

Update a company membership (REST)

Use the following PUT request to update a company.

PUT https://{marketplace_host}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}

Refer to the Update company membership API reference for details on authorization rules and the full list of supported request body and query parameters.

Update an account membership (GraphQL)

The GraphQL schema includes several APIs you can use to make updates to account memberships:

  • enableAccountMembership — activates an existing account membership. This mutation requires the account ID and user ID as inputs, and returns AccountMembership in the response.
  • disableAccountMembership — deactivates an existing account membership.This mutation requires the account ID and user ID as inputs and returns AccountMembership in the response.
  • updateRolesForAccountMembership — adds or removes roles to a specified user with membership in a given account. In addition to the account ID and user ID, this mutation requires the complete list of roles the user must have within the account. It adds new roles and/or removes existing ones to match the input and returns the updated account membership.
  • updateRolesForAccountMemberships — adds or removes roles for multiple users within a given account. This mutation also takes an account ID, user ID, and list of roles as input. However, it can accept multiple user IDs and associated role lists, so you can use it to update several memberships within the same account simultaneously. The mutation returns a single boolean to indicate whether all the updates succeeded; if there was a failure, the payload includes error messages to indicate the problems that prevented the operation.

These mutations are equivalent to the REST APIs Enable/Disable company membership, Update company membership, and Update company membership roles (bulk).

Was this page helpful?