Skip to main content

Endpoint

This is an app-specific API that creates a new role or updates the permissions for an existing role.

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
  • true if a new role was created
  • false if 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:
  • role field is empty or whitespace only
  • Any permission in the permissions array is empty or whitespace only

Next Steps

Assign Role to User

Learn how to assign this role to users