Skip to main content
Update templates

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

Values to write onto every listed template. Only the properties present are touched, so a rename or a change of grouping needs nothing else; ownership and sharing are the server's and cannot be set here. An object is merged into the stored one property by property, nested objects included, while a list replaces the stored one as a whole - so a changed object carries all of its properties, null for those to clear. A template the merged values would leave invalid is reported as a failed item.

ids
string[]
required

Identifiers of the templates to update, all of them receiving the same values.

Required array length: 1 - 1000 elements
Minimum string length: 1
cloneFile
boolean
default:false

Whether the document named in data is copied first, giving each updated template a file of its own. It is what makes it possible to point several templates at one document in a single call, and to reuse a document that is already attached elsewhere.

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 once data is applied - its main file or one of its attachments - so nothing from outside the template can be pulled in. The previous main file stays with the template as an attachment, and so does 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 placed on the template are left as they are, on the pages of its main file - so while the template has fields once data is applied, the list has to start with the current main file, and a template with fields but no main file merges nothing until its fields are cleared.

A template whose main file is already merged only takes further files after its pages: the list then starts with the current main file, followed by attachments not merged yet, and joining its files once more from the start requires replacing the main file first. The records of the earlier merge are kept and the new files are recorded after them, while the previous main file itself is not kept, its sources being kept already. Files are merged into a single template at a time, and not together with cloneFile.

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

Response

Reports the outcome per template; individual templates may still have failed, so read the per-item results.

count
integer
required

Number of items the request processed, successful and failed alike.

Example:

22

errors
boolean
required

Whether any item failed. Check it before treating the call as a clean success - the request itself answers 200 even when individual items did not go through.

Example:

false

items
object[]

Per-item outcomes. Endpoints report the failed items here; some also list the successful ones, so read each item's own status rather than inferring it from being listed.