Skip to content

One published document by id

GET
/documents/{id}
curl --request GET \
--url http://localhost:3000/api/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0
id
required
string format: uuid

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": {}
}
}
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
Allowed values: bad_request invalid_token not_found method_not_allowed rate_limited internal moved unavailable cursor_expired
message
required
string

Example

{
"error": "bad_request"
}

Too many requests from this address.

Media typeapplication/json
object
error
required
string
Allowed values: bad_request invalid_token not_found method_not_allowed rate_limited internal moved unavailable cursor_expired
message
required
string

Example

{
"error": "bad_request"
}
Retry-After
integer