Anchor to section titled 'undefined'

companyContactRevokeRoles
mutation

Requires write_customers access scope or write_companies access scope. Also: The API client must be installed on a Shopify Plus store.

Revokes roles on a company contact.


Anchor to companyContactId
companyContactId
required

The contact whose roles are being revoked.

Anchor to revokeAll
revokeAll
default:false

Flag to revoke all roles on the contact.

The current role assignment IDs to revoke.


Was this section helpful?

A list of role assignment IDs that were removed from the company contact.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation companyContactRevokeRoles($companyContactId: ID!) {
  companyContactRevokeRoles(companyContactId: $companyContactId) {
    revokedRoleAssignmentIds
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "companyContactId": "gid://shopify/<objectName>/10079785100",
  "revokeAll": true,
  "roleAssignmentIds": [
    "gid://shopify/<objectName>/10079785100"
  ]
}