Templates
A template is a saved email design that you can use as the starting point for new campaigns.
Overview
Templates are saved in the dashboard, from a campaign or an automation email. This endpoint group lets you list the templates on your account, read one, update it, and delete it. To use a template, send its uuid as template_uuid on Create Campaign.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /templates | List templates |
| GET | /templates/{uuid} | Get a specific template |
| PATCH | /templates/{uuid} | Update a template |
| DELETE | /templates/{uuid} | Delete a template |
Template Object
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the template. Use it as a campaign's template_uuid. |
name | string | Template name |
subject | string|null | Email subject line. null until set. |
preheader | string|null | Preview text shown after the subject in the inbox. null until set. |
from_name | string|null | Sender display name. null until set. |
reply_to | string|null | Reply-to email address. null until set. |
from_identity | string|null | UUID of the template's sender identity. null until set. |
from_email | string|null | Email address of the selected sender identity. null when from_identity is not set. |
content | string|null | The template body as Markdown, or null when no body is set or the body has no Markdown form. See Template body. |
content_editable_via_api | boolean | false when the body uses layout blocks that Markdown can't author: columns, social icons, or a countdown. |
content_overwrite_required | boolean | true when the body carries formatting Markdown can't preserve. Sending content then requires overwrite: true, both on Update Template and on Create Campaign with this template's template_uuid. |
audience | object | The recipients a campaign created from this template targets by default. See Template audience. |
created_at | string | ISO 8601 timestamp (UTC) |
updated_at | string | ISO 8601 timestamp (UTC) the template last changed |
last_updated_at | string|null | ISO 8601 timestamp (UTC) the template was last edited |
List Templates returns a smaller set of these fields.
Template audience
| Field | Type | Description |
|---|---|---|
list_uuid | string|null | UUID of the template's contact list. null when not set. |
segment_uuid | string|null | UUID of the template's contact segment. null when not set. |
has_filters | boolean | true when the template's audience includes filter conditions. These include the conditions of the template's segment, so a template with a segment_uuid normally reports true. |
The API does not return the filter conditions themselves. A template with has_filters: true and no list or segment still has an audience — see Audience for how such conditions behave on the campaign created from it.
A template with no list, no segment, and has_filters: false has no audience, which is usual for a template saved from an automation email. A campaign created from it lists audience in readiness.missing until an audience is set.
Template body
content is a Markdown version of the body. When content_editable_via_api is false, it is a lossy approximation: columns are stacked, and social icons and countdowns are omitted.
A campaign created with template_uuid receives the complete body, including its layout and styling. Copying content into a new campaign's content field keeps only what the Markdown holds.
Templates and campaigns
A template can't be sent or scheduled. To send one, create a campaign from it. The campaign holds its own copy, so updating or deleting the template doesn't change campaigns already created from it.
Template and campaign UUIDs are separate: a campaign's UUID on /templates/{uuid} returns 404, and so does a template's UUID on /campaigns/{uuid}. List Campaigns does not include templates, and a segment condition on campaign activity can't reference one.