Appearance
Update Document
Update document content or metadata. Requires authentication, the DOCUMENTS feature flag, and ADMIN, UPDATE_DOCUMENT, or MANAGE_DOCUMENTS permissions.
Parameters
| name * are required parameters | data type | description |
|---|---|---|
documentId* | string | The unique identifier of the document. |
body.title | string | Updated display title. An empty string does not change the title. |
body.description | string | Updated description; use an empty string to clear it. |
body.metadata | object | Metadata fields to update. Provided keys are merged into the existing metadata. |
body.metadata.category | string[] | Document categories. |
body.metadata.tags | string[] | Document tags. |
body.metadata.startDate | number or null | Start timestamp in milliseconds since the Unix epoch, or null to clear it. |
body.metadata.endDate | number or null | End timestamp in milliseconds since the Unix epoch, or null to clear it. |
body.isFolder | boolean or null | Whether the draft represents a folder. |
body.filePath | string or null | Path to an existing file in the target storage bucket. Null clears the draft file path and type. |
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. Use an empty array to clear the rules. |
body.docString | string or null | Serialized editor JSON for the draft content. Null clears this field; providing it also clears the legacy doc field. |
body.doc | object or null | Legacy field accepted by validation. The current service does not save the supplied object; use docString for content updates. |
body.parentDocumentId | string or null | Updates the root document parent reference; a nonempty ID must identify an existing, nonremoved document. The handler does not validate this field. |
body.acknowledgmentVersion | number | Triggers advancement to the current published version only when the existing acknowledgment version is lower. The supplied number is not assigned directly. |
body.updatedAt | number | Legacy timestamp accepted for compatibility. This endpoint does not enforce a timestamp conflict check. |
Send update fields directly in the body, without an updates wrapper. Content, file, and folder edits affect the draft and increment draftVersion on the first edit after publication. Title, description, metadata, and ACL changes apply to both the root and draft records without opening a new draft version. Missing drafts, removed drafts, externally managed drafts, and nonexistent files are rejected with HTTP 400.
Changing parentDocumentId updates the new parent, but the current service does not remove the reference from the previous parent. It does not perform a complete move between parents.
Return Value
HTTP 201 Created. The JSON body is:
json
{
"message": "Successfully updated your document",
"data": null
}Examples
bash
curl -X POST "https://app.wombat.software/api/{targetPath}/document/:documentId" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ..." \
-d '{"title": "Updated Safety Policy", "metadata": {"tags": ["safety"]}}'ENDPOINTS
post
/api/{targetPath}/document/:documentId