# Name the Current Version

> Keep the template as it is now under a name. Named versions are never pruned

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

---

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.

Stores the template exactly as it is now as a **named version**. Named versions are never pruned and can always be restored on a paid plan. If the current design is already on the timeline, that row is promoted to a named version instead of stored twice.

## Endpoint

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

## URL Parameters

| Parameter    | Type    | Required | Description               |
| ------------ | ------- | -------- | ------------------------- |
| `templateId` | Integer | Yes      | ID of the studio template |

## Request Body

| Field   | Type   | Required | Description                                 |
| ------- | ------ | -------- | ------------------------------------------- |
| `label` | String | Yes      | Name of the version, 1 to 80 characters     |

## Request

**Request**
```js
await fetch("https://api.orshot.com/v1/studio/templates/12345/versions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({ label: "Approved for launch" }),
});
```

**Response**
```json
{
  "success": true,
  "version": {
    "id": 57,
    "number": 12,
    "kind": "named",
    "label": "Approved for launch",
    "protected": true,
    "row_updated_at": "2026-09-15T11:31:19.576+00:00",
    "page_count": 3,
    "previews": ["https://storage.orshot.com/.../p1.png", "", ""]
  }
}
```

Returns `201` when a new row was written and `200` when an existing state was promoted or renamed.

## Error Responses

| Status Code | Code                  | Description                                                        |
| ----------- | --------------------- | ------------------------------------------------------------------ |
| 400         | `label_required`      | `label` missing or empty                                           |
| 400         | `invalid_label`       | `label` is not a string                                            |
| 400         | `label_too_long`      | `label` is longer than 80 characters                               |
| 400         | `invalid_body`        | Request body is not a JSON object                                  |
| 403         | `PLAN_LOCKED`         | Naming versions needs a paid workspace plan                        |
| 403         | `enterprise_required` | API key without the Enterprise version history feature             |
| 404         | —                     | Template not found in your workspace                               |
| 409         | `NAMED_CAP`           | The plan's named-version slots for this template are used up       |