Skip to documentation
Dashboard
Templates

List templates

List non-system workspace templates with purpose and state filters.

GET/api/v1/templates
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

Request body

Request fields
NameTypeRequirementDescription
purposemarketing | transactionalOptionalMatch one template purpose.
statedraft | publishedOptionalMatch one template state.
limitintegerOptionalPage size from 1 to 100. Defaults to 20.
cursorstringOptionalOpaque next_cursor from the previous page.

Response

Response fields
NameTypeRequirementDescription
objectstringAlwaysAlways list.
datatemplate[]AlwaysMatching templates.
objectstringAlwaysAlways template.
iduuidAlwaysThe template identifier.
namestringAlwaysThe template name.
descriptionstring | nullAlwaysOptional template description.
purposemarketing | transactionalAlwaysThe immutable compliance purpose.
source_modevisual | htmlAlwaysThe immutable authoring mode.
statedraft | publishedAlwaysThe current template state.
industrystring | nullAlwaysOptional industry metadata.
tonestring | nullAlwaysOptional tone metadata.
published_version_iduuid | nullAlwaysThe current immutable published version.
created_atdate-timeAlwaysWhen the template was created.
updated_atdate-timeAlwaysWhen the template metadata or state last changed.
draft_revisioninteger | nullList itemThe saved draft revision, or null.
draft_updated_atdate-time | nullList itemWhen the saved draft changed, or null.
has_morebooleanAlwaysWhether another page exists.
next_cursorstring | nullAlwaysOpaque cursor for the next page.

Newest changes first

Templates are ordered by updated_at and ID, newest first. Use next_cursor unchanged to continue.

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.