Templates need an API key with the
broadcast permission. See Set up Broadcast.Templates and versions
A template has a name and a list of versions. You create a template, then create versions in it. A version holds:
A version cannot be edited once it exists. To change the content, create a new version. Earlier versions stay available, so you can go back to one. Each create request makes a new version, even when the content is the same as an existing one.
You can read the HTML and text of a version at any time.
Publish a version
Publishing makes a version the active one of its template. New broadcasts use the active version. To go back to an earlier version, publish it again. A template isdraft until you publish its first version, then published.
The content is checked when you publish. A version is refused when:
- it uses a
{{...}}token that is not supported. See Personalization. - the HTML has no unsubscribe link. A text body, when there is one, needs it too.
- it references a contact property your organization has not defined, or a variable the version does not declare.
- it is too large, or references too many contact properties.
Personalization
Personalization lets one version produce a different message for each recipient and each broadcast. You place tokens in the subject, the HTML, or the text. Each token is replaced when the message is sent.
Any other
{{...}} construct, such as a Handlebars helper or block, is not supported.
Contact properties
Write{{contact.PropertyName}} with the exact name and letter case of a contact property defined in your organization. {{contact.Plan}} and {{contact.plan}} are two different properties.
When a recipient has no value for the property, the default value of its definition is used, or an empty value when there is no default.
Declared variables
A declared variable holds a value that changes with each broadcast rather than with each recipient, such as a promo code or an event date. Do not put sensitive data in it, such as health data or religious beliefs. You declare variables when you create a version, each with a name, a type (string, number, or boolean), and an optional default value. Reference one in the content by its name alone, for example {{promo}}.
Each broadcast supplies its own values. A variable with no value on the broadcast uses its default, and sending is refused when there is neither. See Personalization variables.
What a broadcast sends
A broadcast sends one version of its template.- When you create a broadcast, it uses the active version of the template at that moment.
- Publishing a new version later does not change a broadcast that already uses a version. To move a
draftorscheduledbroadcast to the new active version, set its template again. - When the template had no active version yet, the broadcast uses the version that is active when it is sent. For a scheduled broadcast, that is when the schedule fires.
- The subject of the broadcast, when you set one, replaces the subject of the version.
queued, its content and settings can no longer change. See Create and send a broadcast.
Delete a template
Deleting a template deletes its versions. You cannot delete a template while any broadcast, including a sent one, uses it or one of its versions.Next steps
Create and send a broadcast
Bind a template to a broadcast and send it
Unsubscribe and suppression
The unsubscribe link that the placeholder becomes
