Skip to main content
PUT
Replace a template's body

Authorizations

Authorization
string
header
required

Workspace credential issued from the automation console at /automation. Send it as Authorization: Bearer vq_ws_.... This is NOT a Data API key: a vq_key_ credential is refused here and names the other product in the error.

Path Parameters

templateId
string
required

tpl_ identifier of one of your uploaded draft templates. Take it from GET /v1/templates.

Body

application/json

Replace a template's body, and optionally its title and description.

A PUT rather than a PATCH, matching drafts.update: contentMarkdown is the WHOLE body, so sending one clause replaces the template with that clause. Title and description are left alone when omitted.

Variables are re-detected from the new body and the frozen-text hash is recomputed in the same write. That hash is the renderer's integrity baseline over the non-variable segments, so leaving it stale would check the next run against the body the template used to have.

This is lossy against a DOCX-imported template. The rich converter preserves Word formatting that markdown cannot express, and replacing the body through here discards it. Duplicate the template first if you want to keep the original.

contentMarkdown
string
required

The COMPLETE new body as markdown. This replaces the whole template: a partial body is not something this format can express. Whitespace alone is refused.

Required string length: 1 - 500000
Example:

"# Mutual Non-Disclosure Agreement\n\n## 1. Confidential Information\n\nEach party may disclose information that is confidential and proprietary to the other party.\n"

title
string | null

New display name. Omit to leave it alone.

Required string length: 1 - 300
Example:

"Mutual NDA"

description
string | null

New description. Omit to leave it alone.

Maximum string length: 2000
Example:

"Master services agreement with Acme for the 2026 platform rollout."

Response

Successful Response

One template with everything needed to run it without guessing.

variables is the reason this model exists at all, and sections is here for the same reason a draft publishes them: a caller deciding WHICH template to run needs to read what it says, and the editor's own document model does not cross this boundary in either direction.

id
string
required

Public identifier, tpl_ followed by 32 hex characters. Name it when starting a run.

Example:

"tpl_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

title
string
required

The template's display name.

Example:

"Master Services Agreement"

category
string
required

The template's category, as the customer classified it on upload.

Example:

"commercial"

createdAt
string<date-time>
required

When the template was created (RFC 3339).

Example:

"2026-08-19T14:32:10Z"

updatedAt
string<date-time>
required

When the template was last modified (RFC 3339).

Example:

"2026-08-19T14:32:10Z"

variables
TemplateVariable · object[]
required

Every fillable span, in document order. The id of each is what slotOverrides on a run is keyed by.

sections
DraftSection · object[]
required

The template body, section by section, with the placeholder text left in place. Send a replacement as contentMarkdown.

description
string | null

Free-text description of what the template is for.

Example:

"Master services agreement with Acme for the 2026 platform rollout."

sourceFilename
string | null

Filename of the document this template was created from. Published because it is how a person recognizes which template a run used, months later.

Example:

"msa-acme-v3.docx"

Last modified on August 23, 2026