---
title: "Export a workspace's note templates"
method: GET
path: "/workspaces/{workspaceId}/data-export/templates"
tags: ["data-export", "customer-content"]
---

# Export a workspace's note templates

`GET /workspaces/{workspaceId}/data-export/templates`

## Request

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

Lists customer-owned templates for export, one page at a time, with metadata and a short-lived download link for each stored body. Pages are ordered by ascending template ID: pass `nextCursor` back as `cursor` until it is `null`. Download links expire after one hour (`expiresAt`); request the page again for fresh links. Vetnio's read-only default catalog templates are excluded; workspace-owned copies, including managed ones, are included. Read-only. Covers clinical-note, client-communication and referral templates, including hidden ones, with their imported instructions where present. Requires admin rights in the workspace (workspace admin or superadmin, or an admin of an organization the clinic belongs to). Accepts a browser session or a personal API key; organization and workspace API keys (`sk_org_…`, `sk_ws_…`) get 403.

## Path parameters

- `workspaceId` string, required: Identifier of the workspace (clinic) to export. The caller must be an admin of it, directly or as an admin of its organization.

## Query parameters

- `cursor` string: Pagination cursor: the `nextCursor` value from the previous page. Omit for the first page, and keep the same owner and template category while paging. Items with an ID greater than the cursor are returned.
- `limit` integer: Maximum number of templates per page, 1-50.

## Response `200`

Successful response

- WorkspaceTemplateExportPage: One page of the workspace's note templates with download links.
  - `nextCursor` string, nullable, required: Pass this value as `cursor` to fetch the next page. `null` when this is the last page.
  - `expiresInSeconds` number, required: Lifetime of every `contentUrl` on this page, in seconds.
  - `expiresAt` string, date-time, required: When the `contentUrl` links on this page stop working (ISO-8601 UTC). Download before then. Expiry does not affect the stored content.
  - `items` object[], required: Templates on this page, ordered by ascending ID.
    - `id` string, required: Template ID. Pass it as `templateId` to the versions endpoints.
    - `workspaceId` string, required: ID of the workspace (clinic) that owns the template.
    - `name` string, nullable, required: Template name shown in the app, or null if it was never named.
    - `type` 'clinical_note' | 'referral' | 'client_communication', required: What the template produces: - `clinical_note` — the clinical note (medical record entry) for a consultation. - `referral` — a referral letter to another clinic or specialist. - `client_communication` — a message to the pet owner.
    - `creatorId` string, required: User ID (UUID) of the person who created the template.
    - `creatorRole` 'member' | 'admin' | 'superadmin', required: Workspace role the creator had when creating the template: - `member` — clinician. - `admin` — workspace administrator. - `superadmin` — workspace owner-level administrator.
    - `createdAt` string, date-time, required: When the template was created (ISO-8601 UTC).
    - `updatedAt` string, date-time, nullable, required: When the template was last changed (ISO-8601 UTC), or null if never changed after creation.
    - `updatedBy` string, nullable, required: User ID of the person who last changed the template, or null.
    - `isManaged` boolean, required: `true` when Vetnio or the clinic's organization provisioned the template (for example from an organization template or an integration) rather than a clinic user writing it.
    - `isDefault` false, required: Always `false`: Vetnio's read-only default catalog templates are excluded from this export.
    - `jsonTemplateId` string, nullable, required: Linked JSON template ID only when the schema belongs to this workspace and is included in its JSON template export.
    - `hasExcludedJsonTemplate` boolean, required: `true` when the template links to a structured (JSON) schema that is not part of this workspace's export, such as a Vetnio-provided schema. That schema's ID and body are not exposed.
    - `instructionsArtifact` object, nullable, required: A downloadable stored body of a template: a short-lived link plus its storage metadata.
      - `contentUrl` string, required: Signed HTTPS URL that downloads the stored body without further authentication. It expires at the page's `expiresAt` (one hour); fetch the page again for a fresh link. Treat it as a secret.
      - `currentVersionId` string, nullable, required: The downloaded version. Null means storage supplied no immutable version ID, including the legacy null version, so the URL follows the current object.
      - `contentType` string, nullable, required: Media type of the stored body as recorded by storage, for example `text/html` or `application/json`, or null if none was recorded.
      - `size` number, nullable, required: Size of the stored body in bytes, or null if unknown.
      - `lastModified` string, date-time, nullable, required: When the current body was last written (ISO-8601 UTC), or null if unknown.
    - `artifact` object, nullable, required: A downloadable stored body of a template: a short-lived link plus its storage metadata.
      - `contentUrl` string, required: Signed HTTPS URL that downloads the stored body without further authentication. It expires at the page's `expiresAt` (one hour); fetch the page again for a fresh link. Treat it as a secret.
      - `currentVersionId` string, nullable, required: The downloaded version. Null means storage supplied no immutable version ID, including the legacy null version, so the URL follows the current object.
      - `contentType` string, nullable, required: Media type of the stored body as recorded by storage, for example `text/html` or `application/json`, or null if none was recorded.
      - `size` number, nullable, required: Size of the stored body in bytes, or null if unknown.
      - `lastModified` string, date-time, nullable, required: When the current body was last written (ISO-8601 UTC), or null if unknown.

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