Documents

Publish the document's current main (non-branch) draft, promoting it to the published version. No request body — the draft is consumed, so the response echoes the now-published document metadata.

Only the main draft is publishable here; a branch-attached draft is published by merging its branch (POST /api/v1/models/{modelId}/branch/{branchName}/merge), so a document with no main draft returns 404. Documents that require a pull request to publish return 400.

An organization key may pass userId to act as that member: reads answer with their access, and writes are authorized and recorded as them. A user-scoped key may only name its own user (403); a user outside the organization is a 404, as is a write naming a member who has not accepted their invitation. Naming an embed user who has no live embed session is a 403. Only the operations that document userId take it — the draft-explicit …/draft/{draftIdentifier}/… routes act as the key itself.

post/api/v2/documents/{identifier}/draft/publish

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/publish
  • Auth
    HTTP bearer

Path parameters

identifierstring required

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

Example:abc123

Query parameters

userIdstring uuid

Target user ID (for org-scoped API keys)

Response

Draft published successfully.

descriptionstring nullable required

Document description.

identifierstring required

Published document identifier.

namestring required

Document name.

Changes