Skip to content

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.

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.

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_admin or tenant_dpu.

Every role has a level, account or tenant. You choose the level when you create the role, and it stays as created.

LevelPermissions the role can nameRoles it can inheritUsers who can hold it
accountaccount permissionsaccount rolesaccount-level and tenant-level users
tenantevery permission on this pageroles of either level, except tenant_admin and tenant_dputenant-level users

The nine permissions under Tenant administration are tenant permissions. Every other permission on this page is an account permission.

Your finance team needs to see the calls and the call figures. The team lead also needs to see the contacts.

  1. Create the role finance with the permissions communication:read and analytics:read.
  2. Create the role finance_lead with the permission contact:read, and make it inherit finance.

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.

Role writes are on the Tenant API, so a tenant-level user performs them.

GET/v1/t/permission
GET/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/role

You 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.

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:

RoleWhat it gives
readerread 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.
writerEverything reader gives, because it inherits reader. Also manage on the same nine resources, ids:classifier:manage, edge:function:manage and stt:dictionary:manage.
account_adminEverything 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.

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, writer or account_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.

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.

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.

PermissionWhat it lets a person do
agent:readSee agents and limit policies.
Needed by 4 operations and 10 include values
agent:writeCreate and edit agents and limit policies, and archive an agent.
Needed by 5 operations
agent:manageDelete agents and limit policies.
Needed by 2 operations
agent:automation:readSee automations, their attempts and their progress.
Needed by 6 operations and 10 include values
agent:automation:writeCreate 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:manageDelete automations.
Needed by 1 operation
agent:routing:readSee routings, and the fields and operators a routing condition can use.
Needed by 3 operations
agent:routing:writeCreate and edit routings, and change their order.
Needed by 2 operations
agent:routing:manageDelete routings.
Needed by 1 operation
PermissionWhat it lets a person do
scenario:readSee scenarios and their versions, and get the audio files that scenarios play.
Needed by 7 operations and 4 include values
scenario:writeCreate, edit and copy scenarios, upload audio files, and run a test of a webhook brick.
Needed by 8 operations
scenario:manageDelete scenarios and draft records.
Needed by 2 operations
scenario:template:readSee 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
PermissionWhat it lets a person do
communication:readSee communications, their call history, their recordings and their result deliveries.
Needed by 8 operations and 4 include values
communication:writeCreate a communication, edit a result delivery and send it again.
Needed by 3 operations
communication:manageDelete communications.
Needed by 1 operation
analytics:readSee the counts of the account's calls and the account's lines in use.
Needed by 3 operations
PermissionWhat it lets a person do
number:readSee numbers.
Needed by 3 operations and 4 include values
number:writeCreate and edit numbers.
Needed by 2 operations
number:manageDelete numbers.
Needed by 2 operations
number:pool:readSee number pools.
Needed by 3 operations and 4 include values
number:pool:writeCreate and edit number pools.
Needed by 2 operations
number:pool:manageDelete number pools.
Needed by 2 operations

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.

PermissionWhat it lets a person do
contact:readSee contacts and export them.
Needed by 5 operations and 2 include values
contact:writeCreate and edit contacts.
Needed by 3 operations
contact:manageDelete contacts.
Needed by 1 operation
segment:readSee segments, their sources and the rows of a source.
Needed by 8 operations and 10 include values
segment:writeCreate and edit segments, and make every change to a source of a segment, the delete of a source included.
Needed by 14 operations
segment:manageDelete segments.
Needed by 1 operation
PermissionWhat it lets a person do
integration:sms:readSee SMS providers.
Needed by 2 operations and 2 include values
integration:sms:writeCreate and edit SMS providers, and send a message.
Needed by 3 operations
integration:sms:manageDelete SMS providers.
Needed by 1 operation
PermissionWhat it lets a person do
tts:voice:readList the languages and the voices, and resolve the voice for a request.
Needed by 4 operations
tts:synthesize:manageSynthesise speech, and prepare and drop the cached audio of a request.
Needed by 5 operations
PermissionWhat it lets a person do
stt:recognition:writeRun speech recognition over audio, and list the languages, models and tuning options it offers.
Needed by 7 operations
stt:dictionary:readSee the account's recognition dictionaries and the presets.
Needed by 2 operations
stt:dictionary:writeCreate and edit the account's recognition dictionaries.
Needed by 2 operations
stt:dictionary:manageDelete the account's recognition dictionaries.
Needed by 1 operation
PermissionWhat it lets a person do
llm:model:readList the available models.
Needed by 1 operation
llm:chat:manageRun chat completions and chat streams, and create text embeddings.
Needed by 6 operations
llm:document:manageList, search, download, upload and delete the documents the account uses for retrieval.
Needed by 5 operations
PermissionWhat it lets a person do
ids:model:readList the base models a classifier can be built on.
Needed by 1 operation
ids:classifier:writeClassify a phrase with one version of a classifier.
Needed by 1 operation
ids:classifier:manageList, create, change and delete classifiers, and read one version of a classifier.
Needed by 5 operations
ids:entity:writeExtract entities from a phrase, and list the entity types.
Needed by 2 operations

An edge function is the JavaScript that the JavaScript brick of a scenario runs.

PermissionWhat it lets a person do
edge:function:readList the account's edge functions and the versions of a function, and read one version with its code.
Needed by 4 operations
edge:function:writeRun one version of an edge function.
Needed by 2 operations
edge:function:manageCreate, warm up and delete versions of an edge function.
Needed by 3 operations
PermissionWhat it lets a person do
account:user:manageSee, 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:manageRequest 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:manageSee, issue and revoke the API keys of the account's users.
Needed by 4 operations
account:profile:writeEdit the details of the account through the caller's own profile.
Needed by 1 request field
account:role:readList the roles an account-level user can hold.
Needed by 1 operation

These nine are tenant permissions. Only a tenant role can name them, so you can give them to tenant-level users only.

PermissionWhat it lets a person do
account:readSee the accounts of the tenant.
Needed by 3 operations
account:manageCreate, edit and delete accounts.
Needed by 3 operations and 9 request fields
account:capacity:manageChange the number of simultaneous calls an account may hold, and no other field of the account.
Needed by 1 operation
tenant:user:readSee the tenant-level users.
Needed by 3 operations
tenant:user:manageCreate, edit and delete tenant-level users.
Needed by 4 operations
tenant:sign_in:manageRequest a sign-in link for a tenant-level user.
Needed by 1 operation
tenant:api_key:manageSee, issue and revoke the API keys of tenant-level users.
Needed by 4 operations
tenant:role:readRead the permission catalogue and the roles of the tenant.
Needed by 3 operations
tenant:role:manageCreate, edit and delete roles.
Needed by 3 operations
tenant:scenario_template:manageCreate, edit and delete scenario templates, and upload or change the audio files, classifiers, edge functions and documents they use.
Needed by 20 operations

The caller’s profile lists every permission the caller holds:

GET/v1/a/profile

The 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.

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.

CodeWhen
permission_deniedThe caller’s roles do not give the permission the operation needs.
access_deniedThe caller does not cover a role or a user that the request writes to: see Nobody gives more than they hold.
invalid_roleThe request names a role that does not exist, or names a tenant role for an account-level user.
role_in_useThe request deletes a role that a user holds or another role inherits.
role_fixedThe request edits or deletes a fixed role.
conflictThe request creates or renames a role, and another role of your tenant holds that name.