Skip to main content
POST
Apply Changeset
Applies a changeset atomically: all operations commit or none do. This is the only direct write path for page content and structure. Base revision numbers and checksums in the operations guard against concurrent edits; a guarded mismatch returns HTTP 409 with the same typed body and structured conflicts instead of a partial write. Requirements: instructions:write + workspace EDITOR or OWNER + a verified (claimed) account.

Request

The shared changeset body (see validate). Send an Idempotency-Key header: replaying the same key returns the original result with idempotentReplay: true; the same key with a different body is a 409.

Response

Returns 200 when applied, 409 (same body shape) when conflicted.
boolean
Whether the write committed.
string | null
The recorded changeset (status APPLIED).
boolean
true when the Idempotency-Key matched a previously applied changeset.
object[]
New head revisions per touched manual: {manualId, revisionNumber}.
object[]
New per-page revisions: {pageId, revisionNumber, checksum} — including server-assigned ids for pages created via new: keys.
object[]
Structured conflicts when applied is false. On REVISION_MISMATCH, re-read the page, rebase your operations, and retry.