---
title: "Update a template"
method: PATCH
path: "/v1/templates/{id}"
tags: ["Templates"]
---

# Update a template

`PATCH /v1/templates/{id}`

## Request

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

Content changes (subject, body, from) bump the version and snapshot the new content for rollback.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `type` 'transactional' | 'marketing': Marketing templates get the unsubscribe footer and respect the subscribed flag.
  - `subject` string
  - `body` string: HTML with `{{variable}}` placeholders.
  - `fromName` string
  - `fromEmail` string, email

## Response `200`

The updated template.

- 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)
