---
title: "Get a retained version of an organization template"
method: GET
path: "/organizations/{organizationId}/data-export/templates/version"
tags: ["data-export", "customer-content"]
---

# Get a retained version of an organization template

`GET /organizations/{organizationId}/data-export/templates/version`

## Request

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

Returns the exact saved body of one retained template version as UTF-8 text, after checking that the template belongs to this scope. Take `versionId` from the versions list and URL-encode it. Read-only: it does not restore or modify the template. Returns 404 when the template, or that version of it, is not available. Organization templates have no instructions part: `part=instructions` returns 400. Requires admin rights in the organization. Accepts a browser session or a personal API key; organization and workspace API keys (`sk_org_…`, `sk_ws_…`) get 403.

## Path parameters

- `organizationId` string, required: Identifier of the organization to export (a UUID). The caller must be an admin of it.

## Query parameters

- `part` 'content' | 'instructions': Which stored object of the template to read: - `content` — the template body itself. - `instructions` — the separate instructions object of an imported template (original wording and per-section instructions). Only workspace note and meeting templates have one; other kinds return 400.
- `templateId` string, required: ID of the template, as returned in `items[].id` by the matching template export. It must belong to the workspace or organization in the path, otherwise 404.
- `versionId` string, required: Opaque version ID from the versions list (`versions[].versionId`) or from `artifact.currentVersionId`. URL-encode it; it can contain characters such as `+`, `/` and `=`.

## Response `200`

Successful response

- TemplateVersionSnapshot: The exact saved body of one retained template version, with its metadata.
  - `currentVersionId` string, nullable, required: Version ID of the template's current body at the time of the request, or null when there is no current body. Unlike `artifact.currentVersionId`, a legacy unversioned body is reported here as the literal string `"null"`.
  - `version` object, required: Metadata of the requested version.
    - `versionId` string, required: Opaque stored version ID. A literal null version belongs to unversioned or suspended storage and can be overwritten.
    - `isLatest` boolean, required: `true` when this version is the template's current body.
    - `lastModified` string, date-time, nullable, required: When this version was stored (ISO-8601 UTC), or null if unknown.
    - `size` number, nullable, required: Size of this version's body in bytes, or null if unknown.
    - `contentType` string, nullable, required: Media type of this version's body as recorded by storage, for example `text/html` or `application/json`, or null.
    - `audit` object, nullable, required: Audit details of the edit that saved this version. Only available for workspace note templates and `part=content`; `null` otherwise, or when no matching audit entry exists. Not a clinical approval or accuracy classification.
      - `id` string, required: ID of the audit-log entry (UUID).
      - `occurredAt` string, date-time, required: When the change was made (ISO-8601 UTC).
      - `actorName` string, nullable, required: Display name of the person who made the change, or null when unknown or for system changes. For changes made by Vetnio support on a customer's behalf, this is the support staff member.
      - `actorType` 'user' | 'vetnio_staff' | 'system', required: Who made the change: - `user` — a member of the customer's team. - `vetnio_staff` — Vetnio staff, for example while providing support. - `system` — an automated process.
      - `action` string, required: Audit action that saved this version, for example `template.created`, `template.content_updated` or `template.restored`.
      - `s3VersionId` string, required: The stored version ID the audit entry refers to; equals the version's `versionId`.
  - `content` string, required: The exact retained body as UTF-8 text, including HTML instructions or the original JSON schema.

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