# Copy a Version to a New Template

> Create a new template from an earlier version without touching the live template

- **URL**: https://orshot.com/docs/api-reference/template-version-duplicate

---

Version history endpoints are available to first party clients like the
[Orshot MCP server](https://orshot.com/agents) and workspaces on the
Enterprise plan. Checkout the [Enterprise
Pricing](https://orshot.com/pricing) to get access.

Creates a **new** template in the same workspace from the version's design, so an old design can be reused while the live template keeps going. The same plan rules as restore apply.

## Endpoint

```markdown tab="Endpoint"
https://api.orshot.com/v1/studio/templates/:templateId/versions/:versionId/duplicate
```

## URL Parameters

| Parameter    | Type    | Required | Description               |
| ------------ | ------- | -------- | ------------------------- |
| `templateId` | Integer | Yes      | ID of the studio template |
| `versionId`  | Integer | Yes      | ID of the version to copy |

## Request Body

| Field  | Type   | Required | Description                                                          |
| ------ | ------ | -------- | -------------------------------------------------------------------- |
| `name` | String | No       | Name of the new template. Default: `<template name> (<version label or vN>)` |

## Request

**Request**
```js
await fetch(
  "https://api.orshot.com/v1/studio/templates/12345/versions/48/duplicate",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer <ORSHOT_API_KEY>",
    },
    body: JSON.stringify({ name: "Launch banner (spring edition)" }),
  },
);
```

**Response**
```json
{
  "success": true,
  "template": {
    "id": 12399,
    "name": "Launch banner (spring edition)",
    "updated_at": "2026-09-15T11:45:02.004+00:00",
    "workspace_id": 50
  },
  "from": { "id": 48, "number": 9, "kind": "session", "label": null }
}
```

## Error Responses

| Status Code | Code                  | Description                                                |
| ----------- | --------------------- | ---------------------------------------------------------- |
| 400         | `invalid_name`        | `name` is empty, not a string, or longer than 255 characters |
| 400         | `invalid_version_id`  | `versionId` is not a numeric id                            |
| 403         | `PLAN_LOCKED`         | Copying versions needs a paid workspace plan               |
| 403         | `PLAN_REACH`          | This version is older than the plan can restore            |
| 403         | `enterprise_required` | API key without the Enterprise version history feature     |
| 404         | `VERSION_NOT_FOUND`   | No such version on this template                           |
| 500         | `COPY_FAILED`         | Server-side error                                          |