Every request to /api/v1 carries a workspace API key:
Authorization: Bearer tk_live_…
There is nothing else to send. No account id, no workspace parameter: the key is the workspace. Anything belonging to a different workspace answers 404, never 403 — whether it exists is not an outsider's business.
Keys
Create one in Settings → API keys. A few things worth knowing:
- The key is shown once, at creation. We keep only a hash of it. If it is lost, revoke it and make another.
- A key starts with
tk_live_. It works against your real data: calls are placed, messages are sent and credits are used. There is no separate test mode. (Keys made earlier that start withtk_test_work the same way.) - Revoking takes effect immediately, and a revoked key answers
401unauthorized. - Every request a key makes is recorded in Settings → API keys → Request log, with its request and its answer. Secrets are masked there.
Treat a key like a password: server side only, never in a browser, never in an app you ship.
Scopes
A key carries the scopes it was created with, and a request outside them answers 403 missing_scope — the key is fine, it was simply not given this.
| Scope | What it allows |
|---|---|
campaigns:read | Read campaigns and who is in them |
campaigns:write | Create and change campaigns; start, pause, resume, cancel; add and remove people |
contacts:read | Read and search contacts |
contacts:write | Create, change and delete contacts |
groups:read | Read groups and who is in them |
groups:write | Create groups; add and remove members |
assistants:read | Read assistants and their settings |
assistants:write | Create assistants and change their settings |
catalog:read | Read the voice and model catalogues |
calls:read | Read calls, transcripts and recordings |
calls:create | Place calls. This one spends money |
messages:read | Read what happened to a message |
messages:send | Send WhatsApp messages |
templates:read | Read the approved WhatsApp templates |
plans:read | Read what the assistant has planned for contacts |
plans:write | Tell the assistant a waiting item is ready |
Note calls:create, not calls:write.
A key made before scopes were offered carries * and may do everything. Those keys keep working; there is no need to replace them.
Give a key only what it needs
If your website's lead form creates contacts, give that key contacts:write and nothing else. It then cannot place a call, however it is misused, and a leaked key costs you a day rather than a phone bill.
The one endpoint that works without a key
GET /v1/calls/{id}/recording also accepts a signed link (?expires=…&signature=…), so a recording can be handed to somebody who has no key — a customer, an auditor. The link stops working at expires and then answers 410.
What a failure looks like
{
"error": {
"code": "missing_scope",
"message": "This key does not have the campaigns:write scope.",
"request_id": "req_8f14e45fceea167a5a36dedd4bea2543"
}
}
Branch on code. See Errors.