Skip to main content
PATCH
/
v2
/
documents
/
{documentId}
/
draft
/
{draftId}
Patch draft
curl --request PATCH \
  --url https://{instance}.omniapp.co/api/v2/documents/{documentId}/draft/{draftId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "queryPresentations": {
    "data": {
      "2": {
        "type": "query",
        "name": "Revenue by month",
        "subTitle": "Trailing 12 months",
        "topicName": "order_items",
        "query": {
          "fields": [
            "order_items.created_at[month]",
            "order_items.sale_price_sum"
          ]
        }
      }
    }
  }
}
'
{
  "identifier": "<string>",
  "draftIdentifier": "<string>",
  "name": "<string>",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

documentId
string
required

The published document's URL slug (e.g. abc123) or its canonical workbook UUID.

draftId
string
required

The draft workbook identifier the patch is applied to.

Body

application/json

The content/metadata diff applied to a draft. All fields optional — only the sections present are changed.

name
string

Document name.

Required string length: 1 - 254
description
string | null

Document description.

summary
string

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

Required string length: 1 - 255
queryPresentations
object

Query presentations (tabs/tiles) keyed by record key.

controls
object

Dashboard filters/controls keyed by control ID.

settings
object

Document settings. Shallow-merged with the existing settings.

containers
object[]

Container layout. When present, fully replaces the existing layout.

Response

Patch applied to draft successfully.

identifier
string
required

Published document identifier the draft targets.

draftIdentifier
string
required

Identifier of the draft the patch was applied to.

name
string
required

Document name.

description
string | null
required

Document description.