Skip to main content

Response envelope

All API routes return a consistent JSON envelope. Success (HTTP 2xx):
{
  "success": true,
  "data": { /* route-specific payload */ }
}
Error (HTTP 4xx / 5xx):
{
  "success": false,
  "error": "Human-readable message",
  "code": "MACHINE_READABLE_CODE"
}
The code field is a stable, machine-readable identifier you can use for programmatic error handling. Common codes are listed below.

Common status codes

StatusCodeMeaning
200Successful read or mutation.
400VALIDATION_ERRORInvalid payload or missing required fields.
401UNAUTHORIZEDAuthentication missing or invalid.
403FORBIDDENAuthenticated but insufficient permissions.
404NOT_FOUNDResource not found.
409CONFLICTState conflict such as a duplicate handle.
429RATE_LIMITEDToo many requests — back off and retry.
500INTERNAL_ERRORUnexpected server-side failure.

Error handling guidance

  • Check the top-level success field before accessing data.
  • Use the code field for programmatic branching (e.g. retry on RATE_LIMITED, prompt re-auth on UNAUTHORIZED).
  • Treat writes as retriable only when idempotency is guaranteed by the route.
  • Surface the error message in client logs for operational debugging.

Where to verify

Route-specific responses are defined in the OpenAPI endpoint docs under the API Reference > Endpoints group.