Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Templates

List versions

GET/v1/templates/{id}/versions

List a template’s saved versions, newest first.

Requires a full-access key.

A version is recorded on every create, update, publish and restore: kind is saved, published or restored. author is the teammate’s email, or API key. The newest 50 versions are kept. List items leave out the bodies; retrieve a version for them.

Path parameters

idstringrequired
Template id or alias.

Errors

restricted_api_keyHTTP 403
not_foundHTTP 404
template not found
GET/v1/templates/{id}/versions
curl 'https://zapsmtp.xyz/v1/templates/welcome/versions' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "019a1f5a-3d4e-7f50-9a61-7b8c9d0e1f2a",
      "kind": "published",
      "author": "API key",
      "name": "Welcome",
      "subject": "Welcome, {{first_name}}",
      "created_at": "2026-10-22T15:10:00Z"
    },
    {
      "id": "019a1f58-2b3c-7d4e-8f50-6a7b8c9d0e1f",
      "kind": "saved",
      "author": "jane@acme.com",
      "name": "Welcome",
      "subject": "Welcome, {{first_name}}",
      "created_at": "2026-10-22T14:52:00Z"
    }
  ]
}