---
title: "List a template's versions"
description: "A template's history, newest first: a version is added on every publish and on every content save while it's published. `GET /api/v1/email/templates/{id}/versions`"
url: https://www.unitpost.com/docs/email/get-email-templates-id-versions
section: "Email API reference"
updated: 2026-10-13
---
# List a template's versions

`GET /api/v1/email/templates/{id}/versions`

A template's history, newest first: a version is added on every publish and on every content save while it's published. Put one back with [Restore a template version](https://www.unitpost.com/docs/email/post-email-templates-id-versions-version-restore). Page with the last row's `version` as `after`. Requires the `templates:read` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | — |
| `limit` | query | integer | no | 1–100 (default 20). |
| `after` | query | integer | no | The last `version` of the previous page. |

## Response fields (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `version` | integer | yes | 1 is the first publish; every publish, and every content save while published, adds one. |
| `subject` | string \| null | yes | — |
| `created_at` | string | yes | — |

## Responses

| Status | Description |
| --- | --- |
| 200 | A page of versions. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope. |
| 404 | Template not found. |
| 422 | A bad `limit` or `after`, or an unknown query key. |

## Example request

```bash
curl -X GET 'https://www.unitpost.com/api/v1/email/templates/tmpl_123/versions' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
```

## Example response (200)

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "template_version",
      "version": 0,
      "subject": "Welcome to Acme",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/email/get-email-templates-id-versions
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
