Error Codes
HTTP Error Shape
Every API error response shares a consistent JSON envelope:
{
"error": {
"type": "invalid_request",
"message": "A human-readable explanation of what went wrong.",
"details": {}
}
}HTTP Status Codes
| Status | Meaning |
|---|---|
401 Unauthorized | Missing, invalid, or revoked API key. |
403 Forbidden | The agent owning this API key is paused. |
404 Not Found | Resource does not exist (or GET /api/v1/agent called with an organization-wide key). |
409 Conflict | Target channel is disabled. |
422 Unprocessable Entity | Validation error, or Idempotency-Key reused with a different request body. |
429 Too Many Requests | Key rate limit exceeded (API_RATE_LIMIT). Wait Retry-After seconds. |
Message Delivery error_code Values
When an outbound message fails (status: "failed"), message.error_code is set to one of the following values (and message.error_detail provides provider diagnostics):
error_code | Meaning | Retried? |
|---|---|---|
consent_blocked | The organization’s consent policy does not allow sending to this person. | No |
window_closed | WhatsApp’s 24-hour customer service window has expired; send an approved template instead. | No |
invalid_recipient | The provider reports that the recipient does not exist or cannot be reached. | No |
provider_rejected | The provider refused the message. | No |
unsupported_content | The channel cannot carry this content and it cannot be degraded to text (e.g. a reaction on Email). | No |
message_too_long | The text exceeds the channel’s maximum length. | No |
template_not_found | No synced template with that name and language exists on the channel. | No |
template_not_approved | The Meta template is not approved (pending, rejected, paused, or disabled). | No |
template_variables_invalid | Template variables, header, or buttons do not match the template definition. | No |
bounced | The recipient’s mail server rejected the email after acceptance (MAILER-DAEMON / DSN). | No |
channel_unavailable | The channel was disabled or its adapter was unavailable at send time. | No |
provider_unavailable | The upstream provider kept failing after retries (e.g. SMTP 4xx / 5xx upstream outage). | Yes (up to 5x) |
rate_limited | The provider kept rate limiting the channel for too long. | Yes (paced) |
internal_error | An unexpected error occurred while sending. | — |
Last updated on