# Restore Template Version

> Put an earlier design back on the template as a new step on its timeline

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

---

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.

Puts the version's design back on the template. A restore never rewinds the timeline, it extends it: the live design is kept as a `restore` row ("before restoring v6"), then the restored design is written and kept as a `restored` row pointing at what was put back. Restoring is therefore always reversible.

The design (pages, canvas, thumbnail mode) is restored. Name, description, tags, folder and sharing stay as they are. Every open studio tab is told the template changed and offers Reload or Keep mine.

## Endpoint

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

## URL Parameters

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

## Request

**Request**
```js
await fetch(
  "https://api.orshot.com/v1/studio/templates/12345/versions/48/restore",
  {
    method: "POST",
    headers: { Authorization: "Bearer <ORSHOT_API_KEY>" },
  },
);
```

**Response**
```json
{
  "success": true,
  "template": {
    "id": 12345,
    "name": "Launch banner",
    "updated_at": "2026-09-15T11:42:10.221+00:00",
    "current_version": "1a47b02b-19f7-41ed-9528-939611fcb219",
    "page_count": 3
  },
  "restored": { "id": 48, "number": 9, "kind": "session", "label": null },
  "version": { "id": 61, "number": 13, "kind": "restored", "ref_version_id": 48 }
}
```

## Response Fields

| Field                   | Type   | Description                                                                       |
| ----------------------- | ------ | --------------------------------------------------------------------------------- |
| `template.updated_at`   | String | The template's new design version token; send it as `base_updated_at` on later writes |
| `restored`              | Object | The version that was put back                                                     |
| `version`               | Object | The new `restored` row on the timeline                                            |

## Error Responses

| Status Code | Code                  | Description                                                          |
| ----------- | --------------------- | -------------------------------------------------------------------- |
| 400         | `invalid_version_id`  | `versionId` is not a numeric id                                      |
| 403         | `PLAN_LOCKED`         | Restoring 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                                     |
| 409         | `TEMPLATE_CHANGED`    | The template was saved while restoring; nothing was written. Retry   |
| 422         | `SNAPSHOT_UNREADABLE` | The stored design could not be decoded                               |