Duplicate a document

Create a new document under a new key, starting from a copy of an existing document's content. The source's draft is copied if it has one, otherwise its published version. The copy is a separate document: it starts as an unpublished draft and is disabled, so publish it and then enable it before it is rendered. Its description, product module and entity type are copied from the source.

Documents are shared by your sandbox and production environments, so changing one with an API key requires a production API key. A sandbox API key can read documents but gets 403 here.

Documents are opt-in per organization: unless the org_documents feature flag is enabled for your organization this endpoint returns 404.

Path Params
string
required

Must be a UUID. The unique identifier of the document to copy.

Body Params
string
required

Unique key for the new document. Letters, digits and underscores only; it is stored in lowercase.

string
required

The display name of the new document.

Responses

400

Validation error, for example a key containing spaces or hyphens.

403

The request used a sandbox API key, or the caller is missing the communications:create permission.

404

No such document, or documents are not enabled for the organization.

409

A document with this key already exists in the organization.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json