API referenceTemplates
Retrieve a template
GET
/templates/{id}By tpl_… id or alias: the draft, its publish state and whether it differs from the published version.
Authorization
apiKey AuthorizationBearer <token>
A project API key: Authorization: Bearer s0_…
In: header
Path Parameters
id*string
Length
1 <= length <= 64Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/templates/string"{ "object": "template", "id": "string", "name": "string", "alias": "string", "status": "draft", "from": "string", "reply_to": [ "string" ], "subject": "string", "preheader": "string", "html": "string", "text": "string", "variables": [ { "key": "string", "type": "string", "fallback_value": "string" } ], "published_version_id": "string", "current_version_id": "string", "react": "string", "published_at": "2019-08-24T14:15:22Z", "has_unpublished_versions": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Create a template POST
Saves a draft with HTML, optional text, subject, preheader, sender defaults and up to 50 variables (`{{{KEY}}}`, `{{{KEY|fallback}}}` or `{{ KEY | default: "x" }}`). Publish it before sending with it. React Email is not compiled server-side: send the rendered `html` (`react` is stored as source only).
Update a template PATCH
Changes the draft; sends keep using the published version until you publish again.