Documents

Create draft and patch document

Changed on

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.

A document has at most one draft per branch. If one already exists, this returns 409 — patch it via PATCH /api/v2/documents/{identifier}/draft/{draftIdentifier}, publish it, or discard it via DELETE /api/v1/documents/{identifier}/draft.

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

Request

  • Base URL
    https://omniapp.co (the document declares no server; this is the origin it was published from)
  • URL
    https://omniapp.co/api/v2/documents/{identifier}/draft
  • Auth
    HTTP bearer

Path parameters

identifierstring required

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

Example:abc123

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.

Changes

    • breaking

      removed subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 from the /// request property oneOf list

    • breaking

      removed subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 from the ///// request property oneOf list

    • breaking

      removed subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 from the ///// request property oneOf list

    • info

      added subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 to the /// request property oneOf list

    • info

      added subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 to the ///// request property oneOf list

    • info

      added subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 to the ///// request property oneOf list

    • breaking

      the request's body type changed from no type to object

    • warning

      removed subschema #2 from the request body allOf list

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property