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

One of the workspaces the key was issued for, as returned by GET /api/v1/workspaces. Required on a key that acts for members. On any other key it is optional and omitting it acts in the key's default workspace. Any id outside the key's workspaces is rejected with 401.

x-act-as
string

Required on a key that acts for members, refused on any other key. Names the member the call runs as, as key=value: email=jane@acme.com, employee_id=E-1001, scim_external_id=… or a custom identifier. Keys are lowercase and matched case-insensitively. The call fails with 403 when no active member of the workspace matches.

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 | null

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

Example:

"Your employment agreement with Ashcombe Advisory Limited"

emailMessage
string | null

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 documents' variables and question wording: a DYNAMIC document's variables, or a STANDARD PDF's merge fields. Variables can't be added or removed here: a DYNAMIC document's come from its content, and a PDF's are added in the app. A PDF merge field keeps its key, and takes the SENDER, AUTHOR or MAPPED source only. A change that leaves a document's config invalid (a duplicate key, a MAPPED variable without a binding, another source on a PDF) is a 422. A document linked from the library is edited in the library, so changing one here is a 409.

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