{
"error": {
"code": "insufficient_credits",
"message": "The account does not hold enough credits for this template's category. Before the first payment, free test sends go only to your own verified number."
}
}The HTTP status tells you the class of problem; the code tells you exactly which. Codes are stable — build on them, not on the message text, which may be reworded.
All codes
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | The body is not valid JSON or fails the schema. |
| 401 | invalid_api_key | The Authorization header is missing, malformed, unknown or revoked. |
| 402 | insufficient_credits | The account does not hold enough credits for this template's category. Before the first payment, free test sends go only to your own verified number. |
| 404 | template_not_found | No template with that name and language exists on this account. |
| 404 | message_not_found | No message with that id exists on this account. |
| 409 | template_not_approved | The template exists but Meta has not approved it yet, or rejected it. |
| 409 | unsupported_template | This template cannot be sent through the API: carousels are not supported yet, and a template using a WhatsApp feature outside utility, authentication and marketing messages is never sendable here. |
| 409 | template_category_changed | WhatsApp has changed this template's category since it was approved. The template has been updated; check the new price and send again. |
| 409 | number_not_connected | The account's WhatsApp number is not connected and live. |
| 422 | invalid_phone | `to` is not a valid Indian mobile number. |
| 422 | non_indian_number | We do not send messages to non-Indian numbers. `to` belongs to another country; the message was not attempted and nothing was charged. |
| 422 | variable_count_mismatch | The number of body parameters does not match the template's variables. |
| 422 | unsupported_component | A component was supplied that this template does not have, or of a type the API does not support. |
| 429 | rate_limited | Too many sends on this key in the last minute. Retry after the `Retry-After` seconds. |
| 429 | daily_limit_reached | This account's daily credit limit has been reached. Retry after the `Retry-After` seconds, or ask us to raise the limit. |
| 502 | send_failed | Our messaging platform refused the send. Any credits debited were refunded. |
| 400 | unsupported_media_type | The uploaded file's type is not accepted, or its contents do not match its extension. Images: jpg, jpeg, png. Video: mp4, 3gp. Audio: mp3, ogg, aac, amr, m4a, wav. Documents: pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv. |
| 413 | file_too_large | The uploaded file is larger than WhatsApp allows for its type: 5 MB for images, 16 MB for video and audio, 50 MB for documents. |
| 503 | storage_unavailable | File storage is unavailable right now, so the file was not saved. Nothing was charged; try again shortly. |