---
title: "List templates"
method: GET
path: "/workspaces/{workspaceId}/templates"
tags: ["templates"]
---

# List templates

`GET /workspaces/{workspaceId}/templates`

## Request

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

Returns the clinic's prompt templates that the caller can see, sorted by name: templates written by clinic users, Vetnio default templates and templates provisioned by the organization or an integration. Use it to let users pick the `templateId` passed to Generate a clinical note.

Visibility follows the clinic's template permissions. Admins see every template. Members see all templates under Full Access and View & Use Only; under Private they see their own, admin-created and managed templates; under Strict Mode only admin-created and managed templates. Templates the user has hidden from their own picker are still listed, with `isHidden` set to `true`. `isPinned` reflects the calling user's starred templates.

Only metadata is returned. Clinic admins can read a template's body through the configuration export (`GET /workspaces/{workspaceId}/data-export/templates/versions` and `…/templates/version`); Vetnio's built-in templates are not exported. Not paginated; a clinic holds at most about 100 templates. 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.

## Response `200`

The visible templates, sorted by name. Empty when the caller can see none.

- TemplateListItemOutput[]: The templates the caller can see in the clinic, sorted by name (case-insensitive).
  - `id` string, required: ID of the template (a UUID). Pass it as `templateId` when generating a record or managing the template.
  - `name` string, required: Template Name shown in Vetnio's template lists and pickers. Not unique within a clinic. An empty string when the template has no name.
  - `type` 'clinical_note' | 'referral' | 'client_communication', nullable, required: The Template Type: which kind of document the template writes. It decides where Vetnio offers the template and which instructions its AI template assistant follows. - `clinical_note` — Clinical Note: the medical record of the visit, for the clinical team (record type `clinical note`). - `client_communication` — Client Communication: an owner-facing message about the visit (record type `communication`). - `referral` — Referral: a letter to or from another clinician or clinic (record type `referral`).
  - `creatorId` string, required: User ID (a UUID) of the person who created the template, or who duplicated it from another template. For templates Vetnio added to the clinic, the user who triggered that provisioning.
  - `creatorRole` 'member' | 'admin' | 'superadmin', required: The creator's role in the clinic when the template was created; it is not updated if their role changes later. Members' access to a template depends on it under the clinic's template permissions. - `member` — created by a regular clinic member. - `admin` — created by a clinic admin, or provisioned by Vetnio. - `superadmin` — created by a clinic super-admin.
  - `createdAt` string, required: When the template was created, as an ISO-8601 UTC timestamp.
  - `jsonTemplateId` string, nullable, required: ID of the JSON template (structured template) linked to this template, or `null`. When set, clinical notes generated on consultations that use this template are produced as structured JSON documents following that JSON template, with this template's instructions guiding the field content.
  - `isDefault` boolean, required: `true` for a Vetnio default template, added to the clinic from Vetnio's default template library. Default templates are read-only: updating or deleting one returns 403. Duplicate it to get an editable copy.
  - `isHidden` boolean, required: `true` when the calling user has hidden this template from their own picker.
  - `isPinned` boolean, required: `true` when the calling user has starred this template.
  - `isManaged` boolean, required: `true` when Vetnio or the clinic's organization provisioned the template (Vetnio defaults, organization templates, practice-management-system integrations) rather than a clinic user writing it. Managed templates stay visible to members under every template-permission mode, and members cannot edit them unless they created them.

## 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)
