v4

latestOpenAPI 3.1.02026-08-01207318738.7 KB
Documents

Create draft and patch document

Create a new draft on the published document and apply the patch. No auto-publish — the response includes the new draftIdentifier for follow-up calls.

Pass an optional branchId to attach the draft to a branch; omit it for a draft on the main (unpublished) workspace.

patch/api/v2/documents/{identifier}/draft

Path parameters

identifierstring required

Document identifier — either the URL slug (e.g. abc123) or the canonical workbook UUID.

Example:abc123

Document identifier — either the URL slug (e.g. abc123) or the canonical workbook UUID.

Request body

descriptionstring nullable
namestring

Document name.

summarystring

Optional. Caller-supplied description of what this patch changes, written to the history audit trail. When omitted, the server auto-generates one from the touched sections.

modelIdstring uuid

The document's base model. Immutable and accepted only so a GET response round-trips through PATCH: a value matching the current model is a no-op, and a differing value is rejected — it cannot re-base the document. Omit it to leave the model untouched.

workbookModelIdstring uuid

The server-assigned workbook-layer model. Read-only and accepted only so a GET response round-trips through PATCH: a value from a GET of the draft or of the published document it targets is a no-op, and any other value is rejected. Omit it otherwise.

branchIdstring uuid

Branch the draft is created on. Omit for a draft on the main (unpublished) workspace.

Response

Draft created and patch applied successfully.

descriptionstring nullable required

Document description.

draftIdentifierstring required

Identifier of the draft the patch was applied to.

identifierstring required

Published document identifier the draft targets.

namestring required

Document name.