Update Role
Beta/v1/identity/roles/{id}Idempotent with Idempotency-Key header. Learn more
Updates a role's name or the set of permissions it grants.
Only roles owned by your account can be updated; the system-owned roles shared across all accounts are rejected. Permission changes apply to every user already assigned the role, starting with their next request.
idstringRole ID.
include[]optional arrayenumValues:ownerowner.accountpermissionsSub-objects to expand in the response. When omitted, sub-objects are returned as null.
nameoptional stringNew display name for the role.
Returns a conflict error if another role in your account already uses this name.
permissionsoptional array of stringFull replacement set of permissions, in {permission}:{action} format, such as customers:read.
The role's existing permissions are discarded and replaced with exactly what you send, so include every permission the role should keep. Sending an empty array strips the role of all access, while leaving the field out keeps the current permissions untouched.
idstringRole ID.
objectstringenumValues:roleResource type identifier.
namestringDisplay name of the role.
Unique within the account.
typestringenumValues:adminuserscannerThe kind of role.
The type gates behavior that individual permissions do not cover, and some actions are reserved for a single role type.
admin: full administrative access. Sensitive areas such as API keys, billing, and third-party integrations are restricted to admins no matter what permissions another role holds.user: a custom role tailored to a specific need, with its permissions defined explicitly. Roles created through the API always have this type.scanner: the role used by shop-floor scanning stations, assigned automatically when a scanning-station user is created.sales_rep: a role for sales representatives. Order analytics are scoped to the rep's own orders.agent: a role assigned to an automated agent rather than a person.
ownerownerExpandablenullableProvenance of this role.
System-owned roles are platform-provided defaults shared across all accounts and cannot be updated or deleted; account-owned roles are custom to your account.
objectstringenumValues:ownerResource type identifier.
typestringenumValues:systemaccountWhere this resource came from.
system: a platform-provided default shared across all accounts; not editable.account: created and owned by a specific account; theaccountfield identifies which.
accountaccountExpandablenullableThe account that owns this resource.
Present only when type is account; system-owned resources have no owning account.
idstringAccount ID.
objectstringenumValues:accountResource type identifier.
namestringThe account's display name.
The address billed by default on orders for this account.
null in this endpoint.The address shipped to by default on orders for this account.
null in this endpoint.brandingaccount_brandingnullableCustomer-facing branding for the account, such as the logo, support contacts, and social links.
null in this endpoint.portalaccount_portalnullableThe account's customer portal settings, including the portal URL slug.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
permissionsarray of stringExpandablenullablePermissions granted by this role, in {permission}:{action} format, such as customers:read.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
Responses
Successful response for Update Role