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

# Delete a template

`DELETE /v1/templates/{template_id}`

## Request

- Base URL: `https://api-eu.dynamicdocumentapi.com`
- URL: `https://api-eu.dynamicdocumentapi.com/v1/templates/{template_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Soft delete: the template moves to the trash and is purged after 30 days. Renders that reference it keep working until then; new renders answer `410 template_deleted`.

## Path parameters

- `template_id` string, required

## Response `200`

- TemplateDeleted
  - `deleted` boolean, required
  - `deleted_at` string, date-time, required: Purged 30 days later.
  - `id` string, required
  - `object` string

## Other responses

- `400`: Invalid request body (`errors[]` with JSON pointers).
- `401`: Missing, invalid, expired or revoked credentials.
- `403`: Insufficient scope, IP not allowed, workspace suspended or scheduled for deletion, or email not verified.
- `404`: Template not found.
- `410`: Template already deleted.
- `423`: The template is locked (`template_locked`); Owners and Admins unlock it in the dashboard.
- `429`: Rate limited (`Retry-After`).
- `503`: The control plane is unreachable (`Retry-After`).

---

[API](https://skmtc.dev/dynamicdocumentapi/apis/dynamic-document-api.md) · [All operations](https://skmtc.dev/dynamicdocumentapi/apis/dynamic-document-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dynamicdocumentapi/apis/dynamic-document-api/revisions/0f14bc0000f4?raw)
