Preview. This site is still being built. Features, prices and terms may change, and nothing here is a binding offer. Read the preview notice

Preview. Still being built; nothing here is a binding offer. Details

CMS · email templates

7 routes. Paths are relative to https://api.intersink.com/v1.

All groups

List the channel's email templates

GET/cms/channels/{channelId}/email-templates

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
pagenumber, queryMinimum 1.
limitnumber, queryMinimum 1, maximum 100.
statusstring, queryOne of: "draft", "published", "archived".
qstring, querySearch in the title/name

Response

200. The payload in data is not described in the spec yet.

Create an email template (key unique per channel)

POST/cms/channels/{channelId}/email-templates

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path

Request body application/json

FieldTypeDescription
categorystringAt most 60 characters. Example: "Transactional"
body_textstringPlain-text alternative body ({{var}} placeholders) At most 50000 characters.
variablesstring[]Documented variables (informational; used by preview)
keyrequiredstringUnique per channel At most 80 characters. Example: "order-confirmation"
namerequiredstringAt most 120 characters. Example: "Order confirmation"
subjectrequiredstringAt most 255 characters. Example: "Your order {{order_id}} is confirmed"
body_htmlrequiredstringHTML body. Sanitized server-side; {{var}} is HTML-escaped At most 100000 characters.
statusstringOne of: "draft", "published".

Response

201. The payload in data is of type object.

Get an email template

GET/cms/channels/{channelId}/email-templates/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
idrequirednumber, path

Response

200. The payload in data is of type object.

Update an email template (incl. status)

PATCH/cms/channels/{channelId}/email-templates/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
idrequirednumber, path

Request body application/json

FieldTypeDescription
categorystringAt most 60 characters. Example: "Transactional"
body_textstringPlain-text alternative body ({{var}} placeholders) At most 50000 characters.
variablesstring[]Documented variables (informational; used by preview)
keystringAt most 80 characters. Example: "order-confirmation"
namestringAt most 120 characters.
subjectstringAt most 255 characters.
body_htmlstringAt most 100000 characters.
statusstringOne of: "draft", "published", "archived".

Response

200. The payload in data is of type object.

Delete an email template

DELETE/cms/channels/{channelId}/email-templates/{id}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
idrequirednumber, path

Response

200. The payload in data is not described in the spec yet.

Render with sample variables → {subject, html, text, missing}. {{x}} is HTML-escaped

POST/cms/channels/{channelId}/email-templates/{id}/preview

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
idrequirednumber, path

Request body application/json

FieldTypeDescription
variablesobjectSample values (max 16 KB). {{x}} is escaped in HTML.

Response

200. The payload in data is of type object.

Emails sent on the channel's behalf (sign-in codes, invites, notifications) with their built-in copy, and whether the channel customised each

GET/cms/channels/{channelId}/email-templates/system

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path

Response

200. The payload in data is not described in the spec yet.