DevelopersErrors & rate limits Browse docs

Errors & rate limits

Every error the Wazline API can return, what it means, and how to handle it.

Error format

Errors return a non-2xx status code and a JSON body:

{
  "success": false,
  "error_code": "template_not_found",
  "message": "No approved template with that name was found."
}

Use error_code in your code — it doesn’t change. message is a human-readable explanation and may be reworded.

Error codes

Statuserror_codeMeaning
401invalid_tokenThe Authorization header is missing, or the token is wrong, was regenerated, or belongs to a disabled or deleted client.
403host_not_allowedThe Origin or Referer header is missing, or doesn’t match the client’s Allowed Host.
403number_mismatchThe request named a different WhatsApp number from the token’s. Leave whatsapp_number_id out — the token already identifies the number.
404template_not_foundNo approved, synced template with that name exists for the token’s number.
422invalid_payloadA required field is missing or has the wrong type.
422params_mismatchThere are fewer template values than variables, or a value is empty.
422invalid_numberThe phone number couldn’t be read. Include the country code.
422window_closedText messages only: the customer hasn’t written in the last 24 hours.
422number_not_foundText messages only: no WhatsApp number is linked to the token.
429—Too many requests — see below.
502send_failedWhatsApp rejected the send.

Rate limits

Each endpoint accepts 60 requests per minute from the same IP address. Above that you’ll get 429 Too Many Requests. Wait the number of seconds in the Retry-After header, then try again.

For large volumes, queue messages on your side and send them at a steady pace. To message a whole list at once, use a campaign instead.

Handling errors

  • 401 and 403 — a configuration problem. Don’t retry; fix the token, the host or the number.
  • 404 and 422 — a problem with the request. Correct the data before retrying.
  • 429 — wait for Retry-After, then retry.
  • 502 — WhatsApp refused the message. Retry once after a short delay; if it keeps failing, check the template and the recipient’s number.

Phone number format

The to field accepts international numbers in the usual formats: +971501234567, 971501234567, 00971501234567, and with spaces or dashes. A number that starts with a single 0 (local format) is rejected — always include the country code.

Still have questions?

Our team is happy to walk you through Wazline and help you set up your workspace.

Contact us