Getting started
Errors
# Errors
## The error object
Every error comes in one format. `code` never changes, so rely on it, while `message` explains the reason to a person. When a message did not go, the error has `message_id`, and when a field of the request is wrong, `param`. Every error has `request_id`.
```json
{
"error": {
"code": "outside_window",
"message": "The customer has not written to you in the last 24 hours, and WhatsApp lets free text through only as a reply. Send an approved template.",
"message_id": "0199c5e2-7b3a-7c51-9f0e-3a1d2b4c5e6f",
"request_id": "req_01k75q3x8f2m9c4v6b7n1d0e5a"
}
}
```
## Error codes
### Your key and account
Check the key, its mode and its workspace, or pay the open invoice. Sending again does not help.
| Code | HTTP | What it means |
| --- | --- | --- |
| `unauthenticated` | 401 | The API key is missing, wrong or revoked. Send it in the header Authorization: Bearer <key>. |
| `forbidden` | 403 | The workspace's plan does not allow this. |
| `payment_required` | 402 | The channel is unpaid, so sending on it is stopped. |
| `integrator_required` | 403 | For now the API works only in workspaces an integrator runs. To connect, sign up as an integrator. |
| `test_key_required` | 403 | This works with a test key only. |
### The request
Fix the request: the same one sent again gets the same response.
| Code | HTTP | What it means |
| --- | --- | --- |
| `not_found` | 404 | Nothing found. A key sees only the messages of its own workspace and its own mode, live or test. |
| `method_not_allowed` | 405 | This method is not supported here. |
| `invalid_request` | 422 | The request is not filled in correctly. |
| `invalid_phone` | 422 | Give the number in international format, for example +77011234567. |
| `recipient_unknown` | 422 | This person has not written on Instagram yet. Put the `from` of their message in `to`. |
| `channel_unresolved` | 422 | The customer has not written to you on any connected channel, so auto cannot choose one. Name the channel, for example whatsapp. |
| `idempotency_mismatch` | 422 | This Idempotency-Key came with a different request before. Use a new key for a new message. |
### Sending rules
Change what you send: a template instead of text, consent first, or fewer new customers today.
| Code | HTTP | What it means |
| --- | --- | --- |
| `template_not_found` | 422 | There is no approved template with this name and language. GET /v1/templates lists the approved ones. |
| `template_parameters` | 422 | The values do not fit the template: it needs one value, not empty, for each placeholder. |
| `template_unsupported` | 422 | Templates exist only on WhatsApp. On this channel send text, or send the template with channel whatsapp. |
| `outside_window` | 422 | The customer has not written to you in the last 24 hours, and WhatsApp lets free text through only as a reply. Send an approved template. |
| `messaging_limit` | 422 | The number has used up its daily WhatsApp limit: in the last 24 hours it has already written first to as many customers as Meta allows, from 50 to 100,000 depending on the number's tier. You can write to new customers again once the first of those messages are 24 hours old, and you can answer anyone who wrote to you in the last 24 hours right now. Meta raises the limit on its own while message quality stays high. |
| `no_consent` | 422 | The customer has not agreed to hear from you. Once they agree, record it with POST /v1/contacts/{phone}/consent. |
| `opted_out` | 422 | The customer asked not to be written to, so you may not write to them first. |
### Files
Send a file in a format and size the channel takes, or download a customer's file sooner.
| Code | HTTP | What it means |
| --- | --- | --- |
| `media_format` | 422 | The file's format does not fit. A photo goes as JPEG or PNG, a video as MP4 or 3GP (H.264 and AAC), audio as AAC, AMR, MP3, M4A or OGG (Opus, mono), and a voice note only as OGG with the Opus codec, mono: an uploaded file of that format, or a link ending in .ogg or .opus. |
| `media_too_large` | 422 | The file is larger than the channel takes: up to 5 MB for a photo, 16 MB for audio and video. |
| `media_not_found` | 404 | No such file. A key sees only the files of its own workspace and its own mode, live or test. A file uploaded for one channel goes only on that channel, and GET /v1/media/{id} downloads only files customers sent. |
| `media_expired` | 410 | The channel no longer keeps this file: WhatsApp keeps a file a customer sent for 7 days and an uploaded one for 30. Download a customer's file sooner, and upload yours again. |
| `media_rejected` | 422 | The channel did not take the file: its format did not fit or its link did not open. Check the format and size, and that the link opens without signing in. |
### The channel and Meta
The channel cannot send right now. Check its state and alerts in `GET /v1/channels`.
| Code | HTTP | What it means |
| --- | --- | --- |
| `channel_unavailable` | 422 | The channel is unavailable: it is not connected to the workspace or was disconnected. Connect it on the workspace's Channels page. |
| `made_up_number` | 422 | This is a made-up number of a demo workspace, and nothing goes to it on a real channel. |
| `meta_payment` | 422 | Meta is not sending messages: the WhatsApp account has no working card. Add a card at Meta and try again. |
| `undeliverable` | 422 | The channel could not deliver the message. For example, the number may not have WhatsApp. |
| `channel_error` | 422 | The channel did not take the message. Try again later, and if it still fails, write to us. |
### Try again
Wait, then send again with the same `Idempotency-Key`.
| Code | HTTP | What it means |
| --- | --- | --- |
| `idempotency_in_progress` | 409 | A request with this Idempotency-Key is still running. Try again in a moment. |
| `rate_limited` | 429 | Too many requests with this key. Try again after as many seconds as the Retry-After header says. |
| `server_error` | 500 | Something went wrong on our side. Try again a little later with the same Idempotency-Key. |
Updated 4 December 2026
The error object
Every error comes in one format. code never changes, so rely on it, while message explains the reason to a person. When a message did not go, the error has message_id, and when a field of the request is wrong, param. Every error has request_id.
{
"error": {
"code": "outside_window",
"message": "The customer has not written to you in the last 24 hours, and WhatsApp lets free text through only as a reply. Send an approved template.",
"message_id": "0199c5e2-7b3a-7c51-9f0e-3a1d2b4c5e6f",
"request_id": "req_01k75q3x8f2m9c4v6b7n1d0e5a"
}
}
Error codes
Your key and account
Check the key, its mode and its workspace, or pay the open invoice. Sending again does not help.
| Code | HTTP | What it means |
|---|---|---|
unauthenticated |
401 | The API key is missing, wrong or revoked. Send it in the header Authorization: Bearer <key>. |
forbidden |
403 | The workspace's plan does not allow this. |
payment_required |
402 | The channel is unpaid, so sending on it is stopped. |
integrator_required |
403 | For now the API works only in workspaces an integrator runs. To connect, sign up as an integrator. |
test_key_required |
403 | This works with a test key only. |
The request
Fix the request: the same one sent again gets the same response.
| Code | HTTP | What it means |
|---|---|---|
not_found |
404 | Nothing found. A key sees only the messages of its own workspace and its own mode, live or test. |
method_not_allowed |
405 | This method is not supported here. |
invalid_request |
422 | The request is not filled in correctly. |
invalid_phone |
422 | Give the number in international format, for example +77011234567. |
recipient_unknown |
422 | This person has not written on Instagram yet. Put the from of their message in to. |
channel_unresolved |
422 | The customer has not written to you on any connected channel, so auto cannot choose one. Name the channel, for example whatsapp. |
idempotency_mismatch |
422 | This Idempotency-Key came with a different request before. Use a new key for a new message. |
Sending rules
Change what you send: a template instead of text, consent first, or fewer new customers today.
| Code | HTTP | What it means |
|---|---|---|
template_not_found |
422 | There is no approved template with this name and language. GET /v1/templates lists the approved ones. |
template_parameters |
422 | The values do not fit the template: it needs one value, not empty, for each placeholder. |
template_unsupported |
422 | Templates exist only on WhatsApp. On this channel send text, or send the template with channel whatsapp. |
outside_window |
422 | The customer has not written to you in the last 24 hours, and WhatsApp lets free text through only as a reply. Send an approved template. |
messaging_limit |
422 | The number has used up its daily WhatsApp limit: in the last 24 hours it has already written first to as many customers as Meta allows, from 50 to 100,000 depending on the number's tier. You can write to new customers again once the first of those messages are 24 hours old, and you can answer anyone who wrote to you in the last 24 hours right now. Meta raises the limit on its own while message quality stays high. |
no_consent |
422 | The customer has not agreed to hear from you. Once they agree, record it with POST /v1/contacts/{phone}/consent. |
opted_out |
422 | The customer asked not to be written to, so you may not write to them first. |
Files
Send a file in a format and size the channel takes, or download a customer's file sooner.
| Code | HTTP | What it means |
|---|---|---|
media_format |
422 | The file's format does not fit. A photo goes as JPEG or PNG, a video as MP4 or 3GP (H.264 and AAC), audio as AAC, AMR, MP3, M4A or OGG (Opus, mono), and a voice note only as OGG with the Opus codec, mono: an uploaded file of that format, or a link ending in .ogg or .opus. |
media_too_large |
422 | The file is larger than the channel takes: up to 5 MB for a photo, 16 MB for audio and video. |
media_not_found |
404 | No such file. A key sees only the files of its own workspace and its own mode, live or test. A file uploaded for one channel goes only on that channel, and GET /v1/media/{id} downloads only files customers sent. |
media_expired |
410 | The channel no longer keeps this file: WhatsApp keeps a file a customer sent for 7 days and an uploaded one for 30. Download a customer's file sooner, and upload yours again. |
media_rejected |
422 | The channel did not take the file: its format did not fit or its link did not open. Check the format and size, and that the link opens without signing in. |
The channel and Meta
The channel cannot send right now. Check its state and alerts in GET /v1/channels.
| Code | HTTP | What it means |
|---|---|---|
channel_unavailable |
422 | The channel is unavailable: it is not connected to the workspace or was disconnected. Connect it on the workspace's Channels page. |
made_up_number |
422 | This is a made-up number of a demo workspace, and nothing goes to it on a real channel. |
meta_payment |
422 | Meta is not sending messages: the WhatsApp account has no working card. Add a card at Meta and try again. |
undeliverable |
422 | The channel could not deliver the message. For example, the number may not have WhatsApp. |
channel_error |
422 | The channel did not take the message. Try again later, and if it still fails, write to us. |
Try again
Wait, then send again with the same Idempotency-Key.
| Code | HTTP | What it means |
|---|---|---|
idempotency_in_progress |
409 | A request with this Idempotency-Key is still running. Try again in a moment. |
rate_limited |
429 | Too many requests with this key. Try again after as many seconds as the Retry-After header says. |
server_error |
500 | Something went wrong on our side. Try again a little later with the same Idempotency-Key. |