Skip to content

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 parametersdata typedescription
documentId*stringThe unique identifier of the document.
body.titlestringUpdated display title. An empty string does not change the title.
body.descriptionstringUpdated description; use an empty string to clear it.
body.metadataobjectMetadata fields to update. Provided keys are merged into the existing metadata.
body.metadata.categorystring[]Document categories.
body.metadata.tagsstring[]Document tags.
body.metadata.startDatenumber or nullStart timestamp in milliseconds since the Unix epoch, or null to clear it.
body.metadata.endDatenumber or nullEnd timestamp in milliseconds since the Unix epoch, or null to clear it.
body.isFolderboolean or nullWhether the draft represents a folder.
body.filePathstring or nullPath to an existing file in the target storage bucket. Null clears the draft file path and type.
body.aclobject[]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.docStringstring or nullSerialized editor JSON for the draft content. Null clears this field; providing it also clears the legacy doc field.
body.docobject or nullLegacy field accepted by validation. The current service does not save the supplied object; use docString for content updates.
body.parentDocumentIdstring or nullUpdates the root document parent reference; a nonempty ID must identify an existing, nonremoved document. The handler does not validate this field.
body.acknowledgmentVersionnumberTriggers advancement to the current published version only when the existing acknowledgment version is lower. The supplied number is not assigned directly.
body.updatedAtnumberLegacy 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