Roles

Updates an existing role's name, key, description, can-grant flags and parent. PUT is a full replace: every field of the role is overwritten from the request body, so clients must send the complete role representation — omitted fields are reset (booleans default to false, omitted roleKey/description are cleared, omitted parentRoleId reparents to root). A null parentRoleId turns the role into a root role. Reparenting under the role's own descendant is rejected. System and locked roles cannot be updated. Note: the role is updated in place — grants and permissions attached to the role are preserved.

put/api/v1/roles/{roleid}

Request

Path parameters

roleidstring required

Id of the role to update

Request body

roleNamestring required
roleKeystring
parentRoleIdstring
canEditUsersboolean
canEditPermissionsboolean
canEditLayoutsboolean
descriptionstring

Response

Role updated successfully

i18nMessagesMapobject
permissionsstring[]

Example response

{
  "entity": {
    "childCount": 3,
    "userCount": 12
  }
}

Changes