curl --request GET \
--url https://api.nohead.io/v1/collections/{collection_id}/drafts \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
for await (const draft of nohead.drafts.list("posts")) {
console.log(draft)
}
from nohead import Nohead
nohead = Nohead()
for draft in nohead.drafts.list("posts"):
print(draft)
require "nohead"
nohead = Nohead::Client.new
nohead.drafts.list("posts").each do |draft|
puts draft
end
{
"data": [
{
"id": "drf_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"object": "draft",
"record_id": "<string>",
"collection_id": "<string>",
"collection": "<string>",
"base_revision": 123,
"revision": 123,
"data": {
"title": "Introducing Foo",
"body": {
"type": "doc",
"content": []
}
},
"changed_fields": [
"<string>"
],
"schedule": {
"merge_at": "2023-11-07T05:31:56Z",
"last_error": "<string>"
},
"created_by": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"edited_by": [
{
"type": "user",
"id": "<string>",
"name": "<string>"
}
],
"created_at": "2026-09-27T12:00:00.000Z",
"updated_at": "2026-09-27T12:00:00.000Z",
"expanded": {}
}
],
"meta": {
"next_cursor": "<string>",
"has_more": true
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}List drafts
The drafts of the collection’s records, most recently changed first,
for “changes pending” badges: a record’s representation is only its
content. One record’s draft is GET /v1/records/{record_id}/drafts.
Deleted records’ drafts are left out. Published-only API keys get
403.
curl --request GET \
--url https://api.nohead.io/v1/collections/{collection_id}/drafts \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
for await (const draft of nohead.drafts.list("posts")) {
console.log(draft)
}
from nohead import Nohead
nohead = Nohead()
for draft in nohead.drafts.list("posts"):
print(draft)
require "nohead"
nohead = Nohead::Client.new
nohead.drafts.list("posts").each do |draft|
puts draft
end
{
"data": [
{
"id": "drf_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"object": "draft",
"record_id": "<string>",
"collection_id": "<string>",
"collection": "<string>",
"base_revision": 123,
"revision": 123,
"data": {
"title": "Introducing Foo",
"body": {
"type": "doc",
"content": []
}
},
"changed_fields": [
"<string>"
],
"schedule": {
"merge_at": "2023-11-07T05:31:56Z",
"last_error": "<string>"
},
"created_by": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"edited_by": [
{
"type": "user",
"id": "<string>",
"name": "<string>"
}
],
"created_at": "2026-09-27T12:00:00.000Z",
"updated_at": "2026-09-27T12:00:00.000Z",
"expanded": {}
}
],
"meta": {
"next_cursor": "<string>",
"has_more": true
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Authorizations
Project-scoped API key, e.g. nohead_sk_k7fz0a9c3m2q_<secret>, or
nohead_pk_… for a published-only key. Used by servers, CI, the CLI
and coding agents.
Path Parameters
Collection ID, or the collection slug when authenticating with an API key.
Query Parameters
How rich text fields read in the records and drafts returned (and in records they embed with expand): document, the stored ProseMirror JSON document; html, an HTML fragment of known elements with every text and attribute escaped, to put in a page as it is; or markdown (GitHub Flavored), which reads back as the same document when written. Images render with their URLs, so they need no expand: in HTML a WebP rendition at most 1600 pixels wide with its width and height (an SVG as itself), in Markdown the asset's image_url. An image whose asset was deleted is left out of HTML, and written as its asset ID in Markdown. Record history keeps documents.
document, html, markdown updated_at, -updated_at Page size.
1 <= x <= 100The next_cursor from the previous page.