---
title: "Delete Template"
description: "Remove a template from your TurboDocx workspace with a single DELETE API call. Documents already generated from it are not affected. Includes a real example request, response, and error handling."
url: "https://docs.turbodocx.com/docs/API/delete-template"
---

# Delete Template

> Remove a template from your TurboDocx workspace with a single DELETE API call. Documents already generated from it are not affected. Includes a real example request, response, and error handling.

The Delete Template endpoint removes a template from your TurboDocx workspace so it can no longer be used to generate documents. Documents you have already generated from the template are not affected, so this is a safe way to retire unused or outdated templates without touching delivered files. There is no un-delete endpoint, so treat deletion as final.

## When to use it

Use this endpoint to remove templates that are no longer in rotation, deduplicate templates created during testing, or let your users manage their own template library from inside your app. If you only want to change a template's name, description, or tags, use [Edit Template Metadata](https://docs.turbodocx.com/docs/API/edit-template-metadata.md) instead of deleting and re-uploading.

## Example request

```bash
curl -X DELETE "https://api.turbodocx.com/template/2b8f1c9e-4d3a-4a7c-9f21-6b0d5e9a1c34" \
  -H "Authorization: Bearer $TURBODOCX_API_KEY" \
  -H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
  -H "Accept: application/json"
```

Replace the path segment with the `TemplateId` returned by [Get Templates and Folders](https://docs.turbodocx.com/docs/API/get-templates-and-folders.md).

## Example response

On success the endpoint returns `200 OK` with an empty data object:

```json
{
  "data": {}
}
```

Deletion is idempotent from the caller's side: deleting an ID that does not exist, or was already deleted, still returns `200` with `{ "data": {} }` rather than a `404`.

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator, contributor, or user | Empty (status only) |
| 423 | The template is locked | `{ "error": "Resource is locked", "message", "data": { "locked": true, "lockedBy", "lockedOn" } }` |
| 400 | The `id` path parameter is not a valid UUID | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |

## Related endpoints

- [Get Templates and Folders](https://docs.turbodocx.com/docs/API/get-templates-and-folders.md) to find the `TemplateId` to delete
- [Upload Template with Optional Default Values](https://docs.turbodocx.com/docs/API/upload-template-with-optional-default-values.md) to create a replacement template
- [Edit Template Metadata](https://docs.turbodocx.com/docs/API/edit-template-metadata.md) to rename or retag instead of deleting
