"text".
When to use:
- Display body text, paragraphs, and descriptions
- Create headings and subheadings
- Show formatted text with styling (bold, italic, colors)
- Include inline links and images within text
- Display dynamic content with Handlebars variables
string
The text content displayed in the notification. Either this field or the
elements field must be specified. Supports Handlebars variables.TextContentElement[]
An array of Text Content Elements (string, link, img). Either this field or
content must be specified, or both. When both are present, elements takes precedence and content is ignored. See the Text content elements section below.string
Text alignment. One of
"left", "center", or "right". Defaults to "left".string
Renders the text as a heading level. One of
"text", "h1", "h2", or "subtext". Defaults to "text".string
The text color. Any valid CSS color value (e.g.,
"#007bff", "rgb(0, 123, 255)").boolean
Apply bold formatting to the text.
boolean
Apply italic formatting to the text.
boolean
Apply a strikethrough to the text.
boolean
Apply an underline to the text.
object
Region-specific content for localization. A text-node locale entry can include
content (a string), elements (a structured array of inline nodes), or both. When both are provided, elements takes precedence. See the .string[]
An array of channel names. The text renders only for the listed channels. See .
message.data (e.g., data.first_name).
Styled text
Text with formatting:
content string format:
elements array, provide locale translations as elements arrays to preserve inline formatting across languages:
content and elements are present
If a text node includes both content and elements, only elements is used. Choose one format per node. The same applies to locale entries.
If a text node uses
elements but a locale only provides content, Courier wraps that string into a single-element array for backward compatibility. Rendering still works, but any inline formatting is lost. Provide elements in your locale translations to keep it. See the for the full resolution table.content field. These sub-elements build inline text with links, images, and formatted strings.
Text content elements (string, link, img) must be children of a text element. They cannot stand alone as top-level elements.
string
required
Must be
"string".string
required
The text content displayed in the notification.
string
Text alignment. One of
"left", "center", or "right".string
Renders the text as a heading level. One of
"text", "h1", "h2", or "subtext".string
The text color. Any valid CSS color value.
boolean
Apply bold formatting to the text.
boolean
Apply italic formatting to the text.
boolean
Apply a strikethrough to the text.
boolean
Apply an underline to the text.
object
Region-specific content for localization.
string
required
Must be
"link".string
required
The text content of the link (the clickable text).
string
The address to link to. When provided, the link becomes clickable.
boolean
Disable click tracking for the link. By default, Courier tracks link clicks.
string
Text alignment. One of
"left", "center", or "right".string
Renders the text as a heading level. One of
"text", "h1", "h2", or "subtext".string
The text color. Any valid CSS color value.
boolean
Apply bold formatting to the text.
boolean
Apply italic formatting to the text.
boolean
Apply a strikethrough to the text.
boolean
Apply an underline to the text.
object
Region-specific content for localization.
string
required
Must be
"img".string
required
The source address of the image. Must be a publicly accessible URL.
string
Text used for screen readers and displayed on mouse hover. Important for accessibility.
string
How wide the image renders. Any valid CSS width value (e.g.,
"50px", "100%").string
An address to link to. Makes the image clickable.
boolean
Disable click tracking for the link (if
href is provided).string
Text alignment. One of
"left", "center", or "right".string
Renders the text as a heading level. One of
"text", "h1", "h2", or "subtext".string
The text color, for any text overlay.
boolean
Apply bold formatting (for any text overlay).
boolean
Apply italic formatting (for any text overlay).
boolean
Apply a strikethrough (for any text overlay).
boolean
Apply an underline (for any text overlay).
object
Region-specific content for localization. Can localize
src and href.- Email: ✅ Full support with all formatting options
- Push: ✅ Supported (formatting may be limited)
- SMS: ⚠️ Limited support (plain text only)
- Inbox: ✅ Full support with rich formatting
Best practices
- Use
contentfor simple text: plain text needs nothing more - Use
elementsfor rich formatting: inline links, images, or mixed styling - Avoid specifying both:
elementstakes precedence andcontentis ignored. Pick one format per node - Match locale format to root format: if your text node uses
elements, provideelementsin your locales. Acontent-only locale works but loses inline formatting - Keep text concise: long paragraphs are hard to read, especially in email
- Use headings appropriately: use
text_stylefor a proper heading hierarchy