Skip to main content
Create a template

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Body

application/json
data
object
required

The template to create: the document it is built on, the recipient roles and fields prepared for a transaction, the share settings to apply, and the naming and grouping the template list shows. Ownership and sharing are filled in by the server and cannot be set here.

cloneFile
boolean
default:false

Whether the referenced document is copied first, so the template gets a file of its own. Use it to build a template on a file that is already attached elsewhere; without it the hash has to be one the caller uploaded and has not used yet.

Example:

false

convert
boolean
default:false

Converts a file listed in merge that is not a PDF to one before joining, instead of refusing it. The template then keeps a PDF copy of that file in place of the original.

Example:

false

merge
string[] | null

Files of the template to join into a single PDF that becomes its main file, in the order they follow one another in the result. Each of them has to be one of the template's own files - its main file or one of its attachments sent in data - so nothing from outside the template can be pulled in. The document sent as file is kept as an attachment, and so is every joined file, marked merged and recorded in fileMerge together with the pages it occupies. A joined file may be kept as the copy prepared for joining, under a new identifier, so the stored attachments and fileMerge - not the identifiers sent - name the files the template keeps. The fields sent in data stay on the pages they name, so a template sent with fields has to list its main file first. It cannot be combined with cloneFile.

Required array length: 2 - 51 elements
Minimum string length: 1
Pattern: ^[a-z0-9]+$

Response

Returns the identifier of the newly created template.

id
string

Value the request produced: the identifier of the object it created or acted upon, or - on the endpoints that issue one - the token it granted.

Example:

"e58cc1acbba3cd8056ce6adb44d46a11a113170e884509c179701270b915b59b"