POST
https://api.craftkit.dev/v1/templatesimage variables as images, and loops as repeating tables —
and publishes it as version 1. This is the self-serve path for loop/table + image templates (no
dashboard step, no hand-written layout). Pass an explicit layout only if you want full control.
Authorization
Bearer ck_live_… — the template is created in this key’s project.Body
Display name (1–120 chars).
Kebab-case identifier, unique in the project. Omit to derive one from
name (a short suffix is
added if it collides). A provided slug that already exists returns 409.Optional, up to 280 chars.
The variable manifest the render payload binds to.
Optional CanvasDocument
contentJson override. When omitted, it is generated from the manifest.Optional page format (
format, orientation, margin, printBackground). Defaults to A4 portrait.Response
201:
Final slug (may differ from a derived input if it collided).
Always
1 for a newly created template.The stored manifest, echoed back.
Errors
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_json | Body is not valid JSON. |
| 400 | invalid_request | Envelope, manifest, or pageConfig failed validation (issues included). |
| 400 | invalid_loop_key | A loop key contains a dot — use a dot-free top-level key. |
| 401 | unauthorized | Missing/invalid key. |
| 409 | slug_conflict | A provided slug already exists in this project. |
cURL
201