Delete Template
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 instead of deleting and re-uploading.
Example request
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.
Example response
On success the endpoint returns 200 OK with an empty data object:
{
"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 to find the
TemplateIdto delete -
Upload Template with Optional Default Values to create a replacement template
-
Edit Template Metadata to rename or retag instead of deleting
DELETE/template/{TemplateId}