Retrieve a template
One template by name. Built-in templates come back rendered with their example data.
/v1/templates/{name}API keyLooks the name up the same way a send does: a template stored in the project first, then the built-in templates.
- A stored template comes back as saved, with its variables unrendered and its current
version. - A built-in template comes back with
subject,htmlandtextrendered from its example data, so you can see what it looks like.id,versionand the timestamps arenull.
Path parameters
The template name, for example order-shipped or welcome.
Response
tmpl_… for stored templates, null for built-in ones.
db for stored templates, git for built-in ones.
null for built-in templates.
The template name.
Stored: the unrendered subject. Built-in: the subject rendered from the example data.
Stored: the unrendered HTML. Built-in: the rendered HTML.
Stored: the text body or null. Built-in: the rendered plain text.
{ name, required, example } for each variable.
The current version of a stored template. null for built-in ones.
ISO 8601 timestamp, or null for built-in templates.
ISO 8601 timestamp, or null for built-in templates.
Errors
| Status | Code | When |
|---|---|---|
| 404 | template_not_found | No stored or built-in template with this name. |