Roles
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 all available permissions in the system.
GET /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.
GET /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, "permissions": ["users:read", "users:write", "users:delete"], "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, "permissions": ["chat:read", "chat:write"], "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, and user_count is how many users hold
the role. There is no permission_count field.
Get Role
Section titled “Get Role”Get a single role with its permissions.
GET /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, "permissions": [ { "id": "uuid", "resource": "contacts", "action": "read", "description": "View contacts" }, { "id": "uuid", "resource": "contacts", "action": "write", "description": "Create and edit contacts" } ], "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.
POST /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, "permissions": [ { "id": "uuid", "resource": "contacts", "action": "read", "description": "View contacts" } ], "created_at": "2024-01-01T00:00:00Z" }}Update Role
Section titled “Update Role”Update an existing custom role.
PUT /api/roles/{id}Request Body
Section titled “Request Body”{ "name": "Senior Support Agent", "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 |
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, "permissions": [...], "updated_at": "2024-01-01T00:00:00Z" }}Delete Role
Section titled “Delete Role”Delete a custom role.
DELETE /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.chatbot:read,settings.chatbot:writesettings.sso:read,settings.sso:write
WhatsApp Accounts, Templates & Flows
Section titled “WhatsApp Accounts, Templates & Flows”accounts:read,accounts:write,accounts: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:delete
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:deletetransfers: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:write,organizations:delete,organizations:assign
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
See Also
Section titled “See Also”- Roles & Permissions - Learn about the permission system
- Users API - User management