permissions
Create role
Create a new role to group related permissions for easier management. Roles enable consistent permission assignment across multiple API keys. Permission slugs supplied in permissions are attached during creation. Missing permissions are created automatically.
Important: Role names must be unique within the workspace. Once created, roles are immediately available for assignment.
Required Permissions
Your root key must always have:
- rbac.*.create_role
When permissions is not empty, it must also have:
- rbac.*.add_permission_to_role
When any requested permission slug does not exist, it must also have:
- rbac.*.create_permission
post/v2/permissions.createRole
Request body
Example request
{
"name": "support.readonly",
"description": "Provides read-only access for customer support representatives. Includes permissions to view user accounts, support tickets, and basic analytics. Does not include access to billing, admin functions, or data modification capabilities."
}Response
Role created successfully
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"roleId": "role_1234567890abcdef"
}
}