Errors and retries
Branch on error.code, not the human-readable error message. Retain request_id (also returned as X-Request-Id) when asking for support.
Choose the next action
| Result | Action |
|---|---|
invalid_request | Correct the request; do not loop unchanged invalid input. |
invalid_credential / insufficient_scope | Check environment, credential and scopes on the backend. |
idempotency_conflict | The key was reused with a different request; reconcile the original operation. |
idempotency_in_progress | Wait for Retry-After, then retry the same body and key. |
payment_required | Appears on the message after 202 (failed), not as an HTTP error on the send. Resolve Meta billing and reverify readiness before another send. |
policy_rejected / template_not_found | Check template approval, language and sending eligibility. |
connection_unavailable (422) | The operation could not use the connection. This can mean the connection is inactive or its authorization has expired, or that a Meta call made by the operation (for example registration, deregistration or webhook subscription) failed. Check retryable and the error details. For an inactive or expired connection, check connection health and reconnect. Retry with bounded backoff only when retryable is true. |
quota_exceeded (429) | Too much queued work for the sending phone number. Honor Retry-After, then retry the same body and key. |
payload_too_large (413) | The request body or uploaded file is over the size limit. Reduce its size. Do not retry unchanged. |
unsupported_media_type (415) | Either the HTTP Content-Type is not the one the endpoint requires (JSON for most requests), or the mime_type in an upload body is not a supported media type. Fix the content type or use a supported MIME type. Do not retry unchanged. |
message_not_cancellable (409) | The message has already started dispatch. Inspect its status instead of cancelling. |
content_expired (410) | The content you asked for is no longer available. For a webhook delivery replay, the 30-day content window has passed. For an idempotent operation that returned a secret, the original response could only be recovered for 24 hours and the operation is not performed again under that key. Follow the recovery instructions for that operation. Do not retry every operation with a new key. |
media_url_rejected (422) | The media URL was refused. Use an allowed HTTPS URL or upload the file first. |
media_fetch_failed | Meta could not download or process the media. It appears on the message after acceptance. Check the media link or file. |
signup_session_state_invalid (409) | The signup session is in a state that does not allow this action. Read the session, and use details.session_id if present. |
429 / 503 | Honor Retry-After when present; use bounded exponential backoff with jitter and the same idempotency key. |
| HTTP timeout / lost response | Acceptance is uncertain; retry the unchanged request with the original key. |
Do not interpret a workspace/resource 404 as proof that the resource exists elsewhere: inaccessible and nonexistent resources have the same response.
After acceptance
After 202, inspect the saved message ID. A later failure belongs to that accepted message, not to the original HTTP request. outcome_unknown means dispatch might have occurred: do not automatically send a replacement. An expired message was not sent; do not keep treating it as retryable.
Webhook replay does not resend a WhatsApp message. It redelivers an event to your application, retaining the delivery ID for deduplication.
See Message status, Webhook health, and Billing readiness.