Skip to content

Roles & Permissions

Whatomate provides a flexible role-based access control (RBAC) system that allows you to define custom roles with granular permissions.

The permission system is built around:

  • Permissions: Fine-grained access controls for specific actions on resources (e.g., users:write, contacts:read)
  • Roles: Collections of permissions that can be assigned to users
  • System Roles: Pre-defined roles (Admin, Manager, Agent) that cannot be deleted

Three system roles are created automatically for each organization:

RolePermissions granted
AdminEvery permission in the catalogue below.
ManagerEverything except: users, roles, SSO settings, API keys, audit logs, organization write/delete/assign (organizations:read only), and teams write/delete (teams:read only).
Agentaccounts:read, chat:read, chat:write, contacts:read, tags:read, analytics.agents:read, transfers:read/write/pickup, canned_responses:read, call_transfers:read/write, outgoing_calls:read/write. Note agents deliberately have no call_logs:read — they see only their own calls.

Create custom roles to match your organization's needs. For example:

  • Support Lead: Can manage contacts and view analytics, but not manage users
  • Campaign Manager: Can create/manage campaigns and templates only
  • Read-Only Auditor: Can view all data but not make changes
  1. Go to Settings → Roles
  2. Click Add Role
  3. Enter a name and description
  4. Select permissions from the permission matrix
  5. Click Create

Permissions follow the format resource:action. Available actions are:

ActionDescription
readView the resource
writeCreate or modify items (there is no separate create/update — both are write)
deleteRemove items
syncSync from an external source (templates)
executeRun the resource (campaigns)
importBulk-import records (contacts)
exportBulk-export records (contacts)
pickupClaim a queued item (transfers)
assignManage organization members (organizations:assign)

This is the complete seeded catalogue — exactly the permissions returned by GET /api/permissions.

ResourceActionsDescription
usersread, write, deleteUser management
teamsread, write, deleteTeam management
rolesread, write, deleteRole management
settings.generalread, writeGeneral organization settings
settings.chatbotread, writeChatbot settings
settings.ssoread, writeSingle sign-on configuration
accountsread, write, deleteWhatsApp account settings
templatesread, write, delete, syncMessage template management; sync pulls templates from Meta
flows.whatsappread, write, deleteWhatsApp Flows (interactive forms)
flows.chatbotread, write, deleteChatbot flow management
campaignsread, write, delete, executeCampaign management; execute starts/retries a send
chatbot.keywordsread, write, deleteChatbot keyword auto-reply rules
chatbot.airead, write, deleteChatbot AI contexts
chatread, writeView conversations (read) and send messages (write)
chat.assignwriteAssign conversations to agents
contactsread, write, delete, import, exportContact management and bulk import/export
tagsread, write, deleteContact tag management
analyticsread, write, deleteView the analytics dashboard (read); write/delete govern dashboard widgets
analytics.agentsreadAgent performance analytics
transfersread, write, pickupChatbot-to-agent transfer queue
webhooksread, write, deleteOutbound webhook configuration
api_keysread, write, deleteAPI key management
canned_responsesread, write, deleteSaved reply templates
custom_actionsread, write, deleteCustom action buttons
organizationsread, write, delete, assignOrganizations; assign manages members
call_logsreadVoice call history
ivr_flowsread, write, deleteIVR call flow definitions
call_transfersread, writeVoice call transfers
outgoing_callsread, writeOutbound calling
audit_logsreadAudit trail (read-only)

When creating or editing a role, you'll see a permission matrix organized by resource:

Users
☑ Read users (users:read)
☑ Write users (users:write — create or edit)
☐ Delete users (users:delete)
Contacts
☑ Read contacts (contacts:read)
☑ Write contacts (contacts:write)
☐ Delete contacts (contacts:delete)
☐ Import contacts (contacts:import)
☐ Export contacts (contacts:export)
  1. Go to Settings → Users
  2. Click on a user or create a new one
  3. Select a role from the dropdown
  4. Save changes

Users can belong to multiple organizations, each with a different role. The organization switcher appears in the sidebar for users who are members of more than one organization.

When switching organizations:

  1. New JWT tokens are issued scoped to the target organization via POST /api/auth/switch-org
  2. The user's role and permissions are loaded from their membership in the target organization
  3. All data views refresh to show the selected organization's data
  4. The selected organization persists across page navigation

Users added to an organization from another org appear with a Member badge in the user list. Members have limited management:

  • Role updates — only the org-specific role can be changed
  • Removal — removes the user from the organization without deleting their account
  • Other fields (email, password, name, active status) are managed in the user's home organization

Super admins have additional privileges:

  • Access to all organizations, even without explicit membership
  • Can switch to any organization using the X-Organization-ID header
  • Can create new organizations

The frontend dynamically adapts based on user permissions:

Each route declares the resource it needs in its meta.permission, and the router hides the menu item and blocks navigation when the user lacks <resource>:read:

AreaResource
Dashboard / Analyticsanalytics
Agent Analyticsanalytics.agents
Chatchat
Contactscontacts
Tagstags
Templatestemplates
WhatsApp Flowsflows.whatsapp
Campaignscampaigns
Chatbot settings & buildersettings.chatbot
Keyword ruleschatbot.keywords
Chatbot flowsflows.chatbot
AI contextschatbot.ai
Transfer queuetransfers
General settingssettings.general
Accountsaccounts
Canned Responsescanned_responses
Usersusers
Rolesroles
Teamsteams
API Keysapi_keys
Webhookswebhooks
SSOsettings.sso
Custom Actionscustom_actions
Audit Logsaudit_logs
Call Logscall_logs
IVR Flowsivr_flows
Call Transferscall_transfers

If a user tries to access a page they don't have permission for, they are redirected to the first accessible page.

Create, edit, and delete buttons are shown only if the user has the corresponding permission. For example, the "Add User" button only appears if the user has users:write permission.

All API endpoints check permissions before processing requests:

Terminal window
# Returns 403 if user lacks users:read permission
GET /api/users
# Returns 403 if user lacks campaigns:write permission
POST /api/campaigns

A missing permission returns 403 with a generic message — the specific resource:action is not disclosed. An unauthenticated request returns 401 Unauthorized instead.

{
"status": "error",
"message": "Insufficient permissions",
"data": null
}
  1. Principle of Least Privilege: Assign only the permissions users need
  2. Use Custom Roles: Create roles that match job functions rather than assigning system roles
  3. Regular Audits: Periodically review role assignments and permissions
  4. Document Roles: Use meaningful names and descriptions for custom roles