---
title: "Roll back to a version"
method: POST
path: "/v1/templates/{id}/rollback"
tags: ["Templates"]
---

# Roll back to a version

`POST /v1/templates/{id}/rollback`

## Request

- Base URL: `https://api.volanea.com`
- URL: `https://api.volanea.com/v1/templates/{id}/rollback`
- Auth: HTTP bearer

Restores an old version's content as a new version (history is never rewritten).

## Path parameters

- `id` string, required

## Request body

- object
  - `version` integer, required

## Response `200`

The template at its new version.

- Template
  - `templateId` string, required
  - `projectId` string
  - `name` string, required
  - `type` 'transactional' | 'marketing', required
  - `subject` string, required
  - `body` string, required
  - `fromName` string, nullable
  - `fromEmail` string, email, required
  - `version` integer, required: Bumped on every content change; old versions are kept for rollback.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `401`: Missing or invalid API key.
- `404`: Not found.
- `422`: Request validation failed (code `validation_error`, 422).

---

[API](https://skmtc.dev/volanea/apis/volanea-api.md) · [All operations](https://skmtc.dev/volanea/apis/volanea-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volanea/apis/volanea-api/revisions/9e187ae84fda?raw)
