Roles
Role and permission management API
Overview
Section titled “Overview”Manage roles and permissions within your organization. Roles are collections of permissions that can be assigned to users.
List Permissions
Section titled “List Permissions”Get the permission catalog for the active organization. It lists only permissions of components the workspace has (plus the governance permissions every workspace has); platform permissions are never listed. Each entry includes key, module and module_label (the section of the component the permission belongs to), available (always true; kept for older clients) and grantable (whether you hold it and can give it), in addition to its resource and action.
/api/permissionsResponse
Section titled “Response”{ "status": "success", "data": { "permissions": [ { "id": "uuid", "resource": "users", "action": "read", "description": "View users" }, { "id": "uuid", "resource": "users", "action": "write", "description": "Create and edit users" } ] }}List Roles
Section titled “List Roles”Get all roles in your organization.
/api/rolesQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
search |
string | Filter by role name |
Response
Section titled “Response”{ "status": "success", "data": { "roles": [ { "id": "uuid", "name": "admin", "description": "Full access to all features", "is_system": true, "is_default": false, "version": 4, "feature_version": 7, "permissions": ["users:read", "users:write", "users:delete"], "inactive_permission_count": 0, "user_count": 3, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }, { "id": "uuid", "name": "Custom Role", "description": "Custom role with specific permissions", "is_system": false, "is_default": false, "version": 2, "feature_version": 7, "permissions": ["chat:read", "chat:write"], "inactive_permission_count": 1, "user_count": 8, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ], "total": 4, "page": 1, "limit": 50 }}permissions is a flat array of resource:action strings on the workspace’s components, and user_count is how many users hold
the role in this organization. Responses include the current version, the workspace’s
feature_version, and inactive_permission_count: saved grants on components the workspace
doesn’t have, which aren’t listed and give no access. There is no permission_count field.
Get Role
Section titled “Get Role”Get a single role with its permissions.
/api/roles/{id}Response
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "name": "Custom Role", "description": "Custom role with specific permissions", "is_system": false, "is_default": false, "version": 1, "feature_version": 7, "permissions": ["contacts:read", "contacts:write"], "inactive_permission_count": 0, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }}Create Role
Section titled “Create Role”Create a new custom role.
/api/rolesRequest Body
Section titled “Request Body”{ "name": "Support Agent", "description": "Can view and respond to chats", "permissions": ["contacts:read", "chat:read", "chat:write"]}| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Unique role name |
description |
string | No | Role description |
permissions |
array | Yes | Array of permission keys (e.g., resource:action) |
is_default |
boolean | No | Set as default role for new users |
Response
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "name": "Support Agent", "description": "Can view and respond to chats", "is_system": false, "is_default": false, "version": 1, "feature_version": 7, "permissions": ["contacts:read", "chat:read", "chat:write"], "inactive_permission_count": 0, "created_at": "2024-01-01T00:00:00Z" }}Update Role
Section titled “Update Role”Update an existing custom role.
/api/roles/{id}Request Body
Section titled “Request Body”{ "name": "Senior Support Agent", "version": 1, "feature_version": 7, "description": "Can view, respond to chats, and access analytics", "permissions": ["contacts:read", "chat:read", "chat:write", "analytics:read"]}| Field | Type | Description |
|---|---|---|
name |
string | Role name |
description |
string | Role description |
permissions |
array | Array of permission keys |
is_default |
boolean | Set as default role for new users |
version |
integer | Required current version from the role response; stale edits return 409 |
feature_version |
integer | feature_version from the role response. Required when sending any permissions value (including []) or remove_inactive_permissions: true; 400 without it. Optional for metadata-only saves. A save that sends a stale feature_version (the workspace’s components changed since) returns 409 |
remove_inactive_permissions |
boolean | Removes the role’s saved grants on components the workspace doesn’t have. You must hold each one; platform grants are never removed |
Response
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "name": "Senior Support Agent", "description": "Can view, respond to chats, and access analytics", "is_system": false, "is_default": false, "version": 2, "feature_version": 7, "permissions": [...], "inactive_permission_count": 0, "updated_at": "2024-01-01T00:00:00Z" }}Omitting permissions preserves the current grants. permissions is the role’s grants on the
workspace’s components: sending an empty array clears those. Grants on components the workspace
doesn’t have (and platform grants) aren’t listed and are kept as saved; they give no access until
the component is added, unless you send remove_inactive_permissions: true. Unknown keys are rejected, and new grants on components the workspace
doesn’t have return 403. Editors can only grant or remove permissions they hold among the
listed ones; a saved grant on a missing component doesn’t stop them editing the rest.
Metadata and grants save atomically. A tenant administrator cannot edit their own role,
and changes cannot remove an organization’s last active administrator.
Delete Role
Section titled “Delete Role”Delete a custom role.
/api/roles/{id}Response
Section titled “Response”{ "status": "success", "data": { "message": "Role deleted successfully" }}Permission Keys
Section titled “Permission Keys”Permissions use the format resource:action. The only valid actions are:
read, write, delete, sync, execute, import, export, pickup, and assign.
The full catalog below matches the permissions seeded on every organization.
Users, Roles & Teams
Section titled “Users, Roles & Teams”users:read,users:write,users:deleteroles:read,roles:write,roles:deleteteams:read,teams:write,teams:delete
Settings
Section titled “Settings”settings.general:read,settings.general:writesettings.calling:read,settings.calling:writesettings.chatbot:read,settings.chatbot:writechatbot.routing:read,chatbot.routing:writechatbot.hours:read,chatbot.hours:writechatbot.sla:read,chatbot.sla:write
WhatsApp Accounts, Templates & Flows
Section titled “WhatsApp Accounts, Templates & Flows”accounts:read,accounts:write,accounts:deletecatalogs:read,catalogs:write,catalogs:deletetemplates:read,templates:write,templates:delete,templates:syncflows.whatsapp:read,flows.whatsapp:write,flows.whatsapp:deleteflows.chatbot:read,flows.chatbot:write,flows.chatbot:delete
Chatbot
Section titled “Chatbot”chatbot.keywords:read,chatbot.keywords:write,chatbot.keywords:deletechatbot.ai:read,chatbot.ai:write,chatbot.ai:deletechatbot.memory:read,chatbot.memory:write
Chat & Contacts
Section titled “Chat & Contacts”chat:read,chat:write,chat.assign:writecontacts:read,contacts:write,contacts:delete,contacts:import,contacts:exporttags:read,tags:write,tags:delete,tags:import,tags:exporttransfers:read,transfers:write,transfers:pickupcanned_responses:read,canned_responses:write,canned_responses:delete
Campaigns
Section titled “Campaigns”campaigns:read,campaigns:write,campaigns:delete,campaigns:execute
Analytics & Audit
Section titled “Analytics & Audit”analytics:read,analytics:write,analytics:delete,analytics.agents:readaudit_logs:read
Integrations
Section titled “Integrations”webhooks:read,webhooks:write,webhooks:deleteapi_keys:read,api_keys:write,api_keys:deletecustom_actions:read,custom_actions:write,custom_actions:delete
Organizations
Section titled “Organizations”organizations:read,organizations:assign(tenant member visibility and assignment)
Calling
Section titled “Calling”call_logs:readivr_flows:read,ivr_flows:write,ivr_flows:deletecall_transfers:read,call_transfers:writeoutgoing_calls:read,outgoing_calls:write
Platform SSO, organization creation, WhatsApp app and webhook-inbox administration require a platform super administrator. Legacy settings.sso and organization write/delete grants are reserved and cannot be delegated through tenant roles.
See Also
Section titled “See Also”- Roles & Permissions - Learn about the permission system
- Users API - User management