Create and publish document
Create and publish a brand-new document.
Workbook-only documents: Set containers to null to create a workbook-only document (query presentations with no dashboard layout). Omit containers entirely to auto-generate a dashboard with tiles auto-placed. Pass an array to define a custom layout. A workbook-only document can later be upgraded to include a dashboard by patching it with containers.
Because this is the first publication of brand-new content, it is not subject to the organization’s requirePullRequestToPublish policy, which gates edits to existing content.
Content sections
queryPresentations— Tabs/tiles keyed by record key inqueryPresentations.data(e.g."1","2").datais shallow-merged by key;order(when present) replaces the tab order. Tile keys don’t need to start at"1"— if the request supplies any tiles of its own, the blank seed tile normally created at key"1"is dropped automatically. A request with no tiles still gets that single blank seed tile at"1".controls— Dashboard filters/controls keyed by control ID.datais shallow-merged by key (data.{id}: nulldeletes a control);order(when present) replaces the control order.settings— Dashboard settings, shallow-merged per key:controlBar(collapsible/defaultExpanded/fixed),crossfilterEnabled,customText(queryError/queryNoResults),facetFilters,refreshInterval,runQueriesOn.containers— The dashboard layout. On create:nullcreates a workbook-only document (no dashboard), omit to auto-generate a dashboard, or pass an array for a custom layout. On patch, when present it fully replaces the existing layout (grid / stack / page / reference containers, recursively nested).
Creating an app document
app property is currently in development and may change.app: { html, settings? } to create the document as an app instead of a dashboard. Apps must be enabled for the organization or the API will return an error. If the caller is using a PAT, the token must have permission to create apps.
app is mutually exclusive with containers (including an explicit null), controls, and settings — combining app with any of these returns a 400. queryPresentations can still be sent alongside app.
Migrating from v1
The v1 one-shotPUT /v1/documents/{documentId} maps to the v2 Create > Patch draft > Publish workflow. For a brand-new document, a single request to this endpoint is enough. To edit an existing document, use Create draft and patch document then Publish draft.
PATCH endpoint for full document updates that includes identifier changes. To rename a published document’s identifier, use the Rename document identifier endpoint.
There is also no narrative field — AI summaries attach as linked-type query presentations. See Create draft and patch document for more information.Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Body
The folder to create the document in; Editor permissions or higherer are required on this folder. Does not apply to Organization Admins.
When omitted, defaults to the caller's personal My documents, which requires permission to save personal content or the request is rejected.
Response
Document created and published successfully.

