Update a role

Replaces an existing role's name, description, permissions and structure type scope. The role is fully replaced from the request body. name, description and structure_type_ids are required, and omitting permissions clears every permission from the role.

Use this endpoint to change a role's definition. The change applies immediately to every user who already holds the role.

This is a full replacement. Read the role with the Get a role endpoint first, change the values you want, then send the complete object back.

Requirements

Field limits

  • role.id identifies the role to replace.
  • role.name holds 1 to 36 characters.
  • role.description holds 1 to 200 characters.
  • role.structure_type_ids holds 1 to 100 structure type IDs.
  • role.permissions holds any combination of the values listed in the Roles overview. Optional.

is_default, user_count, created_at, and modified_at are read-only. The request ignores them.

πŸ“•

Omitting permissions clears every permission from the role. Omitting name, description, or structure_type_ids returns 400 Bad Request instead. Send the complete object on every call, even when you are only renaming the role.

πŸ“˜

The response body is empty. To confirm the new definition, call Get a role after the update.

Path Params
string
required

Unique identifier for the role

Body Params
role
object

The role to update

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json