cURL
curl --request GET \
--url https://api.nohead.io/v1/records/{record_id}/diff \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.records.diff(
"rec_01J9ZQ3F8X",
{ from: 1, to: 2 },
{ richText: "markdown" }
)
from nohead import Nohead
nohead = Nohead()
result = nohead.records.diff(
"rec_01J9ZQ3F8X", from_revision=1, to_revision=2, rich_text="markdown"
)
require "nohead"
nohead = Nohead::Client.new
result = nohead.records.diff("rec_01J9ZQ3F8X", from: 1, to: 2, rich_text: "markdown")
{
"object": "record_diff",
"record_id": "<string>",
"from": 123,
"to": 123,
"changes": [
{
"kind": "added",
"field": "<string>",
"field_id": "<string>",
"field_deleted": true,
"attribute": "published_at",
"before": "<unknown>",
"after": "<unknown>"
}
]
}{
"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>"
}
]
}
}Revisions
Compare two revisions
GET
/
v1
/
records
/
{record_id}
/
diff
cURL
curl --request GET \
--url https://api.nohead.io/v1/records/{record_id}/diff \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.records.diff(
"rec_01J9ZQ3F8X",
{ from: 1, to: 2 },
{ richText: "markdown" }
)
from nohead import Nohead
nohead = Nohead()
result = nohead.records.diff(
"rec_01J9ZQ3F8X", from_revision=1, to_revision=2, rich_text="markdown"
)
require "nohead"
nohead = Nohead::Client.new
result = nohead.records.diff("rec_01J9ZQ3F8X", from: 1, to: 2, rich_text: "markdown")
{
"object": "record_diff",
"record_id": "<string>",
"from": 123,
"to": 123,
"changes": [
{
"kind": "added",
"field": "<string>",
"field_id": "<string>",
"field_deleted": true,
"attribute": "published_at",
"before": "<unknown>",
"after": "<unknown>"
}
]
}{
"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
Required range:
x >= 1Required range:
x >= 1How rich text values read in changes: document, the stored ProseMirror JSON document, or written as html or markdown, as records read with rich_text. Record history and webhooks keep documents. A change that HTML or Markdown can't show (an underline, in Markdown) reads the same on both sides. In HTML and Markdown, text from before a field became rich text reads as paragraphs; an older value that is no document of today's vocabulary, or a redacted one, is kept as stored.
Available options:
document, html, markdown