Getting started
Ошибки
# Ошибки
Любая ошибка приходит в одном формате. `code` не меняется, на него и опирайтесь, а `message` объясняет причину человеку. Если сообщение не ушло, в ошибке есть `message_id`, а если неверно поле запроса, то `param`. `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"
}
}
```
Коды и что с ними делать:
- `unauthenticated` (HTTP 401): The API key is missing, wrong or revoked. Send it in the header Authorization: Bearer <key>.
- `forbidden` (HTTP 403): The workspace's plan does not allow this.
- `payment_required` (HTTP 402): The channel is unpaid, so sending on it is stopped.
- `integrator_required` (HTTP 403): For now the API works only in workspaces an integrator runs. To connect, sign up as an integrator.
- `test_key_required` (HTTP 403): This works with a test key only.
- `not_found` (HTTP 404): Nothing found. A key sees only the messages of its own workspace and its own mode, live or test.
- `method_not_allowed` (HTTP 405): This method is not supported here.
- `invalid_request` (HTTP 422): The request is not filled in correctly.
- `invalid_phone` (HTTP 422): Give the number in international format, for example +77011234567.
- `recipient_unknown` (HTTP 422): This person has not written on Instagram yet. Put the `from` of their message in `to`.
- `template_not_found` (HTTP 422): There is no approved template with this name and language. GET /v1/templates lists the approved ones.
- `template_parameters` (HTTP 422): The values do not fit the template: it needs one value, not empty, for each placeholder.
- `template_unsupported` (HTTP 422): Templates exist only on WhatsApp. On this channel send text, or send the template with channel whatsapp.
- `media_format` (HTTP 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` (HTTP 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` (HTTP 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` (HTTP 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.
- `channel_unresolved` (HTTP 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` (HTTP 422): This Idempotency-Key came with a different request before. Use a new key for a new message.
- `idempotency_in_progress` (HTTP 409): A request with this Idempotency-Key is still running. Try again in a moment.
- `rate_limited` (HTTP 429): Too many requests with this key. Try again after as many seconds as the Retry-After header says.
- `server_error` (HTTP 500): Something went wrong on our side. Try again a little later with the same Idempotency-Key.
- `channel_unavailable` (HTTP 422): The channel is unavailable: it is not connected to the workspace or was disconnected. Connect it on the workspace's Channels page.
- `outside_window` (HTTP 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` (HTTP 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` (HTTP 422): The customer has not agreed to hear from you. Once they agree, record it with POST /v1/contacts/{phone}/consent.
- `opted_out` (HTTP 422): The customer asked not to be written to, so you may not write to them first.
- `made_up_number` (HTTP 422): This is a made-up number of a demo workspace, and nothing goes to it on a real channel.
- `meta_payment` (HTTP 422): Meta is not sending messages: the WhatsApp account has no working card. Add a card at Meta and try again.
- `undeliverable` (HTTP 422): The channel could not deliver the message. For example, the number may not have WhatsApp.
- `media_rejected` (HTTP 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.
- `channel_error` (HTTP 422): The channel did not take the message. Try again later, and if it still fails, write to us.
Обновлено 4 декабря 2026
Любая ошибка приходит в одном формате. code не меняется, на него и опирайтесь, а message объясняет причину человеку. Если сообщение не ушло, в ошибке есть message_id, а если неверно поле запроса, то param. 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"
}
}
Коды и что с ними делать:
unauthenticated(HTTP 401): The API key is missing, wrong or revoked. Send it in the header Authorization: Bearer <key>.forbidden(HTTP 403): The workspace's plan does not allow this.payment_required(HTTP 402): The channel is unpaid, so sending on it is stopped.integrator_required(HTTP 403): For now the API works only in workspaces an integrator runs. To connect, sign up as an integrator.test_key_required(HTTP 403): This works with a test key only.not_found(HTTP 404): Nothing found. A key sees only the messages of its own workspace and its own mode, live or test.method_not_allowed(HTTP 405): This method is not supported here.invalid_request(HTTP 422): The request is not filled in correctly.invalid_phone(HTTP 422): Give the number in international format, for example +77011234567.recipient_unknown(HTTP 422): This person has not written on Instagram yet. Put thefromof their message into.template_not_found(HTTP 422): There is no approved template with this name and language. GET /v1/templates lists the approved ones.template_parameters(HTTP 422): The values do not fit the template: it needs one value, not empty, for each placeholder.template_unsupported(HTTP 422): Templates exist only on WhatsApp. On this channel send text, or send the template with channel whatsapp.media_format(HTTP 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(HTTP 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(HTTP 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(HTTP 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.channel_unresolved(HTTP 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(HTTP 422): This Idempotency-Key came with a different request before. Use a new key for a new message.idempotency_in_progress(HTTP 409): A request with this Idempotency-Key is still running. Try again in a moment.rate_limited(HTTP 429): Too many requests with this key. Try again after as many seconds as the Retry-After header says.server_error(HTTP 500): Something went wrong on our side. Try again a little later with the same Idempotency-Key.channel_unavailable(HTTP 422): The channel is unavailable: it is not connected to the workspace or was disconnected. Connect it on the workspace's Channels page.outside_window(HTTP 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(HTTP 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(HTTP 422): The customer has not agreed to hear from you. Once they agree, record it with POST /v1/contacts/{phone}/consent.opted_out(HTTP 422): The customer asked not to be written to, so you may not write to them first.made_up_number(HTTP 422): This is a made-up number of a demo workspace, and nothing goes to it on a real channel.meta_payment(HTTP 422): Meta is not sending messages: the WhatsApp account has no working card. Add a card at Meta and try again.undeliverable(HTTP 422): The channel could not deliver the message. For example, the number may not have WhatsApp.media_rejected(HTTP 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.channel_error(HTTP 422): The channel did not take the message. Try again later, and if it still fails, write to us.