With Courier Elemental you can customize the look, language, and structure of your notification based on locale, channel, and other more advanced custom logic.

Construct an Elemental Template

All Courier Elemental templates have the following top level structure:

{
  "version": "2022-01-01",
  "elements": CourierElement[]
}

Fields

FieldTypeRequiredDescription
versionstringrequired
elementsCourierElementrequiredArray of Courier Elements

Usage

Courier Elemental can be used in place of a standard template in a /send call. To do so, pass the elemental document as the content property of the message object:

{
  "message": {
    "to": { /** etc */ },
    "content":{
      "elements": [
        {
          "type": "meta",
          "title": "My Title"
        },
        {
          "type": "text",
          "content": "Hello **world**"
        }
      ],
      "version": "2022-01-01",
    }
  }
}