Skip to main content
GET https://api.craftkit.dev/v1/templates/:slug
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

Authorization
string
required
Bearer ck_live_… — a project API key.

Path parameters

slug
string
required
The template slug, unique within the project.

Response

id
string
name
string
slug
string
description
string | null
templateType
string
document or pdf-overlay.
currentVersionNumber
number | null
published
boolean
false when the template exists but has no published version.
manifest
object | null
null when unpublished. Otherwise:
jsonSchema
object | null
Draft-07 JSON Schema derived from the manifest, or null when unpublished.
createdAt
string
updatedAt
string

Errors

404 template_not_found
No template with that slug in this key’s project.
cURL
curl https://api.craftkit.dev/v1/templates/charter-handover \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY"
200
{
  "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"
}