Skip to content

Phase 2 — API integration

This phase keeps your system and Voicebot in step. A customer appears on your side, an account appears here, and the two stay matched for as long as both exist. Your engineers write that loop once.

The key from phase 1 is a bearer credential. Send it on every request:

Authorization: Bearer <your key>

There is no exchange step and no token to refresh: the key is what authenticates.

Treat it as you would any other production secret. It belongs in your secret store, never in source control, and it reaches your service the way the rest of your credentials do.

KeyOpens
Tenant keyevery account in your tenant
Account keythe one account it was issued for

We issue a key with an expiry — a year, for a service integration — and revoke it on request before then. Revoke and reissue if one is ever exposed.

Done when GET/v1/internal/account answers under that key.

Four resources cross the boundary. All four work the same way: something happens in your system, you call the matching operation here, and the two records stay joined by an identifier you choose.

One per organisational unit on your side: a department, a brand, a region, or a customer of yours.

POST/v1/internal/account
PATCH/v1/internal/account/{sid}
DELETE/v1/internal/account/{sid}
GET/v1/internal/account

The people who sign in to that account. An account needs at least one.

POST/v1/user
PATCH/v1/user/{sid}
DELETE/v1/user/{sid}
GET/v1/user

An identifier the account places and answers calls on. It is an alphanumeric value carried in a SIP URI, not necessarily a dialable telephone number.

POST/v1/number
PATCH/v1/number/{id}
DELETE/v1/number/{id}
GET/v1/number

Only if you group numbers. A pool widens the inbound side: an agent bound to one answers on every active number in it.

Membership lives on the number rather than on the pool — you attach and detach by patching the number’s pool_sid, not by calling the pool.

POST/v1/number-pool
PATCH/v1/number-pool/{id}
DELETE/v1/number-pool/{id}
GET/v1/number-pool

Done when every resource on your side has a counterpart here, a change on your side reaches it, and a deletion on your side removes it.

Neither shape below gives your people a second password to remember. Pick one and apply it uniformly.

You issue a one-time link for a user and hand it to them: your system redirects them straight into the panel, or delivers the link however it already reaches that person.

POST/v1/user/{sid}/magic-link/request
POST/v1/auth/magic-link/consume

The link is a credential while it is in transit. How it travels matters as much as the fact that it expires.

Either a tenant key or that account’s own key can issue the link. Identity and access covers the rest.

Done when one of your people has signed in for real and last_login_at comes back set from GET/v1/user.

Work through both against a real account rather than a scratch one.

Everything your system created here, and the changes it makes afterwards.

#CheckHow
1every account on your side has a counterpart hereGET/v1/internal/account
2numbers registeredGET/v1/number
3numbers grouped into poolsGET/v1/number-pool
4a change on your side reaches herePATCH/v1/number/{id}
5a deletion on your side removes the counterpart hereDELETE/v1/number/{id}

Passing both is what opens phase 3, however the resources were created.