Skip to main content

Create a document template.

POST/api/v1/document-templatesdocument_templates:write

The file document must be readable and be a .docx or .xlsx. output_document_type is a document type's exact name. project_id (optional) makes it a project's template; it cannot be changed later.

Scopedocument_templates:write
AsynchronousNo
MCP toolcreate_document_template
Portal permissionscreate_document_templates

Parameters​

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

Request body​

Content typeType
application/jsonDocumentTemplateCreateInput

Responses​

StatusDescriptionBody
201Success.application/json DocumentTemplate or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/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

DocumentTemplateCreateInput​

FieldTypeRequiredDescription
document_idstringRequired
output_document_typeobject or nullOptional
project_idstring or nullOptionalThe project the template belongs to; null or absent for a template every project lists. It cannot be changed afterwards.
template_namestringRequired