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
string
required
Bearer ck_live_… — the template is created in this key’s project.Body
string
required
Display name (1–120 chars).
string
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.string
Optional, up to 280 chars.
object
required
The variable manifest the render payload binds to.
select variables. A variable with dataType: "select" must include a non-empty options
array of { value, label } choices (value is stored/validated, label is display text).
Publishing a select with no options is rejected with invalid_request. Option values must be
unique, and a defaultValue, if set, must be a string matching one of them. At render time only a
declared value is accepted — see Concepts → Select variables.object
Optional CanvasDocument
contentJson override. When omitted, it is generated from the manifest.object
Optional page format (
format, orientation, margin, printBackground). Defaults to A4 portrait.Response
201:
string
string
Final slug (may differ from a derived input if it collided).
number
Always
1 for a newly created template.object
The stored manifest, echoed back.
Errors
cURL
201