> ## 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.

# Get a template

> Returns a single published template including its latest version and variable names.

<ParamField path="templateId" type="string" required>
  The ID of the template (e.g. `tpl_01j8zxyz`).
</ParamField>

<ResponseField name="id" type="string">
  Unique template ID.
</ResponseField>

<ResponseField name="name" type="string">
  Display name of the template.
</ResponseField>

<ResponseField name="description" type="string | null">
  Optional description.
</ResponseField>

<ResponseField name="isPublished" type="boolean">
  Only published templates can be used for generation.
</ResponseField>

<ResponseField name="latestVersion" type="object | null">
  The most recent saved version.

  <Expandable title="latestVersion fields">
    <ResponseField name="version" type="integer">
      Version number (1-based).
    </ResponseField>

    <ResponseField name="variables" type="string[]">
      Liquid variable names found in the template content — pass these as keys in the `variables` object when creating a generation.
    </ResponseField>
  </Expandable>
</ResponseField>
