Skip to main content
PATCH
Update a template

Authorizations

Authorization
string
header
required

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

Headers

x-workspace-id
string

The workspace the key was issued for, as returned by GET /api/v1/workspaces. Optional: omitting it acts in the key's workspace, and any other id is rejected with 401.

Path Parameters

templateId
string
required

Body

application/json
name
string

The template's name.

Minimum string length: 1
Example:

"Employment agreement"

description
string

Free-text description of what the template is for.

Example:

"Standard individual employment agreement for new hires."

status
enum<string>

New lifecycle state: DRAFT, ACTIVE or ARCHIVED. Moving to ACTIVE for the first time stamps the publish time; moving to ARCHIVED stamps the archive time and moving out of it clears it. An update that leaves a WORKFLOW template ACTIVE is refused with 400 while its questions break a workflow rule.

Available options:
DRAFT,
ACTIVE,
ARCHIVED
Example:

"ACTIVE"

tags
string[]

Replaces the template's tags with this set. A tag that does not exist yet is created.

Example:
reminderIntervalDays
integer | null

Days between automatic reminders to each recipient who hasn't finished, counted from their invitation. Null or absent sends none.

Required range: x >= 1
Example:

3

expirationDays
integer | null

Days the package stays open for signing, counted from when it is sent. Null or absent means it never expires.

Required range: x >= 1
Example:

30

expiryWarningDays
integer | null

Days before expiry at which recipients who haven't finished are warned. MUST be fewer than expirationDays.

Required range: x >= 1
Example:

5

emailSubject
string

Subject of the invitation email. {{key}} placeholders are filled from the package's merge field values.

Example:

"Your employment agreement with Studio Phoenix Limited"

emailMessage
string

Body of the invitation email. {{key}} placeholders are filled from the package's merge field values.

Example:

"Kia ora {{employee_name}}, please review and sign your agreement."

signingMode
enum<string>

How recipients are walked through signing. PARALLEL invites every recipient at once; SEQUENTIAL invites one at a time in order; WORKFLOW follows the template's workflow, asking recipients its questions as they open the package.

Available options:
PARALLEL,
SEQUENTIAL,
WORKFLOW
Example:

"SEQUENTIAL"

brandColor
string | null

Accent colour for the signing experience and emails, as a six-digit hex code. Needs a plan with custom branding, otherwise 402. Null clears it.

Pattern: ^#[0-9a-fA-F]{6}$
Example:

"#1a2b3c"

roles
object[]

Replaces the roles. A role carrying its id keeps that id and the fields placed for it; a role left out is removed with its fields, and removing one the workflow uses is a 409. The recipient cap still applies. Omit to keep the current roles.

questions
object[]

Replaces the workflow's questions wholesale. Needs signingMode WORKFLOW, set here or already on the template, or it is a 422. Questions reference each other by position in this array; an action's targetDocumentId is a document id from GET /api/v1/templates/:templateId. Omit to keep the current questions.

metadata
any | null

Not accepted. A template's default custom field values are set in the app; sending this is refused with 400 and nothing is saved.

documentConfig
object[]

Changes to DYNAMIC documents' variables and question wording. Variables themselves come from the content and cannot be added here. A change that leaves a document's config invalid (a duplicate key, a MAPPED variable without a binding) is a 422.

mergeFields
object[]

Replaces every merge field. Blank at launch means the field's default. Omit to keep the current merge fields.

Response

Success

data
object
required