Retrieve a template
Read a template with its draft and published versions and their variables.
/v1/emails/templates/{templateId}Authorization
Bearer token
- Authorizationrequiredheader
Send your API key as
Bearer YOUR_API_KEY.
Path parameters
templateIdrequiredstringThe template ID, as used in
templateIdwhen sending.
Response
idstringTemplate ID.
namestringDisplay name.
aliasstringTemplate alias.
descriptionstring or nullOptional description.
categorystring or nullOptional category.
originstringOne of
"custom""prebuilt"published_version_idstring or nullThe version sends use.
draft_version_idstring or nullThe unpublished draft, if any.
archived_atstring or nullWhen the template was archived. Archived templates cannot be sent.
usage_countnumberHow many sends used the template.
last_used_atstring or nullWhen a send last used the template.
published_versionobject or nullThe full published version.
draft_versionobject or nullThe full draft version.
Each version has version_number, status, subject, html, text, preview_text, published_at, and variables. published_version.variables lists exactly the variables a send uses. A version's content is the dashboard editor's document; build on html and text instead.