API keys and scopes
Create, scope, store, rotate, and revoke API keys for server-side integrations.
Create a key under Developers > API keys > Create API key. Each key belongs to the workspace in which it was created. Its scopes decide which routes it can call. See Scopes.
Send the key with every request
Authorization: Bearer wtf_xxxxxxxxxxxx_REPLACE_WITH_YOUR_SECRETKeys have the format wtf_<publicId>_<secret>:
| Part | Format |
|---|---|
| Prefix | wtf_ |
| Public ID | 12 lowercase base32 characters: a-z and 2-7 |
| Secret | 43 base64url characters, generated from 32 random bytes |
Send the complete key, including the prefix and public ID. Keys have no live or test modes. Dashboard management uses your signed-in account; an API key does not grant dashboard access.
Scopes
When you create a key, tick only the scopes that your integration needs. At least one scope is required; creating a key without scopes answers 422 DEVELOPER_API_KEY_SCOPES_REQUIRED. A key stops working (401 API_KEY_INVALID) when the member who created it is removed from the workspace or loses the permission to manage API keys; rotate it from an account that still has that permission. Keys that existed before scopes were added have every scope, and GET /api/v1/me lists the scopes of the calling key.
| Scope | Allows |
|---|---|
read | Read contacts, conversations, messages, and the dropdown lists. Routes: GET /api/v1/contacts/find, GET /api/v1/contacts/:contactId, GET /api/v1/conversations/:conversationId, GET /api/v1/conversations/:conversationId/messages, GET /api/v1/messages/:messageId, GET /api/v1/members, GET /api/v1/channel-connections, GET /api/v1/whatsapp-channels, GET /api/v1/teams, GET /api/v1/custom-fields, GET /api/v1/lifecycle-stages, GET /api/v1/templates, GET /api/v1/labels. |
contacts.write | Create, update, and label contacts. Routes: POST /api/v1/contacts, PATCH /api/v1/contacts/:contactId, POST /api/v1/contacts/:contactId/labels, DELETE /api/v1/contacts/:contactId/labels/:labelId. |
conversations.write | Assign, change the status of, and add notes to conversations. Routes: POST /api/v1/conversations/:conversationId/assign, POST /api/v1/conversations/:conversationId/status, POST /api/v1/conversations/:conversationId/notes. |
messages.send | Send messages and upload media. Routes: POST /api/v1/messages, POST /api/v1/media. |
hooks.manage | Create, list samples for, and delete hooks. Routes: POST /api/v1/hooks, GET /api/v1/hooks/samples/:event, DELETE /api/v1/hooks/:id. |
otp.send | Send and read OTP messages. Routes: POST /api/v1/otp/messages, GET /api/v1/otp/messages/:messageId. |
cod.manage | Create and read cash-on-delivery confirmations and request refusal checks. Routes: POST /api/v1/cod-confirmations, GET /api/v1/cod-confirmations/:confirmationId, POST /api/v1/cod-confirmations/:confirmationId/refusal-check. |
GET /api/v1/me and GET /api/v1/public/media/:token need no scope. The media link route is public and is rate limited per token.
A call to a route without its scope answers 403 API_KEY_SCOPE_MISSING. Create a key with only the scopes a flow needs. For example, a flow that only creates contacts needs contacts.write, and a Zapier or n8n flow that reads dropdowns needs read.
Store the key securely
The full key is shown once. Select Copy API key and save it in your server's secret manager or protected environment configuration.
- Keep keys server-side. Never put them in browser code, mobile apps, or public repositories.
- Avoid logging the
Authorizationheader or including keys in URLs. - Use a separate named key for each backend integration so you can revoke it independently.
- If you lose a key, create a replacement. You cannot reveal the old key again.
A workspace can have at most 10 active keys. Revoked keys do not count toward this limit. A key in its rotation grace period does not count either. Creating another active key returns 409 API_KEY_LIMIT_REACHED when the limit is reached.
Handle authentication failures
Missing or malformed authorization, an unknown key, a wrong secret, and a revoked key all return 401 API_KEY_INVALID. The response does not distinguish these cases. See the Problem Details format.
A rotated key that is past its grace period returns 401 API_KEY_EXPIRED. Replace it with the new key.
Check that the complete key is configured and the header contains Bearer, a space, and the key. If the key was revoked or expired, replace it; retrying the same key will not restore access.
Authenticated calls share a 20 requests per second per-key limit, across OTP, COD, send, and read routes, including status reads.
Rotate a key
Rotation replaces a key without an outage. Open Developers > API keys, then rotate the key. The new key keeps the same name and scopes. The new secret is shown once.
Rotation sets a grace period on the old key. Choose a grace period from 0 to 168 hours. The default is 24 hours.
- During the grace period, both keys work.
- When the grace period ends, the old key returns
401 API_KEY_EXPIRED. - A grace period of 0 hours stops the old key immediately.
- A key in its grace period cannot be rotated again. Wait until it expires or revoke it.
Use this order:
- Rotate the key and securely save the new secret.
- Update your backend configuration and deploy it.
- Confirm requests succeed with the new key.
- Wait for the grace period to end, or revoke the old key.
Revoke a key
To revoke a key, open Developers > API keys, select Revoke, then confirm with Revoke API key. Revocation is immediate and permanent.
Keep an active-key slot available for rotation. If a key is exposed, revoke it promptly and replace it. A replacement key in the same workspace can read existing messages and confirmations; idempotency is scoped to the workspace, not to the key.