Skip to main content
Templates are pre-defined messages with text and optional media. They support merge tokens that auto-populate contact fields when sending, so you can personalize messages at scale without writing custom copy for every recipient.

The Template object

id
integer
Unique identifier for the template.
name
string
Display name of the template.
local_id
string
Client-provided unique identifier. Use this to map templates to records in your own system.
content
object
A GalleryContent object containing the message text and optional images. See the Content object section below.
team_id
integer
Identifier of the team that owns this template.
creator_id
integer
Identifier of the user who created the template.
shared
boolean
Whether the template is shared with all members of the team.
created
string
ISO 8601 timestamp when the template was created.
updated
string
ISO 8601 timestamp when the template was last updated.
rev
integer
Revision number. Increments on each update.
archived
boolean
Whether the template has been archived.

The GalleryContent object

text
string
The message body. May contain merge tokens such as {{first_name}}.
Array of GalleryEntry objects representing images attached to the message.

Merge tokens

Merge tokens let you personalize template text using contact field values. When a message is sent, Heymarket replaces each token with the corresponding value from the recipient’s contact record.
TokenReplaced with
{{first_name}}Contact’s first name
{{last_name}}Contact’s last name
{{custom_field_name}}Value of a custom contact field

Endpoints

MethodEndpointDescription
POST/v1/templateCreate a template
GET/v1/template/{id}Get a template by ID
PUT/v1/template/{id}Update a template
DELETE/v1/template/{id}Delete a template
POST/v1/templatesList templates