Skip to content

Get started

Errors, rate limits and CORS

Every error is a JSON object with an error message and a standard HTTP status. Simple actions that succeed return {"ok": true}.

What does an error look like?

{ "error": "API key is read-only" }

The error text is meant for people and logs. Branch on the HTTP status in your code, and treat the message text as informational. Unknown fields in request bodies are ignored rather than rejected.

Some errors add fields:

  • 402 adds "code": "payment_required".
  • 401 for an API key that was blocked because it may have been leaked adds "code": "api_key_blocked". See Leaked key protection.
  • 403 from an API key used outside its IP allowlist adds "code": "ip_not_allowed": {"error": "this API key is not allowed from your IP address", "code": "ip_not_allowed"}. See API keys.
  • Errors from Meta on the Cloud API channel endpoints add meta_code, meta_subcode and meta_title when Meta provides them.
  • 502 from Start a conversation adds the conversation that was created before the send failed.
  • A path that does not exist returns 404 with {"error": "not found", "code": "not_found"}, so you can tell a wrong URL from a missing resource.

Which status codes are used?

StatusWhenExample error
400Invalid input or a malformed id; session request without a workspace.invalid conversation id, message body is required, workspace required (X-Tenant-ID)
401Missing, wrong, revoked, expired or blocked credentials.invalid or expired API key, unauthorized, This API key was blocked because it may have been leaked. … (api_key_blocked)
402Subscriptions are enforced and the workspace has none.subscription required
403Not allowed for this key or user, or the key is used from an IP address outside its allowlist.API key is read-only, API keys cannot administer workspaces, API key belongs to a different workspace, this API key is not allowed from your IP address, admin required, forbidden
404The resource does not exist in this workspace (or is not visible to an agent).conversation not found, contact not found
409Conflicts with the current state.whatsapp is not connected, a contact with this phone number already exists
413A request body or a file is too large (Meta callback, uploading or sending files).payload too large, file too large: images can be up to 5 MB
415A file type that cannot be uploaded or sent.unsupported file type: the file is not a valid .png file
429Too many requests: a sign-in or email endpoint, your API key or workspace is over its limit, or the workspace sent more than 30 files in a minute, or uploaded more than 30 (two separate budgets).too many attempts, please wait a minute and try again, API rate limit exceeded, retry after 12 seconds
500Unexpected server error, or an error from WhatsApp or Meta while sending.internal error
502WhatsApp or Meta rejected an upstream call.meta rejected the template request: …
503A dependency is down (health check returns status: "degraded"), or the guided Meta signup is not configured on the server.customer signup is awaiting platform configuration

405 and 422 are not used.

What should I retry?

StatusRetry?
500, 502, 503Yes, with exponential backoff (for example 1 s, 2 s, 4 s, up to a few attempts).
429Yes, after the number of seconds in Retry-After.
409 whatsapp is not connectedOnly after the connection is back (check QR session status).
400, 401, 402, 403, 404No. Fix the request, key or permissions first.

A send that failed with 500 may in rare cases still have reached WhatsApp. Before retrying a send, check the latest messages of the conversation.

Server errors never include internal details such as database messages, file paths or the raw error of another service. A 500, or any error whose message could expose internals, carries a generic message, a code and a request_id (also sent in the X-Request-ID response header on every response). Quote the id when you contact support.

What are the API rate limits?

Requests that authenticate with an API key are limited per key and per workspace:

LimitValue
Per API key60 requests per minute and 10,000 per day
Per workspace (all of its keys together)120 requests per minute and 20,000 per day

Minutes are clock minutes and days are UTC days. Every API-key response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the minute window resets), plus X-RateLimit-Daily-Limit and X-RateLimit-Daily-Remaining. Over a limit you get 429, a Retry-After header in seconds and a body like this:

{ "error": "API rate limit exceeded, retry after 12 seconds", "code": "rate_limited", "scope": "api_key", "retry_after": 12 }

scope is api_key or workspace. Requests that are refused do not count against the limit. Repeated requests with invalid keys from one IP address are also refused with 429 for a short time. Creating more keys does not raise the workspace limit. Need more? Contact us about your use case.

The app itself (signed-in browser sessions) is not subject to the key limits.

Which endpoints have per-IP limits?

The public sign-in and email endpoints are rate limited per client IP address, with a window kept in memory (the website’s contact form has its own limit):

EndpointsLimit
POST /api/auth/register, /login, /reset-password, /verify-email, /google/confirm10 per minute, shared by these endpoints
POST /api/auth/forgot-password, /resend-verification5 per minute, shared by these endpoints
GET /api/auth/google/start, /google/pending20 per minute, shared by these endpoints

Over the limit you get 429 with too many attempts, please wait a minute and try again and a Retry-After header in seconds. There are no X-RateLimit-* headers.

Handle 429 and Retry-After everywhere, and avoid tight polling loops: use webhooks or live events instead.

Acceptable use of the API

The API is for your own business only: connecting your own workspace to your own tools. You may not resell or sublicense access to it (except through our white-label program or as a partner on the Partner API), copy, scrape or reverse-engineer the Service, or use the API to build a product that competes with it. We may suspend or revoke API keys that break these rules or that put the Service at risk. The full wording is in the Terms, section “Acceptable use of the API”.

Which list endpoints are capped?

Messages page with limit, offset and before. The sign-ins, audit events and security alerts use a cursor: each page has a next_cursor, which you send back as cursor until it is "". Other lists have no pagination. Contacts, group members and the audit log can be downloaded as CSV. Lists return at most:

EndpointCap
List conversations30 most recent
List messageslimit up to 100 per page (default 50), paginated; offset up to 10,000 (use before to go further back)
Sign-ins, audit events, security alertslimit up to 200 per page (default 50), cursor-paginated
Contacts, templates, knowledge articles500 newest
Webhooks10 per workspace
Keys, automations, members200 newest
Template syncFirst page from Meta (up to 100)

How does CORS work?

The API answers OPTIONS preflight requests with 204 and allows the methods GET, POST, PUT, PATCH, DELETE, OPTIONS and the request headers Content-Type, Authorization and X-Tenant-ID. No response headers are exposed to scripts beyond the defaults. Never use API keys from browser code; call the API from your server.