Skip to main content
PATCH
Update template

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

key
string
required

Unique template key.

Example:

"invoice-template"

Body

application/json

Request body for creating or updating a template.

key
string
required

Unique identifier for the template.

Example:

"invoice-template"

label
string

Human-readable display name.

Example:

"Standard Invoice"

source
object

Reference to the source template file in object storage (the document object store bucket). DOCX sources are processed with the angular expression parser: tags such as {client_name}, {#items}…{/items} (loops), {price + tax} (operators), and {amount | formatcurrency:'EUR'} (filters) are evaluated against the trigger payload to produce the final output. PDF sources (application/pdf) are passed through — and merged with sub-templates — without expression rendering, and can only output PDF.

output
object

Where and how the rendered document is written. The final storage key is {bucket}/{folder}/{name}.{ext} with the extension derived from content_type.

signatories
object[]

Signatories to request e-signatures from once the document is generated. name and email support expression placeholders resolved against the trigger payload; entries whose rendered email is missing or invalid are skipped. An empty/absent array means no signature request is sent.

sub_templates
object[]

Additional published templates rendered with the same payload and merged after the main template in array order. Entries with conditions are included only when the rule-engine conditions evaluate to true against the trigger payload.

Response

Template draft updated successfully. The response returns the messaging subject of the draft record.

subject
string

Messaging subject of the created or updated record. Formats: draft template ms.document.draft.template.{key}, published template ms.document.template.{key}, document ms.document.document.{key} — with keys sanitised into subject tokens (/ → ., spaces → _, other special characters → uXXXX codes).

Example:

"ms.document.draft.template.invoice-template"