InboboDocsMenu

Guides

Errors

Errors return a JSON body with a stable code you can branch on and a message for humans.

Format

400 Bad Request
{
  "code": "VALIDATION_ERROR",
  "message": "to.wa_id must be an international number of 8 to 15 digits"
}

Branch on code, not on message. Messages are written for people and may be reworded.

Codes

StatusCodeMeaningWhat to do
400VALIDATION_ERRORA field is missing or invalid: a bad phone number or email, an unapproved template, the wrong message type for the channel, a missing Idempotency-Key.Fix the request. The message explains which field.
401UNAUTHORIZEDThe token is missing, unknown, rotated or revoked.Check the token. Ask an admin to rotate it if it was lost.
403CHANNEL_NOT_FOUNDThe channel does not exist or is not bound to your consumer.List your channels with GET /channels and use one of those ids.
404NOT_FOUNDThe message id is unknown, or the message was sent by another consumer.Check the id.
409IDEMPOTENCY_MISMATCHThe Idempotency-Key was already used with a different channel, recipient or message.Use a new key for a new message, or resend the original payload.
422WINDOW_CLOSEDWhatsApp free text was sent outside the 24-hour window.Send an approved template instead.

Failures after 202

A 202 only means the message was accepted. The channel provider can still refuse it later, for example an invalid number or a rejected template. That arrives as a status callback with status: "failed" and an error_code. Always handle failed events.

Which errors to retry

  • Network errors and timeouts: retry with the same Idempotency-Key.
  • 5xx: retry with backoff and the same key.
  • 400, 401, 403, 404, 409: do not retry unchanged; the request needs fixing.
  • 422 WINDOW_CLOSED: do not retry as text. Send a template.