Template

A reusable template for building emails.

archived
boolean or null

Boolean value indicating if the template has been archived.

archivedAt
string or null <date-time>

The date and time the template was archived.

bccRecipients
Array of strings or null

A list of default person and email address pairs to receive this template in the "bcc" field (e.g. [Billy Bob <billy.bob@seattle.city>])

bodyHtml
string or null <= 16777215 characters

The body HTML of the template.

bodyText
string or null <= 16777215 characters

The body text of the template.

bounceCount
integer or null

The total count of bounced mailings during this template.

ccRecipients
Array of strings or null

A list of default person and email address pairs to receive this template in the "cc" field (e.g. [Billy Bob <billy.bob@seattle.city>])

clickCount
integer or null

The total count of clicked mailings from this template.

createdAt
string or null <date-time>

The date and time the template was created.

deliverCount
integer or null

The total count of delivered mailings from this template.

failureCount
integer or null

The total count of failed mailings from this template.

lastUsedAt
string or null <date-time>

The last time the template was used.

name
string or null <= 225 characters

The name of the template.

negativeReplyCount
integer or null

The total count of negative reply mailings from this template.

neutralReplyCount
integer or null

The total count of neutral reply mailings from this template.

openCount
integer or null

The total count of opened mailings from this template.

optOutCount
integer or null

The total count of opted out mailings from this template.

positiveReplyCount
integer or null

The total count of positive reply mailings from this template.

replyCount
integer or null

The total count of replied mailings from this template.

scheduleCount
integer or null

The total count of scheduled mailings from this template.

shareType
string or null <= 255 characters

The share type must be one of "read_only," "private," or "shared".

subject
string or null

The subject line for the email to be sent.

tags
Array of strings or null

A list of tag values associated with the template (e.g. ["Sequencing", "Quick Response"]).

toRecipients
Array of strings or null

A list of default person and email address pairs to receive this template in the "to" field (e.g. ["Billy Bob billy.bob@seattle.city"])

trackLinks
boolean or null

Boolean value indicating if link tracking is on for the template.

trackOpens
boolean or null

Boolean value indicating if open tracking is on for the template.

updatedAt
string or null <date-time>

The date and time the template was last updated.

{
  • "archived": true,
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "bccRecipients": [
    ],
  • "bodyHtml": "string",
  • "bodyText": "string",
  • "bounceCount": 0,
  • "ccRecipients": [
    ],
  • "clickCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "deliverCount": 0,
  • "failureCount": 0,
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "negativeReplyCount": 0,
  • "neutralReplyCount": 0,
  • "openCount": 0,
  • "optOutCount": 0,
  • "positiveReplyCount": 0,
  • "replyCount": 0,
  • "scheduleCount": 0,
  • "shareType": "string",
  • "subject": "string",
  • "tags": [
    ],
  • "toRecipients": [
    ],
  • "trackLinks": true,
  • "trackOpens": true,
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Template Relationships

object

The attachments to be sent with this template.

object

The content cateogories with which this template is associated. Relationship contentCategoryMemberships cannot be used as a filter.

object

The creator of the template. You can use only the attribute id to filter templates by creator (e.g. filter[creator][id]=X).

object

The template favorited by the user.

object

The owner of the template. You can use only the attribute id to filter templates by owner (e.g. filter[owner][id]=X).

object

A list of default email addresses to receive this template. You can use only the attribute id to filter templates by recipients (e.g. filter[recipients][id]=X).

object

The sequence templates using the template for their content. Relationship sequenceTemplates cannot be used as a filter.

object

The template that collects all the metrics instead of current one.

object

The creator of the template. You can use only the attribute id to filter templates by updater (e.g. filter[updater][id]=X).

{
  • "attachments": {},
  • "contentCategoryMemberships": {
    },
  • "creator": {},
  • "favorites": {},
  • "owner": {},
  • "recipients": {},
  • "sequenceTemplates": {},
  • "statsTarget": {},
  • "updater": {}
}

Template Resource Metadata

METADATA NAME DESCRIPTION QUERY PARAM
canWrite A boolean value indicating whether the current API user has write access to this resource. provideAuthorizationMeta
canDelete A boolean value indicating whether the current API user has delete access to this resource. provideAuthorizationMeta

⌵ Template Actions

Get a Collection of Templates

SecuritybearerAuth and s2sAuthToken
Responses
200

OK

422

JSON error message

get/templates
Request samples
Response samples
application/vnd.api+json
{
  • "data": [
    ]
}

Create a New Template

SecuritybearerAuth
Request
Request Body schema: application/vnd.api+json
required
object
Responses
201

Created

422

JSON error message

post/templates
Request samples
application/vnd.api+json
{
  • "data": {
    }
}
Response samples
application/vnd.api+json
{
  • "data": {
    }
}

Delete an Existing Template by ID

SecuritybearerAuth
Request
path Parameters
id
required
integer
Responses
204

Deleted

422

JSON error message

delete/templates/{id}
Request samples
Response samples
application/vnd.api+json
{
  • "errors": [
    ]
}

Get a Template by ID

SecuritybearerAuth and s2sAuthToken
Request
path Parameters
id
required
integer
Responses
200

OK

404

Not Found

get/templates/{id}
Request samples
Response samples
application/vnd.api+json
{
  • "data": {
    }
}

Update a Template

SecuritybearerAuth
Request
path Parameters
id
required
integer
Request Body schema: application/vnd.api+json
required
object
Responses
200

OK

422

JSON error message

patch/templates/{id}
Request samples
application/vnd.api+json
{
  • "data": {
    }
}
Response samples
application/vnd.api+json
{
  • "data": {
    }
}