Templates
List template versions
List immutable published versions newest first.
GET
/api/v1/templates/{templateId}/versionsOn this page
Authentication
Send a RouteKite API key as a Bearer token. This endpoint requires the template:read scope.
| Name | Type | Requirement | Description |
|---|---|---|---|
Authorization | string | Required | Bearer API key with the required workspace scope.Example: Bearer rk_your_key |
Path parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
templateId | uuid | Required | The RouteKite template identifier.Example: 27fdc190-3a56-46f0-89e8-88ac64a5087d |
Request body
| Name | Type | Requirement | Description |
|---|---|---|---|
limit | integer | Optional | Page size from 1 to 100. Defaults to 20. |
cursor | string | Optional | Opaque next_cursor from the previous page. |
Response
| Name | Type | Requirement | Description |
|---|---|---|---|
object | string | Always | Always list. |
data | template_version[] | Always | Published version summaries newest first. |
data[].id | uuid | Always | The immutable version identifier. |
data[].template_id | uuid | Always | The owning template. |
data[].version_number | integer | Always | The monotonic version number. |
data[].schema_version | integer | Always | The canonical document schema version. |
data[].subject | string | Always | Published subject. |
data[].preview_text | string | Always | Published preview text. |
data[].content_hash | string | Always | Compiled content hash. |
data[].published_at | date-time | Always | Publication time. |
data[].created_at | date-time | Always | Version creation time. |
has_more | boolean | Always | Whether another page exists. |
next_cursor | string | null | Always | Opaque cursor for the next page. |
Immutable history
Version summaries include identifiers, version numbers, subjects, hashes, and publication timestamps without returning compiled bodies.
Errors
| Status | Code | What it means | What to do |
|---|---|---|---|
| 400 | INVALID_REQUEST / INVALID_JSON / INVALID_CURSOR | The JSON, identifier, field, document, or cursor is invalid. | Correct the reported input. |
| 401 | UNAUTHORIZED | The API key is missing, invalid, revoked, or expired. | Check the Bearer header and active key. |
| 403 | FORBIDDEN | The key lacks the required template scope. | Use template:read or template:write as documented for the operation. |
| 429 | RATE_LIMITED | Too many template requests were sent. | Honor Retry-After before retrying. |
| 500 | TEMPLATE_OPERATION_FAILED / INTERNAL_ERROR | The template operation could not complete. | Retry after a short delay. |
| 404 | NOT_FOUND | The template or version is unavailable in this workspace. | Check the identifier and workspace. |