Keystone Developers
Open Keystone
Guides

Conventions

Envelopes

The SuccessResponse wrapper every 2xx carries, and the metadata it can include.

Every successful JSON response from SOR is wrapped:

{
  "request_id": "7f9d1c2e-...",
  "success": true,
  "data": { ... },
  "metadata": null,
  "meta": null
}
FieldTypeNotes
request_idstringUnique per request. Quote it when reporting a problem.
successtrueAlways true on this envelope. Errors use a different shape; see Errors.
dataobject or arrayThe payload. Its schema is the SuccessResponse_<Name>_ type on the endpoint, where <Name> is the inner model.
metadataResponseMetadata or nullTiming and pagination where an endpoint pages.
metaResponseMeta or nullEndpoint-specific extras, such as the business's time zone or a freshness marker.

Reading the reference

On an endpoint's page the 200 response is labelled with the envelope type, for example SuccessResponse_PublicService_. Expand it to see data and its fields. The inner model is what you will work with; the envelope is the same everywhere.

Lists

List endpoints return data as an array. Where a list pages, metadata carries the page and total; the query parameters that drive it are on the endpoint (page, limit, offset, or a cursor, depending on the resource).

Non-JSON responses

A few endpoints return a file (a sitemap, an llms.txt, a media download) or a server-sent event stream. They are marked by their content type in the reference and carry no envelope.

Heimdal

The auth service returns plain JSON bodies without the SOR envelope. Each endpoint's response schema is shown as-is.