Skip to content

Identity and access

Tenant-level user’s keyAccount-level user’s key
Issued bya user who holds tenant:api_key:manage, on the Tenant APIa user who holds account:api_key:manage, on the Account API
OpensTenant API, and the Account API for any account of the tenant. X-Account-Sid names the accountAccount API, for its own account
Can create accountsyes, with the permission account:manageno

Voicebot issues an account-level user’s key through POST/v1/a/user/{sid}/api-key and a tenant-level user’s key through POST/v1/t/user/{sid}/api-key. The first key of the first tenant_admin comes from us, at provisioning (phase 1, step 4). The principal that issues a key also lists and revokes it, and a signed-in person lists and revokes their own keys from their profile (GET/v1/a/profile/api-key, DELETE/v1/a/profile/api-key/{key_sid}).

Permission gates the action, scope gates the target

Section titled “Permission gates the action, scope gates the target”

These are two independent checks and both must pass.

  • Permission. May this caller perform this kind of action at all? Deleting a scenario, issuing a key, dispatching a call. The roles the caller holds decide it. Some roles are fixed, and your tenant builds the others. Roles and permissions lists every permission and what it lets a person do.
  • Scope. May this principal touch this particular object? Resolved from the principal, never from a header the caller controls.

A key acts with the roles of the user who owns it. GET/v1/a/profile lists the permissions the caller holds.

A read of an object outside your scope answers 404, not 403. Returning 403 would confirm the object exists, which is itself a leak.

Voicebot supports two sign-in shapes. Neither asks your people to maintain a second password.

Magic link. Your system asks Voicebot for a one-time sign-in link for a user it already authenticated, then redirects the browser to it.

POST/v1/a/user/{sid}/magic-link/request

Provisioned credentials. Your system creates the user and drives a password reset, and the person signs in directly.

POST/v1/a/user/{sid}/password-reset/request

Both requests need the permission account:sign_in:manage. The permission to edit users does not include it.

Both API surfaces authenticate with a bearer token, and there are three ways to hold one.

  • An API key, sent as the bearer directly.
  • A session token from a password login through POST/v1/a/auth/regular. This works for account-level users only: a tenant-level user holds no password.
  • A session token from a magic link consumed through POST/v1/a/auth/magic-link/consume. This works for any user. A tenant-level user has no other way to sign in.

A session expires after 24 hours by default. There is no refresh: the client signs in again.

Voicebot resolves what a tenant may use server-side and exposes it on the caller’s profile. Read the flags rather than hard-coding what a tenant may use into your integration. We set the rules. Neither published surface changes them.

GET/v1/a/profile