Skip to main content
Every failed API request returns a non-2xx HTTP status and a JSON body with an error code you can program against and a human-readable message.

Error response format

A request to a path that does not exist returns 404 with the body { "error": "Not Found", "path": "/api/..." }. This one response does not use the success / error.code envelope, so check the path and method first if you see it.

HTTP status codes

Error codes

Endpoint pages list the codes that are specific to them. The codes below can occur across the API.

Authentication (401)

Permissions and plan (403)

Validation (400)

Not found and conflicts (404, 409)

Rate limiting (429)

The response also has a Retry-After header (seconds). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). The limit is the same on every plan.

Server errors (5xx)

Handling errors

Check the success flag and branch on error.code:

Retry server errors with backoff

Retry 500 and 503 (and 429 after Retry-After). Do not retry other 4xx errors: the same request will fail again.

Debugging tips

-v shows the status code and rate limit headers.
For VALIDATION_ERROR, message or details names the failing fields. PLAN_LIMIT_EXCEEDED and INSUFFICIENT_PLAN include the limit or required plan in details.
Every response has an X-Request-ID header that identifies the request.