Delete document template
Soft deletes a document template from the workspace.
What happens:
- The template is marked as deleted (soft delete)
- It will no longer appear in list queries
- It cannot be used for generating new documents
- The template data is preserved in the database
Note: This is a soft delete operation. The template is not permanently removed and can potentially be restored if needed. This endpoint requires the DocumentTemplates.canManage permission.
DELETE
/administration/document-templates/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredResponses
200
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X DELETE "https://leadtime.app/api/public/administration/document-templates/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/administration/document-templates/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/administration/document-templates/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions