> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platendoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a template version

> Saves a new version of a template's HTML/Liquid content.

Each call increments the version number. The latest version is used for all new generations.

<ParamField path="templateId" type="string" required>
  The ID of the template to update.
</ParamField>

<ParamField body="content" type="string" required>
  HTML/Liquid content for the new version. Use `{{ variableName }}` to inject generation variables.

  ```html theme={null}
  <h1>Invoice for {{ customerName }}</h1>
  <p>Invoice #{{ invoiceNumber }}</p>
  <p>Amount due: ${{ amount }}</p>
  ```
</ParamField>

<ResponseField name="templateId" type="string">
  ID of the parent template.
</ResponseField>

<ResponseField name="version" type="integer">
  The new version number.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp when this version was created.
</ResponseField>
