Skip to content

When the API says no

The shape of an error response, and what it means.

Error responses always have the same shape, so you can handle them in one place.

{ "success": false, "error": { "code": "UNAUTHENTICATED", "message": "..." } }

The ones you will see

StatusMeaningWhat to do
401Key wrong, revoked, or not sentCheck the Authorization header.
403The key is valid but not permittedLikely an ordinary key calling a reseller endpoint.
422The payload failed validationRead the message — it names the field.
429Rate limitedWait as instructed, then retry.
503Our proxy network could not be reached for nowWait as Retry-After says if it is sent (if not, wait a few seconds and back off further each time), then send the same request again. This is not a fault in your request.

Retrying

Retry on 429 and 503, backing off as you go. A 502 or 504 is never our answer — it is a page from the CDN in front of our servers; treat it like a 503. Do not retry 401, 403 or 422 — the same request will be refused the same way.