Skip to main content

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​

TypeScript SDK responseMessageTemplatev12.0.0

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.

POST/message_templates/create

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​

TypeScript SDK requestMessageTemplateCreateRequestv12.0.0

Response​

Returns a top-level message_template object. Store id; it is the value Chime requests use as message_template.template_id.

Request

POST/message_templates/create
SDK versionv12.0.0
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"
}
}
POST/message_templates/update

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​

TypeScript SDK requestMessageTemplateUpdateRequestv12.0.0

Response​

Returns the updated message_template with hasUnpublishedChanges set to true.

An empty about clears that field.

Request

POST/message_templates/update
SDK versionv12.0.0
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",
})
POST/message_templates/publish

Publish a message template

Publish the current draft version. Chime sends, schedules, and broadcasts render only the published version.

Request body​

TypeScript SDK requestMessageTemplateActionRequestv12.0.0
  • 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

POST/message_templates/publish
SDK versionv12.0.0
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",
})
POST/message_templates/archive

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​

TypeScript SDK requestMessageTemplateActionRequestv12.0.0
  • Name
    id
    Type
    string
    Required
    required
    Description

    Template ID to archive.

Response​

Returns the archived message_template.

Request

POST/message_templates/archive
SDK versionv12.0.0
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",
})
POST/message_templates/lookup

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​

TypeScript SDK requestMessageTemplateLookupRequestv12.0.0
  • Name
    id
    Type
    string
    Required
    required
    Description

    Template ID to retrieve.

Response​

Returns the matching message_template.

Request

POST/message_templates/lookup
SDK versionv12.0.0
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",
})
POST/message_templates/page

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​

TypeScript SDK requestMessageTemplatePageRequestv12.0.0

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

POST/message_templates/page
SDK versionv12.0.0
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
}
]
}
}
POST/message_templates/render_preview

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

POST/message_templates/render_preview
SDK versionv12.0.0
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"
}
}
}
  • 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.