Skip to main content
POST
/
templates
/
{templateId}
/
versions
Create a template version
curl --request POST \
  --url https://api.example.com/templates/{templateId}/versions \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>"
}
'
{
  "templateId": "<string>",
  "version": 123,
  "createdAt": "<string>"
}
Each call increments the version number. The latest version is used for all new generations.
templateId
string
required
The ID of the template to update.
content
string
required
HTML/Liquid content for the new version. Use {{ variableName }} to inject generation variables.
<h1>Invoice for {{ customerName }}</h1>
<p>Invoice #{{ invoiceNumber }}</p>
<p>Amount due: ${{ amount }}</p>
templateId
string
ID of the parent template.
version
integer
The new version number.
createdAt
string
ISO 8601 timestamp when this version was created.