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

# Get a template

> GET /v1/templates/:slug — template metadata, the published variable manifest, and a generated JSON Schema.

<Info>**GET** `https://api.craftkit.dev/v1/templates/:slug`</Info>

Fetch one template by slug, including its published **manifest** (the contract your render `data`
must satisfy) and an auto-generated **JSON Schema** for client-side validation. Use this to
verify a template and bind keys before rendering.

## Authorization

<ParamField header="Authorization" type="string" required>
  `Bearer ck_live_…` — a project API key.
</ParamField>

## Path parameters

<ParamField path="slug" type="string" required>
  The template slug, unique within the project.
</ParamField>

## Response

<ResponseField name="id" type="string" />

<ResponseField name="name" type="string" />

<ResponseField name="slug" type="string" />

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

<ResponseField name="templateType" type="string">`document` or `pdf-overlay`.</ResponseField>

<ResponseField name="currentVersionNumber" type="number | null" />

<ResponseField name="published" type="boolean">`false` when the template exists but has no published version.</ResponseField>

<ResponseField name="manifest" type="object | null">
  `null` when unpublished. Otherwise:

  <Expandable title="manifest">
    <ResponseField name="variables" type="VariableDefinition[]">Scalar variables (dot-path keys).</ResponseField>
    <ResponseField name="loops" type="LoopDefinition[]">Array loops. See the [loop-key rule](/guides/variables-and-loops#the-loop-key-rule).</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="jsonSchema" type="object | null">Draft-07 JSON Schema derived from the manifest, or `null` when unpublished.</ResponseField>

<ResponseField name="createdAt" type="string" />

<ResponseField name="updatedAt" type="string" />

## Errors

<ResponseField name="404 template_not_found">No template with that slug in this key's project.</ResponseField>

```bash cURL theme={null}
curl https://api.craftkit.dev/v1/templates/charter-handover \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY"
```

```json 200 theme={null}
{
  "id": "…",
  "name": "Charter Handover",
  "slug": "charter-handover",
  "description": null,
  "templateType": "document",
  "currentVersionNumber": 2,
  "published": true,
  "manifest": {
    "variables": [
      { "key": "booking.code", "label": "Booking code", "dataType": "text", "required": true },
      { "key": "handover.signedBy", "label": "Signed by", "dataType": "text", "required": true }
    ],
    "loops": [
      {
        "key": "areas",
        "label": "Inspection areas",
        "itemFields": [
          { "key": "areaKey", "label": "Area", "dataType": "text" },
          { "key": "condition", "label": "Condition", "dataType": "text" }
        ]
      }
    ]
  },
  "jsonSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} },
  "createdAt": "2026-05-01T09:00:00.000Z",
  "updatedAt": "2026-06-01T12:00:00.000Z"
}
```
