GET/api/v1/projects/{project_id}/templates/{template_id}/versions/{version}
get_template_version
Reads one version of a template, with its sources.
- Call it
- to see what an earlier version said, for example the one a campaign was launched with.
- Needs
- an admin key with
project_id, or a project key with scoperead(its own project; the argument is ignored), and a version the template has. - Returns
- that version, the same as
GET /api/v1/projects/{project_id}/templates/{template_id}/versions/{version}.
Arguments
- object
-
template_idstring · uuidrequiredThe template’s id.
-
versioninteger · int64requiredThe version number, from 1.
≥ 1
-
project_idstring · uuid | nullThe template’s project. An admin key must pass it; a project key’s own project is used and this is ignored.
No other arguments are accepted.
Result
The result comes back as structuredContent, with the same JSON as a text block.
- object · all fields required
-
created_atstring · date-timeWhen this version was saved.
-
engineEngineOutputThe template engine.
- minijinja
-
html_bodystring -
idstring · uuidThe template’s id, the same in every version.
-
What a template is.
messageA message: subject, HTML, text.partialA fragment other templates include. -
namestring -
project_idstring · uuid -
subjectstring | nullnullfor a partial. -
text_bodystring | nullnull: the text is made from the HTML when the message is sent. -
versioninteger · uint32From 1, one more at each save.
≥ 0
Definitions
EngineOutput
The template engine.
string · enum
- minijinja
TemplateKindOutput
What a template is.
string · enum
message A message: subject, HTML, text.
partial A fragment other templates include.
Errors
A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors
HTTP API
The same operation over HTTP: GET /api/v1/projects/{project_id}/templates/{template_id}/versions/{version}