Errors

Policy errors return an envelope with a stable code you can branch on:

error envelope
{
  "error": {
    "code": "outside_session_window",
    "message": "Official WhatsApp outbound policy denied the request (approved_template_required)."
  }
}

Error codes

Code HTTP Meaning
recipient_consent_revoked422Consent registration cannot override an opt-out.
recipient_suppressed422Consent registration cannot clear suppression.
consent_evidence_conflict409The form submission was already registered with another key; reuse its original key.
unauthenticated401Missing, revoked, or invalid key.
invalid_ability403The key lacks the required ability for this endpoint.
template_not_found404Template not found or not owned by your account.
message_not_found404Message not found or not owned by your account.
validation_error422Missing or invalid fields (per-field details in errors).
idempotency_key_required422Missing or too-short Idempotency-Key header.
idempotency_conflict409 (consent), 422 (send)Key reused with a different request body.
no_whatsapp_account422No connected official WhatsApp account.
no_whatsapp_phone_number422No sending number available for the account.
outside_session_window422Text message outside the 24-hour window — use a template.
template_not_approved422The template is not approved by WhatsApp.
recipient_consent_required422The recipient has not consented, or withdrew consent.
send_policy_denied422Denied by an internal send policy (the message explains why).
rate_limited429Request limit exceeded — see Rate limits.