Appearance
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 parameters | data type | description |
|---|---|---|
body.title* | string | The display title of the document. |
body.description | string | The document description. |
body.filePath | string | Path to an existing file in the target storage bucket. Upload the file before creating the document. |
body.isFolder | boolean or null | Whether the document represents a folder. |
body.parentDocumentId | string or null | Existing, nonremoved parent document. Omit or use null for the library root. |
body.acl | object[] | 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:
| field | data type | description |
|---|---|---|
message | string | Successfully created your document |
data | DocumentObject | The 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