Delete contract template
Permanently deletes a template version and its stored source file.
Returns 404 if the template does not exist. Returns 400 if it (or a
signing workflow built on it) is linked to a sent contract request —
cascade-deletes only its own signing workflows (Contract Flows), never
actual contract requests.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Permanently delete a contract template version, regardless of its status (draft, published, or archived). This also removes the template's stored source file from storage, and cascade-deletes any signing workflows (Contract Flows) built on this template -- those are removed silently as part of this call, not blocked. The deletion is irreversible. On success the endpoint returns no content.
Authentication & access
- Requires a client API token:
Authorization: Bearer <token>. - The caller must hold the
contracts.templates.archivepermission and have the OWNER or OPERATIONS role. - The client must have contract signing enabled. If the feature is disabled the request returns
403.
Path parameters
| Name | In | Description |
|---|---|---|
template_version_id | path | The id of the template version to delete. Must belong to your client. |
Preconditions
- The template version must not be referenced by any contract request that has already been sent. That is the only thing that blocks deletion -- status (draft/published/archived) does not matter, and workflows built on the template do not block it either.
- Any signing workflow (Contract Flow) still built on this template is cascade-deleted along with it. If you need to keep those workflows, point them at a different template version first.
A template linked to a sent contract request is rejected with 400.
Response
204 No Content— the template version and its stored source file were permanently deleted. The response body is empty.
Error responses
| Status | When |
|---|---|
400 | Template is linked to a sent contract request |
403 | Contract signing is disabled for the client |
404 | No template version with this id exists under your client |
Standard 401 (authentication), 403 (insufficient permission or role), and 429 (rate limit) responses apply to every endpoint and are documented in the Error reference.
204Successful Response