---
title: "Delete a template"
method: DELETE
path: "/templates/{template_id}"
tags: ["Templates"]
---

# Delete a template

`DELETE /templates/{template_id}`

Deletes a template or a specific template version. When no version is specified, deletes
the entire template including all versions. When a version is specified, deletes only
that version while preserving others. Returns remaining version information.

## Path parameters

- `template_id` string, required

## Query parameters

- `version` string

## Response `200`

template version deleted successfully

- TemplateDeleteResponse
  - `status` 'success' | 'error', required
  - `errors` string[]
  - `latest_version` string, nullable
  - `versions` object[]
    - `version` string, required
    - `description` string, nullable
    - `published_at` string, required
    - `published_by_type` 'user' | 'external_user', required
    - `published_by_user_id` string
    - `published_by_name` string
    - `published_by_email` string
    - `published_by_external_id` string

## Other responses

- `401` — authentication failed
- `404` — template not found

---

[API](https://skmtc.net/docspring/apis/docspring-api.md) · [All operations](https://skmtc.net/docspring/apis/docspring-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/docspring/docspring-api/versions/88e2ef4f5847/schema)
