Skip to main content
POST https://api.craftkit.dev/v1/templates/:slug/render
Validates data against the template’s published manifest and enqueues a render job. Returns 202 with a poll URL. Rendering is asynchronous — there is no synchronous mode (see Render lifecycle).

Authorization

Authorization
string
required
Bearer ck_live_… — a project API key.
Idempotency-Key
string
Optional. Retrying with the same key returns the original render instead of creating a duplicate. Takes precedence over the body jobId. See Idempotency.

Path parameters

slug
string
required
The template slug.

Body

data
object
required
Variable values. Scalars nest by dot-path ({ "customer": { "name": "…" } }); loops are keyed by their dot-free top-level key. Keys absent from the manifest are stripped. Loop arrays are capped at 10,000 items. See Variables & loops.
jobId
string
Optional idempotency key (fallback when no Idempotency-Key header is sent).
options
object

Response

202 when a new render is queued, or 200 when an idempotency key matched an existing render.
id
string
status
string
queued for a fresh render; the existing render’s current status on an idempotent replay.
pollUrl
string
GET this to poll the render.
downloadUrl
string | null
null until the render succeeds.
errorMessage
string | null
createdAt
string

Errors

StatuscodeMeaning
400invalid_jsonBody is not valid JSON.
400invalid_requestBody failed schema validation (issues included).
400invalid_input_datadata did not match the manifest (issues included).
401unauthorizedMissing/invalid/revoked key.
404template_not_foundNo such template in this key’s project.
404version_not_foundPinned versionNumber does not exist.
409no_published_versionTemplate has no published version.
503queue_unavailableRender queue is temporarily unreachable — retry.
cURL
curl -X POST https://api.craftkit.dev/v1/templates/charter-handover/render \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY" \
  -H "Idempotency-Key: handover-BK-12345-checkout" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "booking": { "code": "BK-12345" },
      "handover": { "kind": "checkout", "date": "2026-06-04", "signedBy": "Jane Doe" },
      "areas": [ { "areaKey": "hull", "condition": "damage" } ]
    },
    "options": { "filename": "charter-handover-BK-12345.pdf" }
  }'
202
{
  "id": "…",
  "status": "queued",
  "pollUrl": "https://api.craftkit.dev/v1/renders/…",
  "downloadUrl": null,
  "errorMessage": null,
  "createdAt": "2026-06-05T10:00:00.000Z"
}