curl --request GET \
--url https://api.nohead.io/v1/records/{record_id}/drafts \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
for await (const draft of nohead.records.drafts("rec_01J9ZQ3F8X")) {
console.log(draft)
}
from nohead import Nohead
nohead = Nohead()
for draft in nohead.records.drafts("rec_01J9ZQ3F8X"):
print(draft)
require "nohead"
nohead = Nohead::Client.new
nohead.records.drafts("rec_01J9ZQ3F8X").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 a record's drafts
The record’s draft, as a list: a record has at most one for now. Empty
while the record is deleted, whose draft is hidden until it is
restored. Published-only API keys get 403.
curl --request GET \
--url https://api.nohead.io/v1/records/{record_id}/drafts \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
for await (const draft of nohead.records.drafts("rec_01J9ZQ3F8X")) {
console.log(draft)
}
from nohead import Nohead
nohead = Nohead()
for draft in nohead.records.drafts("rec_01J9ZQ3F8X"):
print(draft)
require "nohead"
nohead = Nohead::Client.new
nohead.records.drafts("rec_01J9ZQ3F8X").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
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 Page size.
1 <= x <= 100The next_cursor from the previous page.