Skip to main content
POST
/
v2
/
documents
curl --request POST \
  --url https://{instance}.omniapp.co/api/v2/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "modelId": "b81e4679-1234-4abc-9def-0123456789ab",
  "name": "Q2 Revenue"
}
'
{
  "identifier": "q2-revenue",
  "name": "Q2 Revenue",
  "description": "Quarterly revenue review"
}

Field constraints

FieldLimitError (400)
name (document)1–254 charactersname cannot be empty · name must be 254 characters or fewer
summary1–255 characters, optionalsummary cannot be empty · summary must be 255 characters or fewer
queryPresentations.data.{key}.name1–144 charactersname must be 144 characters or fewer
queryPresentations.data.{key}.subTitle≤ 250 characterssubTitle must be 250 characters or fewer
queryPresentations.data.{key}.description≤ 500 charactersdescription must be 500 characters or fewer
queryPresentations.data≤ 48 non-null entries per requestA single patch may carry at most 48 query presentations.
summary is a note written to the document’s history audit trail; it is never returned by reads. On create it defaults to "Created document" when omitted. Null queryPresentations.data entries (deletions) do not count toward the 48-entry cap.

Content sections

  • queryPresentations — tabs/tiles keyed by record key. data is shallow-merged by key; order (when present) replaces the tab order.
  • controls — dashboard filters/controls keyed by control ID. data is shallow-merged by key (data.{id}: null deletes a control); order (when present) replaces the control order.
  • settings — dashboard settings, shallow-merged per key: crossfilterEnabled, customText (queryError / queryNoResults), facetFilters, refreshInterval, runQueriesOn.
  • containers — the dashboard layout. When present it fully replaces the existing layout (grid / stack / page / reference containers, recursively nested).

Migrating from v1

The v1 one-shot PUT /api/v1/documents/{documentId} (Update dashboard document) maps to the v2 create → patch draft → publish workflow. For a brand-new document, a single POST /api/v2/documents is enough. To edit an existing document, use PATCH /api/v2/documents/{documentId}/draft then POST /api/v2/documents/{documentId}/draft/publish.
v1 PUT fieldv2 location
modelIdmodelId (create only — not a patch field)
name / descriptionname / description
facetFilters (top-level)settings.facetFilters
refreshInterval (top-level)settings.refreshInterval
filterConfig / filterOrdercontrols.data / controls.order
documentMetadata (presentation)settings.* / containers
queryPresentations (array)queryPresentations.data (keyed) + queryPresentations.order
clearExistingDraftRemoved. A pre-existing draft now returns 409; patch that draft or publish/discard it instead.
There is no one-shot PATCH /api/v2/documents/{documentId}, and no narrative field — AI summaries attach as linked-type query presentations (see Create draft and patch document). Renaming via identifier is a v1-only capability (see Update document); on v2, identifier is a create-time field only.

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

Body

application/json
modelId
string<uuid>
required

Base workbook model the document is built on — a SHARED model, or a SHARED_EXTENSION with allowAsWorkbookBase = true.

name
string
required

Document name.

Required string length: 1 - 254
identifier
string

Identifier (URL slug) for the new document. Must be unique within the organization; auto-generated when omitted. Lowercase letters, numbers, hyphens, and underscores only; cannot start or end with a hyphen or underscore.

Pattern: ^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$
description
string | null

Document description.

folderId
string<uuid> | null

Folder to create the document in. When omitted, defaults to the caller's personal "My documents" (requires permission to save personal content — otherwise the request is rejected).

summary
string

Caller-supplied note describing the create, written to the history audit trail. Defaults to "Created document" when omitted.

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 array (grid / stack / page / reference containers, recursively nested). On a patch, when present this fully replaces the existing layout. The server validates the full structure on apply; container instanceKey / referenceKey values round-trip unchanged. See the dashboard layout reference for the complete grammar.

Response

Document created and published successfully.

identifier
string
required

Identifier of the newly created document.

name
string
required

Document name.

description
string | null
required

Document description.