Roles and permissions
Your tenant decides what each of its users may do. It does this with two things.
- A permission names one right, for example the right to read contacts.
- A role is a named set of permissions. Every tenant has the same five fixed roles, and your tenant builds its own roles next to them.
A user holds roles by name. The user gets every permission that those roles give. An API key acts with the roles of the user who owns it. So an integration that needs narrow access is a user with a fitting role, and that user’s key.
A permission decides which actions a caller may perform. Scope decides which objects the caller may reach. Identity and access explains scope.
How a permission is named
Section titled “How a permission is named”A permission has the form <resource>:<action> or <resource>:<sub_resource>:<action>.
The action is read, write or manage. On one resource, manage includes write, and
write includes read. A user who holds agent:write can do everything that agent:read
allows. So a role needs one permission for each resource.
The inclusion works inside one resource only. agent and agent:automation are two resources,
so agent:manage gives no permission on automations.
One permission includes a permission of another resource: account:manage includes
account:capacity:manage.
How a role is built
Section titled “How a role is built”A role belongs to your tenant. Its name is unique among the roles of your tenant, and letter
case makes no difference: Support and support are the same name. A role carries two lists:
- the permissions the role names itself;
- the other roles of your tenant that it inherits. The role gives every permission that those
roles give. No role can inherit
tenant_adminortenant_dpu.
Every role has a level, account or tenant. You choose the level when you create the role,
and it stays as created.
| Level | Permissions the role can name | Roles it can inherit | Users who can hold it |
|---|---|---|---|
account | account permissions | account roles | account-level and tenant-level users |
tenant | every permission on this page | roles of either level, except tenant_admin and tenant_dpu | tenant-level users |
The nine permissions under Tenant administration are tenant
permissions. Every other permission on this page is an account permission.
An example: one role inside another
Section titled “An example: one role inside another”Your finance team needs to see the calls and the call figures. The team lead also needs to see the contacts.
- Create the role
financewith the permissionscommunication:readandanalytics:read. - Create the role
finance_leadwith the permissioncontact:read, and make it inheritfinance.
A user who holds finance_lead gets all three permissions. When you add a permission to
finance later, every holder of finance_lead gets it too. Both roles are account roles, so
account-level users and tenant-level users can hold them.
An example: edit users without signing in as them
Section titled “An example: edit users without signing in as them”A support person corrects the details of the users of an account. That person must not be able to act as one of those users.
Create the account role user_support. Give it the permission account:user:manage and make
it inherit the fixed role writer. Its holder covers every user who holds reader or writer, so its holder
can edit those users. The role leaves out account:sign_in:manage, so its holder cannot set a
user’s password and cannot request a sign-in link or a password reset. It also leaves out
account:api_key:manage, so its holder cannot issue a key that acts as a user.
The holder of user_support cannot edit a user who holds account_admin. That role gives
permissions that user_support does not give, and Voicebot refuses the edit:
see Nobody gives more than they hold.
The tenant level has the same three permissions: tenant:user:manage, tenant:sign_in:manage
and tenant:api_key:manage. A tenant-level user holds no password and signs in through a
sign-in link.
Where you manage roles
Section titled “Where you manage roles”Role writes are on the Tenant API, so a tenant-level user performs them.
GET/v1/t/permissionGET/v1/t/role
POST/v1/t/role
GET/v1/t/role/{sid}
PATCH/v1/t/role/{sid}
DELETE/v1/t/role/{sid}
An account administrator needs the list of roles to give one to a user. The Account API has that list:
GET/v1/a/roleYou give roles to a user by name when you create or update the user: POST/v1/a/user, PATCH/v1/a/user/{sid}, POST/v1/t/user, PATCH/v1/t/user/{sid}.
A role operation names a role by its id, and this holds for the fixed roles too. The list of
roles that a role inherits also holds id values.
When you rename a role, every user who holds it keeps it under the new name. Voicebot refuses to delete a role while a user holds it or another role inherits it, and the refusal names those users and roles.
The fixed roles
Section titled “The fixed roles”Every tenant has the same five fixed roles. Voicebot defines them, and it refuses a request
that edits or deletes one. Three of them are account roles:
| Role | What it gives |
|---|---|
reader | read on the nine resources of the product: agent, agent:automation, scenario, communication, number, number:pool, contact, segment and integration:sms. Also analytics:read, tts:voice:read, tts:synthesize:manage, llm:model:read, llm:chat:manage, llm:document:manage, ids:model:read, ids:classifier:write, ids:entity:write, edge:function:write, stt:dictionary:read and stt:recognition:write. |
writer | Everything reader gives, because it inherits reader. Also manage on the same nine resources, ids:classifier:manage, edge:function:manage and stt:dictionary:manage. |
account_admin | Everything writer gives, because it inherits writer. Also account:user:manage, account:api_key:manage, account:sign_in:manage, account:profile:write and account:role:read. |
The other two are tenant roles. You can give them to a tenant-level user.
tenant_admin gives every permission on this page.
tenant_dpu gives every account permission, so it gives everything account_admin gives. It
also gives account:read and account:capacity:manage. Its holder works inside every account
of the tenant, sees the accounts and changes their lines.
tenant_dpu gives no other tenant permission. Its holder cannot create, edit or delete an
account. Its holder also cannot manage tenant-level users, their API keys, their sign-in links
or the roles of the tenant.
Your tenant can restrict some writes through its managed_resources. Voicebot refuses such a
write to a holder of tenant_dpu, and only a holder of tenant_admin makes it. A change of
lines is the exception: a holder of tenant_dpu makes it on an account that carries an
external_id too.
GET/v1/t/role returns the fixed roles and your own roles. The field fixed tells them
apart.
Your own variant of a fixed role
Section titled “Your own variant of a fixed role”A fixed role stays as it is, so you build a variant as a role of your own. There are two ways.
- To give more than a fixed role gives, create a role that inherits
reader,writeroraccount_admin, and name the extra permissions in it. The new role gives everything the fixed role gives and the permissions you added. The support role above is built this way. - To give less than a fixed role gives, create a role that inherits nothing, and name each permission yourself.
Nobody gives more than they hold
Section titled “Nobody gives more than they hold”A caller covers a role when the caller holds every permission that the role gives, its inherited roles included. Three rules follow from this.
- A caller gives a role to a user only when the caller covers that role.
- A caller creates, edits or deletes a role only when the caller covers it. For an edit, this holds for the role before the edit and for the role after it.
- A caller writes to a user only when the caller covers every role that user holds. A write is an edit, a delete, a sign-in link, a password reset, and an API key issued or revoked.
The third rule does not apply to reading a user or to listing a user’s keys.
Permissions
Section titled “Permissions”Each table lists the permissions of one product area. write includes read, and manage
includes write, so a row says only what the permission adds.
A row also lists what needs exactly that permission: operations, request fields and values of
the include parameter. Open Needed by in the row to see them. The page of an operation
names the permission the operation needs.
Agents and automations
Section titled “Agents and automations”| Permission | What it lets a person do |
|---|---|
agent:read | See agents and limit policies.Needed by 4 operations and 10 |
agent:write | Create and edit agents and limit policies, and archive an agent. |
agent:manage | Delete agents and limit policies.Needed by 2 operations |
agent:automation:read | See automations, their attempts and their progress.Needed by 6 operations and 10 |
agent:automation:write | Create and edit automations, start, stop and archive them, put contacts back on the list, and add, edit and remove attempts.Needed by 10 operations
|
agent:automation:manage | Delete automations.Needed by 1 operation |
agent:routing:read | See routings, and the fields and operators a routing condition can use. |
agent:routing:write | Create and edit routings, and change their order.Needed by 2 operations |
agent:routing:manage | Delete routings.Needed by 1 operation |
Scenarios
Section titled “Scenarios”| Permission | What it lets a person do |
|---|---|
scenario:read | See scenarios and their versions, and get the audio files that scenarios play.Needed by 7 operations and 4 |
scenario:write | Create, edit and copy scenarios, upload audio files, and run a test of a webhook brick. |
scenario:manage | Delete scenarios and draft records.Needed by 2 operations |
scenario:template:read | See the scenario templates of the tenant, copy one into the account, and, on the tenant level, get the audio files and other resources of a template.Needed by 9 operations
|
| Permission | What it lets a person do |
|---|---|
communication:read | See communications, their call history, their recordings and their result deliveries.Needed by 8 operations and 4 |
communication:write | Create a communication, edit a result delivery and send it again. |
communication:manage | Delete communications.Needed by 1 operation |
analytics:read | See the counts of the account's calls and the account's lines in use.Needed by 3 operations |
Numbers
Section titled “Numbers”| Permission | What it lets a person do |
|---|---|
number:read | See numbers.Needed by 3 operations and 4 |
number:write | Create and edit numbers.Needed by 2 operations |
number:manage | Delete numbers.Needed by 2 operations |
number:pool:read | See number pools.Needed by 3 operations and 4 |
number:pool:write | Create and edit number pools.Needed by 2 operations |
number:pool:manage | Delete number pools.Needed by 2 operations |
Contacts and segments
Section titled “Contacts and segments”Contacts and segments are lists of identified people. A role that names no contact permission
and no segment permission cannot call the contact operations and the segment operations.
| Permission | What it lets a person do |
|---|---|
integration:sms:read | See SMS providers.Needed by 2 operations and 2 |
integration:sms:write | Create and edit SMS providers, and send a message. |
integration:sms:manage | Delete SMS providers.Needed by 1 operation |
Speech synthesis
Section titled “Speech synthesis”| Permission | What it lets a person do |
|---|---|
tts:voice:read | List the languages and the voices, and resolve the voice for a request. |
tts:synthesize:manage | Synthesise speech, and prepare and drop the cached audio of a request. |
Speech recognition
Section titled “Speech recognition”| Permission | What it lets a person do |
|---|---|
stt:recognition:write | Run speech recognition over audio, and list the languages, models and tuning options it offers. |
stt:dictionary:read | See the account's recognition dictionaries and the presets.Needed by 2 operations |
stt:dictionary:write | Create and edit the account's recognition dictionaries.Needed by 2 operations |
stt:dictionary:manage | Delete the account's recognition dictionaries.Needed by 1 operation |
Language models
Section titled “Language models”| Permission | What it lets a person do |
|---|---|
llm:model:read | List the available models.Needed by 1 operation |
llm:chat:manage | Run chat completions and chat streams, and create text embeddings. |
llm:document:manage | List, search, download, upload and delete the documents the account uses for retrieval. |
Classifiers and entities
Section titled “Classifiers and entities”| Permission | What it lets a person do |
|---|---|
ids:model:read | List the base models a classifier can be built on.Needed by 1 operation |
ids:classifier:write | Classify a phrase with one version of a classifier.Needed by 1 operation |
ids:classifier:manage | List, create, change and delete classifiers, and read one version of a classifier. |
ids:entity:write | Extract entities from a phrase, and list the entity types.Needed by 2 operations |
Edge functions
Section titled “Edge functions”An edge function is the JavaScript that the JavaScript brick of a scenario runs.
| Permission | What it lets a person do |
|---|---|
edge:function:read | List the account's edge functions and the versions of a function, and read one version with its code. |
edge:function:write | Run one version of an edge function. |
edge:function:manage | Create, warm up and delete versions of an edge function. |
Account administration
Section titled “Account administration”| Permission | What it lets a person do |
|---|---|
account:user:manage | See, create, edit and delete the users of an account. It also lets a person change their own email address on their profile.Needed by 7 operations and 1 request field |
account:sign_in:manage | Request a sign-in link or a password reset for a user of the account, and set a user's password when creating or editing the user.Needed by 2 operations and 2 request fields
|
account:api_key:manage | See, issue and revoke the API keys of the account's users. |
account:profile:write | Edit the details of the account through the caller's own profile.Needed by 1 request field
|
account:role:read | List the roles an account-level user can hold.Needed by 1 operation |
Tenant administration
Section titled “Tenant administration”These nine are tenant permissions. Only a tenant role can name them, so you can give them
to tenant-level users only.
See what a caller may do
Section titled “See what a caller may do”The caller’s profile lists every permission the caller holds:
GET/v1/a/profileThe list already has the included actions in it: a caller whose role names agent:manage also
sees agent:write and agent:read. An operation that needs a permission admits the caller
only when that permission is in the list.
Read this list in your integration. Role names do not tell you what a caller may do, because your tenant can change what its own roles contain.
GET/v1/t/permission returns the permissions on this page with the level of each one.
When Voicebot refuses
Section titled “When Voicebot refuses”The error catalogue of the Account API and of the Tenant API defines each code below. An operation page lists the codes that the operation can answer.
| Code | When |
|---|---|
permission_denied | The caller’s roles do not give the permission the operation needs. |
access_denied | The caller does not cover a role or a user that the request writes to: see Nobody gives more than they hold. |
invalid_role | The request names a role that does not exist, or names a tenant role for an account-level user. |
role_in_use | The request deletes a role that a user holds or another role inherits. |
role_fixed | The request edits or deletes a fixed role. |
conflict | The request creates or renames a role, and another role of your tenant holds that name. |