Retrieve template

Returns one template.

GET/templates/:id_or_alias

Path parameters

  • id_or_aliasstringrequired

    Template ID or alias.

The template object

A reusable email. Refer to it by its ID or its alias anywhere a template is accepted.

  • objectstring

    Always template.

  • idstring

    Unique ID of the template.

  • namestring

    Its name, unique within your team.

  • aliasstring

    A stable, readable identifier, unique within your team (e.g. welcome-email). Works everywhere the ID does.

  • subjectstring

    Subject line. Can contain {{variables}}.

  • htmlstring

    HTML body. Can contain {{variables}}.

  • textstring | null

    Plain-text body.

  • fromstring | null

    Default sender, used when a send leaves out from.

  • reply_tostring | null

    Default Reply-To, used when a send leaves it out.

  • created_atstring

    When it was created (ISO 8601, UTC).

  • updated_atstring

    When it was last changed.

Request

curl -X GET 'https://api.mailvina.com/templates/:id_or_alias' \
  -H 'Authorization: Bearer mv_xxxxxxxxx'

Response

{
  "object": "template",
  "id": "f3b9756c-f4f4-44da-bc00-9f7903c8a83f",
  "name": "Welcome email",
  "alias": "welcome-email",
  "subject": "Welcome, {{name|friend}}!",
  "html": "<h1>Hi {{name|there}}</h1>"
}