Skip to main content
This catalog lists the codes the public API routes (authenticated by API key) can return. The error.code field is stable: use it in your logic, not the text of message. When a code has more than one cause, error.details.reason can tell you which one it is. See the error format.

Authentication and permission

Billing

Do not retry a 402 hoping it goes away on its own. Waiting does not increase the allowance. Fix the cause in the plan and then resend.

Resource not found (404)

A resource of another project also returns 404, so its existence is not revealed.

Conflicts (409)

Rate and capacity limits (429)

Invalid request (422)

Request format

A body that is not valid JSON is a different case: see Malformed request.

Messages

A template send with a media header can also respond media_not_found (404), media_not_ready or media_content_type_rejected. See Media.

Templates

When a template error points at a field, error.param names it: On template_components_invalid, param points at the component, not the item inside it: with components.buttons, read message to find out which button. Variable numbering errors and variable-at-the-edge errors carry no param.

Media

Webhooks

Usage

Partner API

These codes come from the /v1/partner/* routes, which use the partner key. request_invalid and the scope, rate limit and not found codes (insufficient_scope, rate_limit_exceeded, channel_not_found, webhook_endpoint_not_found) are the same ones described above.

Reasons for each code

Some codes group different causes. For them, error.details.reason says which cause it is, and other details fields carry the values quoted in the message. A new code or value can appear: handle what you do not know by its code. The reasons for template_variables_invalid:

HTTP boundary

Server errors