Endpoint
Request Body
string
required
The name of the role to create or update. Cannot be empty or whitespace only.
string[]
Array of permission strings to assign to the role. Each permission must be a non-empty string. If not provided, the role will have no permissions.
Request Example
Response
string
Always returns
"OK"boolean
trueif a new role was createdfalseif an existing role’s permissions were updated
Response Example
Implementation Details
Source: View source- Role names are trimmed of leading/trailing whitespace before processing
- Permission strings are also trimmed and validated to be non-empty
- This API requires public tenant access
- If the role already exists, its permissions will be replaced with the new set
Error Responses
BadRequestException
Returned when:
rolefield is empty or whitespace only- Any permission in the
permissionsarray is empty or whitespace only
Next Steps
Assign Role to User
Learn how to assign this role to users