Skip to main content

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​

MethodEndpointDescription
GET/templatesList templates
GET/templates/{uuid}Get a specific template
PATCH/templates/{uuid}Update a template
DELETE/templates/{uuid}Delete a template

Template Object​

FieldTypeDescription
uuidstringUnique identifier for the template. Use it as a campaign's template_uuid.
namestringTemplate name
subjectstring|nullEmail subject line. null until set.
preheaderstring|nullPreview text shown after the subject in the inbox. null until set.
from_namestring|nullSender display name. null until set.
reply_tostring|nullReply-to email address. null until set.
from_identitystring|nullUUID of the template's sender identity. null until set.
from_emailstring|nullEmail address of the selected sender identity. null when from_identity is not set.
contentstring|nullThe template body as Markdown, or null when no body is set or the body has no Markdown form. See Template body.
content_editable_via_apibooleanfalse when the body uses layout blocks that Markdown can't author: columns, social icons, or a countdown.
content_overwrite_requiredbooleantrue 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.
audienceobjectThe recipients a campaign created from this template targets by default. See Template audience.
created_atstringISO 8601 timestamp (UTC)
updated_atstringISO 8601 timestamp (UTC) the template last changed
last_updated_atstring|nullISO 8601 timestamp (UTC) the template was last edited

List Templates returns a smaller set of these fields.

Template audience​

FieldTypeDescription
list_uuidstring|nullUUID of the template's contact list. null when not set.
segment_uuidstring|nullUUID of the template's contact segment. null when not set.
has_filtersbooleantrue 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.