API Reference: Message Templates
List, create, update, and delete message templates — the reusable email and SMS bodies that the Messages API renders against recipient records.
Overview
A Message Template is a reusable outgoing-message definition — name, delivery method, suggested subject line, and a designed body — that the platform renders against a recipient DataRecord at send time. Sending an outgoing message via the Messages API means picking a template, picking a recipient, and letting the platform render and deliver. This API manages the templates themselves — CRUD operations on /v1/message-templates.
Message Templates wrap Content Templates: each message template links to a Content Template that holds the actual body content and design. This endpoint manages the message-template metadata; the body/design is authored in Message Studio in the dashboard (or via the Content Templates API for text content).
All endpoints require the OUTGOING_MESSAGES_TEMPLATES feature permission.
Endpoints
| Method | Path | SDK |
|---|---|---|
GET | /v1/message-templates | s360.messageTemplates.list() |
GET | /v1/message-templates/{outgoingMessageTemplateSimplyId} | s360.messageTemplates.get(outgoingMessageTemplateSimplyId) |
POST | /v1/message-templates | s360.messageTemplates.create(params) |
PUT | /v1/message-templates/{outgoingMessageTemplateSimplyId} | s360.messageTemplates.update(outgoingMessageTemplateSimplyId, params) |
DELETE | /v1/message-templates/{outgoingMessageTemplateSimplyId} | s360.messageTemplates.delete(outgoingMessageTemplateSimplyId) |
The MessageTemplate Resource
| Field | Type | Description |
|---|---|---|
id | string | simplyId of the template. |
name | object | Localized label (e.g. {"en": "Welcome Email"}). |
description | object? | Localized description. |
deliveryMethod | string | EMAIL or SMS. |
suggestedSubjectLine | string? | Default email subject offered at send time. Supports merge tags. |
designFormat | string | grapesjs (email designer) or document. |
publishedAt | string? | When the template was published, if it has been. |
archivedAt | string? | Set when the template has been archived. |
createdAt / updatedAt | string | ISO 8601 timestamps. |
List Templates
Supports limit (default 25, max 100), offset, and an optional deliveryMethod filter (EMAIL or SMS). Archived templates are excluded.
const templates = await s360.messageTemplates.list();
for (const tmpl of templates.data) {
console.log(`${tmpl.id}: ${tmpl.name?.en} (${tmpl.deliveryMethod})`);
}
curl -s "https://api.simply360.app/v1/message-templates?deliveryMethod=EMAIL" \
-H "Authorization: Bearer $S360_API_KEY"
Create a Template
Creation takes name (required; string or localized object) plus optional description, deliveryMethod (EMAIL default, or SMS), subjectLine, and designFormat (grapesjs default, or document). The body content and design are then authored in Message Studio.
const created = await s360.messageTemplates.create({
name: 'Registration Confirmation',
description: 'Sent after a completed registration wizard',
deliveryMethod: 'EMAIL',
subjectLine: 'You\'re registered for {{Event Name}}',
});
console.log(`Created template: ${created.data.id}`);
curl -s -X POST "https://api.simply360.app/v1/message-templates" \
-H "Authorization: Bearer $S360_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Registration Confirmation",
"subjectLine": "You'\''re registered for {{Event Name}}",
"deliveryMethod": "EMAIL"
}'
Update a Template
PUT updates the supplied fields only; unset fields are not modified. Updatable fields are name, description, and subjectLine. Delivery method and design format are fixed at creation.
await s360.messageTemplates.update('TMPL-1234-ABCD', {
subjectLine: 'See you at {{Event Name}}!',
});
Delete a Template
Archives the template (soft delete). Existing references (automations, past sends) remain intact; the template stops appearing in lists and pickers. The response is { outgoingMessageTemplateSimplyId, deleted: true }.
await s360.messageTemplates.delete('TMPL-1234-ABCD');
Merge Tags
Reference fields on the recipient record using {{ Field Title }}. The platform resolves them at send time:
Hi {{First Name}},
Your invoice #{{Invoice Number}} for {{Total Amount}} is ready.
— Team {{Team Name}}
Missing fields render as empty strings. Test with a real record in the dashboard's preview before sending in bulk.
Images from Your Team's Media
An email can show a photo from your Team's media files. In the design, the image's source is the pinned reference /api/website-media/{fileSimplyId}/versions/{versionNumber}, the same one Team Websites use. Email Studio stores it for you when you upload an image through the image picker. Ask Simply and the MCP template tools (draft_create_outgoing_message_template, draft_update_outgoing_message_template) also accept <img src="media:{fileSimplyId}" alt="..."> in html; the draft replaces it with the reference to the file's current version, or to the version you name with media:{fileSimplyId}@{versionNumber}, so the proposal you approve shows exactly what will be kept.
- Public files only. The file must belong to your Team, be an image, and be public. A private or restricted file is refused when the template is saved, with an error that names the file (in
fieldErrors.htmlfor Ask Simply and MCP,details.fieldErrors.designHtmlfor the API). A public file the Media Library keeps from public use (its usage rights are missing or expired, it is marked "Do not use", or a person in it has not given consent) is refused with that reason. Every send checks again: a file made private later stops the send rather than mailing it. Transactional email follows the same rule. - JPEG, PNG, and GIF. Emails show JPEG, PNG, and GIF images. A GIF is sent as a still image (its first frame, as a PNG). WebP, AVIF, and other formats are refused; choose or upload a JPEG, PNG, or GIF instead.
- Image sources only. The reference is read where it is an image source: an
srcorsrcsetattribute, or a CSSurl(). Use it exactly as written, with nothing after the version number: a reference with a?queryor#fragment, or one without a version, is refused when a save adds it. The same text anywhere else in the email (plain text, a merge field, a quoted reply) is left as it is. - Templates saved earlier. Editing a template only checks the images the edit adds; images it already stored are kept as they are, so a template saved before these rules can still be edited. When an email is sent, only pinned references are checked and swapped for links; any other media path is sent exactly as stored. An email template that shows media images can't be promoted to another Team, because media files belong to one Team: replace them with the target Team's images first.
- Pinned versions. A template keeps the version it was given. Replacing the media file later does not change templates already using it; pick the new version to switch.
- Links in sent email. Each send replaces the reference with a signed image link that stays valid for one year (the longest the current image-signing keys allow). Delivery history keeps the reference, and View in browser shows the image while the file is still public.
- Images still being prepared. Right after an upload, the email-ready copy of an image can take a moment to be made. A send that meets an image that is not ready yet (or a Media Library that is mid-update) is held and tried again automatically, rather than failing: campaigns and transactional messages retry it from one to five minutes apart for about an hour and a half, scheduled Automations every five minutes for about an hour, and Wizard emails on the next scheduler pass for about an hour. If the image is still not ready after that, the recipient is marked failed with a message saying so, and you can send it again. An Automation email from a run that is not retried on its own (for example a run started by a completed Wizard or by hand) is not held: its run fails at once with a message saying the image was not ready, so check the image and send the email again.
Usage Notes
- Templates created via API are usable immediately by automations and the Messages API — no warm-up step — but give them body content in Message Studio first.
- For SMS templates, set
deliveryMethod: 'SMS'; the subject line is not used for SMS delivery. - The template body lives on the linked Content Template. To manage text content or document-generation templates programmatically, use the Content Templates API.
- Names and descriptions are localized objects on the wire; passing a plain string stores it as the
envalue.