Before you start
- A Keebai account at app.keebai.com.
- The
developer.manage_tokenspermission on your role. If your account doesn’t show API Keys, ask your tenant admin to grant it under System Settings → Roles. - At least one WhatsApp channel connected and one template approved by Meta.
- Anything that speaks HTTP —
curl, Postman, Insomnia, or your favorite SDK.
1. Create a token
Open API Keys
Go to System Settings → API Keys in the dashboard: app.keebai.com/system-settings/api-keys.Not seeing it? Your role is missing
developer.manage_tokens. Ask an admin.Create a new key
Click Create API Key. Three fields:
- Name — anything descriptive.
Sales backend,Nightly reports,Local dev. - Permissions (scopes) — only the ones the token will actually use. For this quickstart, pick
messages:sendandtemplates:read. - Expiration (optional) — we recommend 90 days. Leave blank for no expiry.
2. List your approved templates
To send a template you need itstemplate_name, language, and variable names. Pull them with GET /v1/templates:
3. Send your first message
Grab thephone_number_id of your channel from GET /v1/whatsapp/numbers, then call POST /v1/messages/template:
4. If something breaks
| Status | Meaning | What to do |
|---|---|---|
401 Unauthorized | Token is invalid, revoked, or expired. | Check you copied the full token (kbai_pk_ prefix included). If it’s not in your active token list, mint a new one. |
403 Forbidden (INSUFFICIENT_SCOPE) | Token doesn’t carry the scope the endpoint needs. | Mint a new token with the missing scopes checked. |
400 Bad Request | Body is malformed or phone_number_id is off. | Check the JSON against the endpoint contract. |
429 Too Many Requests | You hit the rate limit (60 req/min, 1,000 req/hour per token). | Back off, then retry with exponential backoff. |
5. Where to next
TypeScript SDK
Skip writing HTTP by hand — use the typed client.
CLI
keebai login and keebai whatsapp messages send from your shell.Manage tokens
Create, list, revoke, and rotate tokens.
Scopes
What each scope does and when to use it.
Bulk send
Send the same template to thousands of recipients and track status.
OpenAPI spec
Swagger UI with every endpoint, schema, and example.