Skip to main content

Duplicate a document template.

POST/api/v1/document-templates/{document_template_id}/duplicatedocument_templates:write

Creates a template named "<name> (copy)" on the same file, with the same output type and project (the Portal's duplicate). The copy is a template of its own: renaming or deleting it leaves the original alone. Answers 201 with the copy.

Scopedocument_templates:write
AsynchronousNo
MCP toolduplicate_document_template
Portal permissionsduplicate_document_templates

Parameters​

NameInTypeRequiredDescription
document_template_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Responses​

StatusDescriptionBody
201Success.application/json DocumentTemplate or object
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentTemplate​

FieldTypeRequiredDescription
deleted_atstring (date-time) or nullRequired
document_idstringRequiredThe document holding the template file.
document_template_idstringRequired
output_document_typeobject or nullRequired
project_idstring or nullRequired
template_namestring or nullRequired