Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Templates HTTP API

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 scope read (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 · uuidrequired

    The template’s id.

  • versioninteger · int64required

    The version number, from 1.

    ≥ 1

  • project_idstring · uuid | null

    The 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-time

    When this version was saved.

  • The template engine.

    • minijinja
  • html_bodystring
  • idstring · uuid

    The template’s id, the same in every version.

  • What a template is.

    message A message: subject, HTML, text.

    partial A fragment other templates include.

  • namestring
  • project_idstring · uuid
  • subjectstring | null

    null for a partial.

  • text_bodystring | null

    null: the text is made from the HTML when the message is sent.

  • versioninteger · uint32

    From 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}