---
title: "Delete a template"
method: DELETE
path: "/workspaces/{workspaceId}/templates/{templateId}"
tags: ["templates"]
---

# Delete a template

`DELETE /workspaces/{workspaceId}/templates/{templateId}`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces/{workspaceId}/templates/{templateId}`
- Auth: HTTP bearer

Deletes a template from the clinic. It disappears from every list and picker and cannot be restored through the API or Vetnio.

Records already generated with it are not changed. Consultations that had it selected lose the selection, so their next generation runs without a template unless one is passed.

Who may delete: the same users who may update it (the creator, clinic admins, and under Full Access other members for non-managed member templates); others get 403. Vetnio default templates cannot be deleted (403). Deleting an unknown or already deleted template returns 404. Requires a personal API key.

## Path parameters

- `workspaceId` string, required: Identifier of the clinic (workspace), as returned by `GET /workspaces`. The key's user must be a member of the clinic, or an admin of the organization it belongs to.
- `templateId` string, required: ID of the template (a UUID), as returned by List templates or Create a template. The template must belong to the workspace in the path and be visible to the caller under the clinic's template permissions; otherwise the request returns 404.

## Response `200`

The template was deleted.

- DeleteTemplateOutput: An empty object, returned when the template has been deleted.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/vetnio/apis/vetnio-api.md) - [All operations](https://skmtc.dev/vetnio/apis/vetnio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vetnio/apis/vetnio-api/revisions/d004afd5617d?raw)
