Skip to main content
Every endpoint in every service answers with one of two envelopes. You write the parsing code once.

The success envelope

A success body always carries success: true, the operation that names the payload shape, the payload itself, and a meta block. A search response in full:
Points worth knowing:
  • items[] splits item from included. The item is always the same typed shape; relations you request via include arrive next to it under included, never mixed into it.
  • counts covers the full filter scope, not the page. With 50 rows shown out of 1,000 matching, counts.total_count is 1000.
  • applied_filters echoes what the server actually applied, so a client (or an AI agent) can confirm the query it asked for is the query that ran.
  • meta.trace_id is the support handle. It is a UUID v7, identical to the X-Trace-Id response header. Quote it when reporting an issue.

The credits block

Operations marked creditable in the reference can debit the team’s credit ledger, and their responses carry a credits block:
charged is the debit for this call (0 on an own-account execution or a cache hit), executed_on says whether your own account or the infrastructure pool did the work, and balance_after is the team balance after the debit (null when the ledger was untouched).

The error envelope

Every failure, from any service, is the same shape:
  • code is always one of the 16 values below, never an arbitrary string.
  • recoverable says whether retrying with corrected input can succeed (true) or the state itself is the problem (false).
  • field_errors appears only on validation_failed, keyed by field.
  • delete_blocked errors additionally carry error.blockers[]: each blocker names its type, a hard or soft severity, and the resolution that clears it.

The 16 error codes

A practical mapping: retry rate_limited and service_unavailable with backoff, fix and resend validation_failed and relation_not_found, treat the 409 family as “re-read the current state first”, and never auto-retry not_implemented or internal_error.