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
| Field | Type | Description |
|---|---|---|
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.request_id |
string | Quote this when reporting a problem. |
error |
object · nullable | null on success. On failure, carries code and message. |