Retrieve template
Returns one template.
GET/templates/:id_or_alias
Path parameters
id_or_aliasstringrequiredTemplate ID or alias.
The template object
A reusable email. Refer to it by its ID or its alias anywhere a template is accepted.
objectstringAlways
template.idstringUnique ID of the template.
namestringIts name, unique within your team.
aliasstringA stable, readable identifier, unique within your team (e.g.
welcome-email). Works everywhere the ID does.subjectstringSubject line. Can contain
{{variables}}.htmlstringHTML body. Can contain
{{variables}}.textstring | nullPlain-text body.
fromstring | nullDefault sender, used when a send leaves out
from.reply_tostring | nullDefault Reply-To, used when a send leaves it out.
created_atstringWhen it was created (ISO 8601, UTC).
updated_atstringWhen 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>"
}