Skip to documentation
Dashboard
Templates

List template versions

List immutable published versions newest first.

GET/api/v1/templates/{templateId}/versions
On this page

Authentication

Send a RouteKite API key as a Bearer token. This endpoint requires the template:read scope.

Required headers
NameTypeRequirementDescription
AuthorizationstringRequiredBearer API key with the required workspace scope.Example: Bearer rk_your_key

Path parameters

Path parameters
NameTypeRequirementDescription
templateIduuidRequiredThe RouteKite template identifier.Example: 27fdc190-3a56-46f0-89e8-88ac64a5087d

Request body

Request fields
NameTypeRequirementDescription
limitintegerOptionalPage size from 1 to 100. Defaults to 20.
cursorstringOptionalOpaque next_cursor from the previous page.

Response

Response fields
NameTypeRequirementDescription
objectstringAlwaysAlways list.
datatemplate_version[]AlwaysPublished version summaries newest first.
data[].iduuidAlwaysThe immutable version identifier.
data[].template_iduuidAlwaysThe owning template.
data[].version_numberintegerAlwaysThe monotonic version number.
data[].schema_versionintegerAlwaysThe canonical document schema version.
data[].subjectstringAlwaysPublished subject.
data[].preview_textstringAlwaysPublished preview text.
data[].content_hashstringAlwaysCompiled content hash.
data[].published_atdate-timeAlwaysPublication time.
data[].created_atdate-timeAlwaysVersion creation time.
has_morebooleanAlwaysWhether another page exists.
next_cursorstring | nullAlwaysOpaque cursor for the next page.

Immutable history

Version summaries include identifiers, version numbers, subjects, hashes, and publication timestamps without returning compiled bodies.

Errors

StatusCodeWhat it meansWhat to do
400INVALID_REQUEST / INVALID_JSON / INVALID_CURSORThe JSON, identifier, field, document, or cursor is invalid.Correct the reported input.
401UNAUTHORIZEDThe API key is missing, invalid, revoked, or expired.Check the Bearer header and active key.
403FORBIDDENThe key lacks the required template scope.Use template:read or template:write as documented for the operation.
429RATE_LIMITEDToo many template requests were sent.Honor Retry-After before retrying.
500TEMPLATE_OPERATION_FAILED / INTERNAL_ERRORThe template operation could not complete.Retry after a short delay.
404NOT_FOUNDThe template or version is unavailable in this workspace.Check the identifier and workspace.