Error Response Format
Every error response has the same top-level shape: anerror object containing a machine-readable code, a human-readable message, and an optional details object with additional context specific to the error type.
HTTP Status Codes
The API uses standard HTTP status codes to indicate the outcome of every request. Your client should handle status codes at the transport layer before inspecting the error body.Common Error Codes
The table below lists the error codes you are most likely to encounter across all endpoints. Use these codes to branch your error-handling logic appropriately.Retry Strategy
Not all errors are worth retrying. The right approach depends on the HTTP status code:Retry
429 and 5xx errors with exponential backoff. These indicate transient conditions — rate limits or temporary server issues — that are likely to resolve on their own. Start with a 1-second delay and double it on each subsequent retry (e.g. 1s → 2s → 4s → 8s), with a maximum of 3–5 attempts. Respect the Retry-After header when present on 429 responses.Do not retry 4xx errors (except 429). A 400, 401, 403, 404, 409, or 422 response indicates a problem with your request that will not resolve by repeating it. Fix the underlying issue in your code or data before sending another request.Validation Errors
When a request fails field-level validation (HTTP422), the details object includes a fields array. Each entry in the array identifies the specific field that failed and explains why, so you can map errors directly to form inputs or log them for debugging.
fields array has the following structure: