Skip to main content

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

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