Why Courier Elemental?
Courier Elemental is the single format behind every Courier template: one multichannel wrapper that holds content of any type. A template is a JSON list of content blocks (text, image, action, and more), or a raw payload like an HTML document, and Courier renders it across every channel you send on: email, push, SMS, inbox, and chat. Define the notification once, and Elemental adapts it per channel, locale, and recipient.
For email, you can build with Elemental blocks or drop in a complete HTML document. See Providing email content for how the two forms differ and when to use each.
Elemental Capabilities
Courier Elemental supports adaptive, multi-channel notifications. Here’s a quick overview of the main capabilities:Localization
Automatically serve content in your users’ preferred language using Elemental’s built-in locale system. Define translations once and Courier handles the rest based on the recipient’s locale.Learn more about localization in the Locales documentation.
Channel-Specific Customization
Customize your notification content for different channels using channel elements or thechannels property. Send detailed emails and concise SMS from the same template structure.
Using channel elements:
channels property:
Learn more about channel customization in the Control Flow documentation.
Dynamic Logic
Use conditional rendering, loops, and element references to create notifications that adapt to your data and user context. Conditional rendering withif:
loop:
ref:
Learn more about dynamic logic in the Control Flow documentation.
Where Elemental is Used
Elemental is the format everywhere content lives in Courier:- Stored templates: Templates are stored as Elemental. Edit them visually in Design Studio or Courier Create, or manage the same templates programmatically through the Templates API. The designer and the API read and write the same Elemental, so a template built in one is editable in the other. Design Studio wraps email content in a
channel: emailelement. - Inline sends: Pass Elemental directly in a Send API request to send a one-off notification without storing a template.
Construct an Elemental Template
All Courier Elemental templates have the following top level structure. When used in API calls, this structure is passed as thecontent property of the message object:
message.content:
Required Fields
string
required
Specifies the Elemental format version. The only supported value at this time is
"2022-01-01"CourierElement[]
required
Array of Courier Elements. See the Elements Index for a complete reference of all available element types.
Understanding Elemental Structure
Elemental templates use a tree-like structure where elements can contain other elements. Theelements array is the root container, and many element types support nested elements arrays of their own.
Element Nesting
Elements can be nested within other elements to create complex, hierarchical structures: Container elements that support nesting:group- Groups elements together for conditional logic or loopschannel- Contains channel-specific element collectionscolumns- Containscolumnelements, which in turn contain their own elementslist- Containslist-itemelements, which can contain text content or nested lists
- The root
elementsarray contains achannelelement - The
channelelement contains its ownelementsarray withmetaandgroupelements - The
groupelement contains acolumnselement - The
columnselement containscolumnelements - Each
columncontains its ownelementsarray withimageandtextelements
Tree Structure Benefits
This hierarchical structure enables:- Logical grouping: Related elements can be grouped together
- Conditional rendering: Entire groups can be shown or hidden based on conditions
- Reusable patterns: Common element combinations can be encapsulated in groups
- Channel customization: Different branches of the tree can target different channels
- Complex layouts: Nested structures enable multi-column and grid layouts
For a complete reference of all available element types and their properties, see the Elements Index.