Skip to main content
POST
Uploads one Word (.docx) document, at most 20 MB, as a template of the workflow. Put the returned id in a Report generator node’s template_file_id. Word templates are in alpha and enabled per organization; without the feature the request answers 403. Send the document as multipart form data under the file field. The response lists the placeholders the document reads: the field keys inside {{ … }}, {%p if … %} and {%tr for … %}. A document whose placeholders are not valid syntax is refused with 400 and error_code: "UNSUPPORTED_FILE_TYPE". A template is never changed. To replace one, upload the new document and point the node at its id.

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Body

multipart/form-data
file
file
required

One Word (.docx) document, at most 20 MB.

Response

Successful Response

id
string
required

Unique identifier of the template (hyphenated UUID). This is the value to put in a report node's template_file_id.

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4e2"

name
string
required

Filename the template was uploaded under.

Example:

"safety-plan.docx"

size_bytes
integer
required

Size of the document in bytes.

Example:

48213

placeholders
string[]
required

The field keys the template reads, sorted. A run is refused while one of them is not a field of the node that feeds the report.

Example: