Skip to main content
DELETE https://api.craftkit.dev/v1/templates/{slug}
Soft-delete the template at slug. The row is retained (marked deleted) but its slug is freed, so the same canonical slug can be recreated by POST /v1/templates or PUT /v1/templates/:slug. This is the cleanup path for idempotent provisioning and for retiring a template you no longer render.
Existing renders are untouched. They pin their own templateVersionId and remain fetchable by render id (and via any share links). Deleting a template removes it from list and get, and blocks new renders against that slug.
If you only need the newest layout, prefer PUT — it republishes in place and keeps the template id, slug, and render history. Reach for DELETE when you genuinely want the template gone.

Authorization

Authorization
string
required
Bearer ck_live_… — must own the project.

Path

slug
string
required
The slug of the template to delete.

Response

200:
id
string
The deleted template’s id.
slug
string
The original (now-freed) slug, echoed back.
deletedAt
string
ISO-8601 timestamp of the soft-delete.
A second DELETE of the same slug returns 404 — the operation is idempotent in effect.

Errors

StatuscodeMeaning
401unauthorizedMissing/invalid key.
404template_not_foundNo live template with that slug in this project (already deleted, or never existed).
cURL
curl -X DELETE https://api.craftkit.dev/v1/templates/charter-handover \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY"
200
{
  "id": "…",
  "slug": "charter-handover",
  "deletedAt": "2026-06-06T00:00:00.000Z"
}