Skip to content

Errors and limits ​

Errors are JSON: { "error": "human readable", "code": "MACHINE_CODE" }. Branch on code, not the message.

HTTPCodeMeaningWhat to do
400BAD_REQUESTMissing or invalid fields, or text too long.Fix the request.
400BAD_PHONEMissing or invalid phone number.Use international format.
401Missing or wrong key.Check the header and key.
404NOT_FOUNDUnknown route or app.
404NO_MEDIAThe message has no media.
409NOT_READYThe app is not connected.Retry later; check /api/status.
409APP_LIMITA provisioning key reached maxApps.
413TOO_LARGEBody over 25 MB.
422NOT_REGISTEREDThe number is not on WhatsApp.Do not retry.
422BAD_MEDIA, BAD_RECIPIENTUnusable media or recipient.
429RATE_LIMITEDRate limited (provisioning creates). Message sends return 429 too.Wait for Retry-After.
500INTERNALUnexpected server error.Retry with backoff.

Rate limits ​

POST /api/messages and POST /api/messages/media use a per-app token bucket, default 30 requests per minute (RATE_LIMIT_PER_MINUTE). Over the limit you get 429 with Retry-After and X-RateLimit-Remaining headers. Raise it for one app with PATCH /api/apps/:id {"rateLimitPerMin": 120} (null resets to the default).

Provisioning keys are also limited to PROVISION_CREATES_PER_HOUR new apps per hour.

Retry rules of thumb ​

  • Retry 409 NOT_READY, 429 and 500 with backoff.
  • Never retry 422 NOT_REGISTERED.
  • Never resend automatically after status: "unconfirmed".

Released under the Apache-2.0 License.