Docs / Shared / Response envelope

Response envelope

Every response — success or failure, collection or single resource — has the same three top-level keys. Write your client once and point it at any dataset.

The shape

{
  "data": [ … ],
  "meta": { "count": 25, "next": "eyJvIjoyfQ", "request_id": "req_9Fv3" },
  "error": null
}

Fields

FieldTypeDescription
data array | object The result. An array for collections, one object for a single resource.
meta object Pagination and request metadata. Always present.
meta.next string · nullable Opaque cursor for the following page. null on the last page.
meta.count integer · nullable Items in data. Present for collections only.
meta.total integer · nullable Rows the FILTER matches across every page, not just this one. Present only when you ask with `?count=true`, because it costs a second query.
meta.requested integer · nullable Ids you sent. Batch endpoints only.
meta.answered integer · nullable Rows in data. Batch endpoints only, and equal to `requested` by contract — a batch either answers every id or fails.
meta.request_id string Quote this when reporting a problem.
error object · nullable null on success. On failure, carries code and message.