One published document by id
GET
/documents/{id}
const url = 'http://localhost:3000/api/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Responses
Section titled “Responses”One document.
Media typeapplication/json
object
document
required
object
id
required
string format: uuid
collection
required
string
slug
required
string
path
required
The URL of the document on the site.
string
versionId
required
The published version. Null in a preview.
string | null format: uuid
publishedAt
required
string | null format: date-time
data
required
The field values. A media field is a Media object or null. A richText field is the
TipTap JSON plus html, the sanitized HTML, or null. A blocks field is a list of objects with _id, _type and
the block fields. A relation field is a RelatedDocument or null, or with multiple a list of RelatedDocument:
published targets only.
object
key
additional properties
any
Example generated
{ "document": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "collection": "example", "slug": "example", "path": "example", "versionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "publishedAt": "2026-04-15T12:00:00Z", "data": {} }}Headers
Section titled “Headers”ETag
string
Send it back in If-None-Match to get a 304.
The ETag in If-None-Match is current. No body.
No such collection, published document or media.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "bad_request"}Too many requests from this address.
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "bad_request"}Headers
Section titled “Headers”Retry-After
integer