Skip to content

Duplicate Document

Create a new draft from the root record of a published document. Unpublished draft edits are not copied. Requires authentication, the DOCUMENTS feature flag, and ADMIN, CREATE_DOCUMENT, or MANAGE_DOCUMENTS permissions.

Parameters

name * are required parametersdata typedescription
documentId*stringThe unique identifier of the document.

No request body is used. The source must exist and have a publishedAt value; otherwise the request returns HTTP 400. The organization-only target (organization/:orgId) is rejected with HTTP 400 because this handler requires a tenant ID for organization targets.

The copy retains the root title (with the prefix), description, folder flag, file path, parent ID, editor content, and links. It receives fresh metadata and comments; ACL rules, workflow customizations, acknowledgment settings, distribution settings, and version history are not copied. File paths are reused, rather than creating a new storage file.

Return Value

HTTP 201 Created. The JSON body contains:

fielddata typedescription
messagestringSuccessfully duplicated the document
dataDocumentObjectThe new draft document with a new id, title prefixed with COPY - , state: "draft", version: 0, and draftVersion: 1.

Examples

bash
curl -X POST "https://app.wombat.software/api/{targetPath}/document/:documentId/duplicate" \
  -H "Authorization: Bearer ..."

ENDPOINTS

post/api/{targetPath}/document/:documentId/duplicate