---
title: "Duplicate a template"
method: POST
path: "/workspaces/{workspaceId}/templates/{templateId}/duplicate"
tags: ["templates"]
---

# Duplicate a template

`POST /workspaces/{workspaceId}/templates/{templateId}/duplicate`

## Request

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

Creates an editable copy of a template the caller can see, with the same body, type and structured-template link. The copy belongs to the caller (`creatorId`, and `creatorRole` set to their current role) and is never a default or managed template, which makes this the way to customize a Vetnio default or organization template.

Only read access to the source is needed. The copy counts toward the clinic's limit of about 100 templates, and organization admins without a clinic membership cannot duplicate. Under Strict Mode a member's copy is hidden from that member. Not idempotent: each call creates another copy. 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.

## Request body

- object
  - `copySuffix` string, required: Text added to the original name to name the copy. Vetnio inserts a space between them, so `(copy)` turns "Follow-up - clinical team" into "Follow-up - clinical team (copy)". Use your users' language, for example `(kopia)` in Swedish.

## Response `200`

The copy was created; its ID is returned in `id`.

- DuplicateTemplateOutput: The ID of the copy that was created.
  - `id` string, required: ID (a UUID) of the new copy. Note that this field is `id`, while Create a template returns `templateId`.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `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)
