Response format
Standard envelope for list and single-record responses
This reference documents the response format for all Partners API endpoints, including list responses, single-document responses, create/update/delete responses, and the fields removed by response sanitisation.
List response
All GET requests to collection endpoints (without an ID) return a paginated list response.
HTTP status: 200
Shape
{
"docs": [
{ "id": "...", "title": "...", "..." : "..." },
{ "id": "...", "title": "...", "..." : "..." }
],
"totalDocs": 47,
"limit": 10,
"totalPages": 5,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": true,
"prevPage": null,
"nextPage": 2
}Fields
| Field | Type | Description |
|---|---|---|
docs | array | Array of document objects |
totalDocs | number | Total number of documents matching the query |
limit | number | Maximum documents per page |
totalPages | number | Total number of pages |
page | number | Current page number (1-indexed) |
pagingCounter | number | Index of the first document on this page (1-indexed) |
hasPrevPage | boolean | true if a previous page exists |
hasNextPage | boolean | true if a next page exists |
prevPage | number or null | Previous page number, or null on the first page |
nextPage | number or null | Next page number, or null on the last page |
When pagination=false is set, pagination metadata fields may be absent and all matching documents are returned in docs.
Single-document response
GET requests with an ID return the document as a flat JSON object (not wrapped in a docs array).
HTTP status: 200
Shape
{
"id": "6639a1c2f3b4a5d6e7f90001",
"title": "La Traviata",
"slug": "la-traviata-autumn-2025",
"startDate": "2025-10-15T18:30:00.000Z",
"createdAt": "2025-06-01T10:00:00.000Z",
"updatedAt": "2025-06-15T08:00:00.000Z"
}Create response
POST requests return the newly created document.
HTTP status: 201
Shape
The created document as a flat JSON object, identical in shape to a single-document response.
{
"id": "6639a1c2f3b4a5d6e7f90099",
"title": "Swan Lake",
"slug": "swan-lake-winter-2025",
"createdAt": "2025-07-15T10:00:00.000Z",
"updatedAt": "2025-07-15T10:00:00.000Z"
}Update response
PATCH and PUT requests return the full updated document.
HTTP status: 200
Shape
The updated document as a flat JSON object, with all fields reflecting their current values after the update.
Delete response
DELETE requests return the deleted document.
HTTP status: 200
Shape
The deleted document as a flat JSON object.
Response sanitisation
Before returning any document, the API applies a sanitisation process that removes internal and integration-specific fields. These fields are stripped recursively from the document and all nested objects.
Fields removed
| Field | Reason |
|---|---|
tenant | Internal multi-tenancy field; for group-shared reads it may identify another member of your tenant group |
slugLock | Internal CMS lock state |
themeTemplate | Internal theme configuration |
spektrix | Spektrix integration data (internal) |
elevent | Elevent integration data (internal) |
renderMode | Internal rendering configuration |
These fields are removed from the top-level document and from all nested objects, including populated relationships, blocks, and array items.
Data transformations
Before returning documents, the API normalizes CMS-shaped data into consumer-friendly output:
- Rich text fields include rendered HTML via
_htmlcompanion fields. - Relationship wrappers are unwrapped to plain objects/arrays.
- Block field data is flattened into direct block properties.
- Custom attributes are exposed under
attributes.custom.
This is always applied. Treat API responses as the canonical shape for integrations.
Common response fields
Most documents include these standard fields:
| Field | Type | Description |
|---|---|---|
id | string | Unique document identifier (always present) |
createdAt | string (ISO 8601) | Timestamp when the document was first created |
updatedAt | string (ISO 8601) | Timestamp of the last modification |
Error response
All error responses follow a consistent format.
Shape
{
"error": "Unauthorized",
"message": "Valid API key required",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}| Field | Type | Description |
|---|---|---|
error | string | Short error category |
message | string | Human-readable description |
requestId | string | Unique identifier for the request (useful for support) |
The requestId field is included in most error responses. Some early-stage errors (such as version validation) may omit it.
See Error reference for all error codes.
Content-Type
All responses use Content-Type: application/json. Response bodies are pretty-printed with 2-space indentation.
Related
- Error reference -- all error codes and messages
- Collections overview -- all available collections
- How to sort and paginate -- using pagination metadata