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.ididentifies the role to replace.role.nameholds 1 to 36 characters.role.descriptionholds 1 to 200 characters.role.structure_type_idsholds 1 to 100 structure type IDs.role.permissionsholds 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
permissionsclears every permission from the role. Omittingname,description, orstructure_type_idsreturns400 Bad Requestinstead. 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.