Message templates
Use this reference for exact request attributes, response envelopes, object shape, and examples. For customer-notification patterns and when to use templates with Chimes, start with the Chimes product guide.
The message template object
A Message Template stores one channel of content. SMS templates use
sms.messageTemplate; email templates use
email.subject and
email.html. Do not mix SMS and email
content in the same template.
Properties
- Name
about- Type
string | null- Description
Optional description of the template's purpose. Omitted when no description is set.
- Name
archivedAt- Type
Date | null- Description
When the template was archived. Omitted for active templates. Archived templates cannot be updated, published, rendered, or used for new Chimes.
- Name
attachments- Type
string[]- Description
Up to 25 email attachment file IDs. Every entry must be nonempty and match
file_followed by alphanumeric characters. Attachments are accepted only for email templates. Previews return the attachment IDs, but Chime requests currently reject stored templates that contain attachments. Omitted when the template has no attachments.
- Name
channel- Type
MessageTemplateChannel- Description
Template channel:
Inttegro.MessageTemplateChannels.SmsorInttegro.MessageTemplateChannels.Email.
- Name
createdAt- Type
Date- Description
When the template was created.
- Name
draftVersion- Type
number- Description
Current draft version. The first edit after publication advances this number; later edits replace that same draft until it is published.
emailMessageTemplateEmailContent | nullEmail template content. Present whenchannelisInttegro.MessageTemplateChannels.Email.Click or tap to expandView from detailsClick or tap to expand
Optional sender mailbox template. Omitted when unset.- Name
headers- Type
MessageHeaders
View headers detailsClick or tap to expand
Optional custom header templates. Delivery, routing, and authentication headers cannot be overridden.- Name
html- Type
string- Description
- HTML template body. Required for email templates.
View reply_to detailsClick or tap to expand
Optional reply-to mailbox template. Omitted when unset.- Name
subject- Type
string- Description
- Email subject template. Required for email templates.
- Name
hasUnpublishedChanges- Type
boolean- Description
truewhen the draft differs from the published version.
- Name
id- Type
string- Description
Generated template ID. The API assigns this value; clients must not provide
id,template_id, or a custom key on create.
- Name
locale- Type
string- Description
Locale for the template. Defaults to
"en"when omitted.
- Name
name- Type
string- Description
Human-readable template name.
- Name
publishedAt- Type
Date | null- Description
When the current published version was published. Omitted until the first publication.
- Name
publishedVersion- Type
number | null- Description
Version number currently used by Chime sends. Omitted until the template is published.
- Name
purpose- Type
string- Description
Template category, such as
"receipt","shipping_update","marketing", or"reminder". The API trims and stores this value in lowercase.
smsMessageTemplateSmsContent | nullSMS template content. Present whenchannelisInttegro.MessageTemplateChannels.Sms.Click or tap to expand- Name
messageTemplate- Type
string- Description
- SMS body template. Required for SMS templates.
- Name
status- Type
MessageTemplateStatus- Description
Current lifecycle state:
Inttegro.MessageTemplateStatuses.Draft,Inttegro.MessageTemplateStatuses.Published, orInttegro.MessageTemplateStatuses.Archived.
- Name
updatedAt- Type
Date- Description
When the template was last changed.
variablesMessageTemplateVariable[]Variable declarations available inside template content. Omitted when none are declared.Click or tap to expand- Name
about- Type
string- Description
- Optional description shown to operators.
- Name
default- Type
JSONValue- Description
- Default value used when an optional variable is omitted.
- Name
items- Type
MessageTemplateVariableItem[]- Description
- Nested item fields for array variables. Nested arrays are not supported.
- Name
name- Type
string- Description
- Variable name. Must start with a lowercase letter and contain lowercase letters, numbers, or underscores.
- Name
required- Type
boolean- Description
- Whether callers must provide this variable when rendering.
- Name
type- Type
MessageTemplateVariableType- Description
Inttegro.MessageTemplateVariableTypes.Array,Inttegro.MessageTemplateVariableTypes.Boolean,Inttegro.MessageTemplateVariableTypes.Date,Inttegro.MessageTemplateVariableTypes.Datetime,Inttegro.MessageTemplateVariableTypes.Email,Inttegro.MessageTemplateVariableTypes.Integer,Inttegro.MessageTemplateVariableTypes.Number,Inttegro.MessageTemplateVariableTypes.Phone,Inttegro.MessageTemplateVariableTypes.String, orInttegro.MessageTemplateVariableTypes.Url.
- Name
version- Type
number- Description
Current template version number.
Template expressions use {{variable_name}} for values,
{{#if variable}}...{{else}}...{{/if}} for conditional
text, and {{#each items as item}}...{{/each}} for arrays.
Design templates that render safely
Every reference must match a declared variable. Rendering rejects unknown input
fields, missing required values, invalid value types, and arrays with undeclared
item fields. date values use
YYYY-MM-DD; datetime values use RFC 3339;
URL variables must be absolute HTTP or HTTPS URLs without embedded user
credentials.
SMS output can contain at most 120 Unicode characters after variables are substituted. Email variables are escaped when inserted into HTML, while subjects, mailboxes, and custom header values reject line breaks and unsafe control characters. Email HTML accepts common message-layout elements but rejects scripts, event handlers, and unsafe link or image schemes. A preview succeeds only when the rendered email contains readable text and passes content safety checks.
Create a message template
Create a reusable SMS or email template. The new template starts as
Inttegro.MessageTemplateStatuses.Draft; publish it before using it in Chime sends, schedules, or broadcasts.
Request body
- Name
about- Type
string- Description
Optional description shown alongside the template.
- Name
attachments- Type
string[]- Description
Up to 25 email attachment file IDs. Only allowed when
channelisInttegro.MessageTemplateChannels.Email. Every entry must be nonempty and matchfile_followed by alphanumeric characters, such asfile_ABC123.
- Name
channel- Type
MessageTemplateChannel- Required
- required
- Description
Inttegro.MessageTemplateChannels.SmsorInttegro.MessageTemplateChannels.Email.
emailMessageTemplateEmailContentClick or tap to expandRequired when
channelisInttegro.MessageTemplateChannels.Email. Must includeemail.subjectandemail.html; may includeemail.from,email.replyTo, andemail.headers.- Name
locale- Type
string- Description
Optional locale. Defaults to
"en".
- Name
name- Type
string- Required
- required
- Description
Human-readable template name.
- Name
purpose- Type
string- Required
- required
- Description
Template category for filtering. The API trims and stores it in lowercase.
smsMessageTemplateSmsContentClick or tap to expandRequired when
channelisInttegro.MessageTemplateChannels.Sms. Must includesms.messageTemplate.- Name
variables- Type
MessageTemplateVariable[]- Description
Variable declarations used by the SMS body, email subject, HTML, sender, reply-to, and headers.
Response
Returns a top-level message_template object. Store
id; it is the value Chime requests
use as message_template.template_id.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.create({
name: "Shipping update SMS",
channel: "sms",
purpose: "shipping_update",
variables: [
{
name: "customer_name",
type: "string",
required: true,
},
{
name: "tracking_url",
type: "url",
required: true,
},
],
sms: {
messageTemplate: "Hi {{customer_name}}, your order shipped. Track it: {{tracking_url}}",
},
}, {
idempotencyKey: "mtpl-create-shipping-sms-001",
})
Response
{
"message_template": {
"id": "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
"name": "Shipping update SMS",
"channel": "sms",
"purpose": "shipping_update",
"locale": "en",
"status": "draft",
"version": 1,
"draft_version": 1,
"has_unpublished_changes": true,
"variables": [
{ "name": "customer_name", "type": "string", "required": true },
{ "name": "tracking_url", "type": "url", "required": true }
],
"sms": {
"message_template": "Hi {{customer_name}}, your order shipped. Track it: {{tracking_url}}"
},
"created_at": "2026-06-22T10:30:00Z",
"updated_at": "2026-06-22T10:30:00Z"
}
}
Update a message template
Update mutable fields by replacing the current draft. The first edit after publication advances the draft version; later edits keep that same draft version until it is published. The published version remains stable until you publish the draft.
Request body
- Name
about- Type
string- Description
Optional replacement description.
- Name
attachments- Type
string[]- Description
Up to 25 replacement email attachment file IDs. Only allowed for email templates. Every entry must be nonempty and match
file_followed by alphanumeric characters, such asfile_ABC123. Send an empty array to clear the attachments.
- Name
channel- Type
MessageTemplateChannel- Description
Optional channel assertion. Existing templates cannot move between
Inttegro.MessageTemplateChannels.SmsandInttegro.MessageTemplateChannels.Email; create a new template for a different channel.
emailMessageTemplateEmailContentClick or tap to expandComplete replacement email content. When supplied, it must include both
email.subjectandemail.html; nested email fields are not patched individually.- Name
id- Type
string- Required
- required
- Description
Template ID to update.
- Name
locale- Type
string- Description
Replacement locale.
- Name
name- Type
string- Description
Replacement name.
- Name
purpose- Type
string- Description
Replacement purpose.
smsMessageTemplateSmsContentClick or tap to expandComplete replacement SMS content. When supplied, it must include
sms.messageTemplate.- Name
variables- Type
MessageTemplateVariable[]- Description
Replacement variable declarations. Send an empty array to remove every declaration.
Response
Returns the updated message_template with
hasUnpublishedChanges set to
true.
An empty about clears that field.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.update({
id: "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
sms: {
messageTemplate: "Hi {{customer_name}}, your order shipped. Track: {{tracking_url}}",
},
}, {
idempotencyKey: "mtpl-update-shipping-sms-001",
})
Publish a message template
Publish the current draft version. Chime sends, schedules, and broadcasts render only the published version.
Request body
- Name
id- Type
string- Required
- required
- Description
Template ID to publish.
Response
Returns the published message_template with
status set to
Inttegro.MessageTemplateStatuses.Published and hasUnpublishedChanges set to
false.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.publish({
id: "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
}, {
idempotencyKey: "mtpl-publish-shipping-sms-001",
})
Archive a message template
Archive a template so it cannot be updated, published, rendered, or used for new Chime sends. Archiving preserves the historical record and existing Chimes. Lookup and page requests continue to return the archived record; there is no unarchive operation.
Request body
- Name
id- Type
string- Required
- required
- Description
Template ID to archive.
Response
Returns the archived message_template.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.archive({
id: "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
}, {
idempotencyKey: "mtpl-archive-shipping-sms-001",
})
Look up a message template
Retrieve one template by ID. Use lookup before editing, publishing, or showing a template detail view in your dashboard.
Request body
- Name
id- Type
string- Required
- required
- Description
Template ID to retrieve.
Response
Returns the matching message_template.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.lookup({
id: "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
})
Page message templates
Retrieve a page of your templates, ordered by most recent update. Filter by channel, locale, purpose, or status when building an operator dashboard.
Request body
- Name
channel- Type
MessageTemplateChannel- Description
Filter by
Inttegro.MessageTemplateChannels.SmsorInttegro.MessageTemplateChannels.Email.
- Name
locale- Type
string- Description
Filter by locale.
- Name
page- Type
number- Description
1-based page number. Defaults to
1when omitted or nonpositive.
- Name
purpose- Type
string- Description
Filter by purpose.
- Name
size- Type
number- Description
Requested page capacity. Defaults to
25when omitted or nonpositive.
- Name
status- Type
MessageTemplateStatus- Description
Filter by
Inttegro.MessageTemplateStatuses.Draft,Inttegro.MessageTemplateStatuses.Published, orInttegro.MessageTemplateStatuses.Archived.
Response
Returns a top-level page object.
number is the page number,
messageTemplates contains the returned records,
and response size is the number of records
actually returned rather than the requested capacity. Locale and purpose
filters are applied to the selected page, so a response can contain fewer
records than the requested capacity even when later records exist.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.page({
page: 1,
size: 25,
channel: "sms",
status: "published",
})
Response
{
"page": {
"number": 1,
"size": 1,
"message_templates": [
{
"id": "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
"name": "Shipping update SMS",
"channel": "sms",
"purpose": "shipping_update",
"locale": "en",
"status": "published",
"version": 1,
"published_version": 1,
"draft_version": 1,
"has_unpublished_changes": false
}
]
}
}
Render a message template preview
Render a template with variables before sending. Preview rendering is draft-aware, so operators can check unpublished changes before publishing. Chime send, schedule, and broadcast requests still require a published version.
Request body
messageTemplateMessageTemplateReferenceRequired. Template reference and render variables.Click or tap to expand- Name
templateId- Type
string- Description
- Required. Template ID to render.
- Name
variables- Type
JSONData
View variables detailsClick or tap to expand
Values for the declared template variables.
Response
Returns the template record plus rendered channel content. SMS previews
return rendered.sms.fullMessage. Email previews return
rendered.attachments,
rendered.channel, and a
rendered.email object containing the rendered
rendered.email.from,
rendered.email.headers,
rendered.email.html,
rendered.email.replyTo,
rendered.email.safety,
rendered.email.subject, and
rendered.email.text fields when applicable. Optional
fields are omitted rather than returned as
null.
Request
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.messageTemplates.renderPreview({
messageTemplate: {
templateId: "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
variables: {
customer_name: "Gloria",
tracking_url: "https://track.example.com/OR-12345",
},
},
})
Response
{
"message_template": {
"id": "mtpl_WkPvqTrqGsopu07wfC7ttoWqmfwt48ZW7BGvYU",
"name": "Shipping update SMS",
"channel": "sms",
"status": "published",
"published_version": 1,
"draft_version": 1
},
"rendered": {
"channel": "sms",
"sms": {
"full_message": "Hi Gloria, your order shipped. Track it: https://track.example.com/OR-12345"
}
}
}
Related resources
- Send chime - Send one notification with an inline or stored template.
- Schedule chime - Schedule notifications with stored template rendering.
- Broadcast chimes - Send one rendered template to a same-channel audience.