Skip to content

Create Document

Create a new document record and its initial draft. Requires authentication, the DOCUMENTS feature flag, and ADMIN, CREATE_DOCUMENT, or MANAGE_DOCUMENTS permissions.

Parameters

name * are required parametersdata typedescription
body.title*stringThe display title of the document.
body.descriptionstringThe document description.
body.filePathstringPath to an existing file in the target storage bucket. Upload the file before creating the document.
body.isFolderboolean or nullWhether the document represents a folder.
body.parentDocumentIdstring or nullExisting, nonremoved parent document. Omit or use null for the library root.
body.aclobject[]Access rules. Each entry requires access (hidden, view, edit, or list) and at least one nonempty userIds, roleIds, or securityProfileIds string array.

Creation accepts only the fields above. To write editor content, create the document first and then update it using docString. Content edits, or updates to filePath or isFolder, open a draft version that can be transitioned for publication.

Return Value

HTTP 201 Created. The JSON body contains:

fielddata typedescription
messagestringSuccessfully created your document
dataDocumentObjectThe newly created document, including its id, title, state, version, draftVersion, and timestamps. Initial state is draft; both version counters start at 0.

Examples

bash
curl -X PUT "https://app.wombat.software/api/{targetPath}/document" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ..." \
  -d '{"title": "Safety Policy", "description": "Workplace safety procedures"}'

ENDPOINTS

put/api/{targetPath}/document