List a template's versions
Returns every published version of the template addressed by idOrSlug, ordered newest first by version.
Returns every published version of the template addressed by idOrSlug, ordered newest first by version. Each item is an object: "template_version" carrying version, subject, variables, notes, and createdAt; source is omitted here — read it from the single-version endpoint. The response uses the standard list envelope but is not paginated: pagination.nextCursor is always null and pagination.hasMore always false. Responds 404 when the template does not exist or is archived. Requires the templates:read scope.
Scope: templates:read. Send the API key as a bearer token; Scopes lists what each one reaches.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
idOrSlug | string | yes | Template UUID or slug. |
Response
200 Success. Body: application/json, TemplateVersionListResponse.
| Field | Type | Required | Description |
|---|---|---|---|
object | "list" | yes | |
data | array of TemplateVersion | yes | |
pagination | Pagination | yes |
Errors
Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.
| Status | Meaning |
|---|---|
400 | The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch). |
401 | The API key is missing or invalid. |
403 | The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted). |
404 | No such resource in this account (resource_not_found). |
422 | The request is well-formed but a field failed validation (validation_failed). |
429 | Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached). |
500 | An unexpected error; retry with backoff, then contact support (internal_error). |
Archive a template
Archives the template by setting its status to archived — a soft delete that keeps every published version intact and frees the slug for reuse by a new template.
Publish a new immutable template version
Publishes a new immutable version of the template addressed by idOrSlug and assigns it the next sequential version number.