Skip to main content

Overview

The meta element contains information describing the notification that may be used by a particular channel or provider. The most important field is the title field, which is used as the title for channels that support it (email subject lines, push notification titles, etc.). When to use:
  • Set email subject lines
  • Set push notification titles
  • Provide channel-specific titles
  • Include metadata for notification processing

Basic Example

{
  "type": "meta",
  "title": "Thank you for signing up!"
}

Fields

type
string
required
The type of element. For meta elements, this value must be "meta".
title
string
The title to be displayed by supported channels:
  • Email: Used as the email subject line
  • Push: Used as the push notification title
  • Inbox: Used as the notification title
This field supports Handlebars variables for dynamic content.
locales
object
Region-specific content for localization. Can localize the title field. See the Locales documentation for more details.
channels
string[]
An array of channel names. The meta element will only be applied for the specified channels. See Control Flow documentation for details.

Examples & Variants

Basic Title

Simple title for email subject or push notification:
{
  "type": "meta",
  "title": "Thank you for signing up!"
}

Dynamic Title with Handlebars

Use variables in the title:
{
  "type": "meta",
  "title": "Hello, {{first_name}} {{last_name}}"
}
The variables come from message.data (e.g., data.first_name, data.last_name).

Channel-Specific Titles

Different titles for different channels:
{
  "type": "meta",
  "channels": ["email"],
  "title": "Order Confirmation - Check Your Email"
},
{
  "type": "meta",
  "channels": ["push"],
  "title": "Order Confirmed!"
},
{
  "type": "meta",
  "channels": ["sms"],
  "title": "Order #{{order_id}} confirmed"
}

Localized Titles

Localize titles for different languages:
{
  "type": "meta",
  "title": "Welcome!",
  "locales": {
    "es": {
      "title": "¡Bienvenido!"
    },
    "fr": {
      "title": "Bienvenue!"
    },
    "de": {
      "title": "Willkommen!"
    }
  }
}

Combined Dynamic and Localized

Use both Handlebars and localization:
{
  "type": "meta",
  "title": "Order #{{order_id}} Confirmed",
  "locales": {
    "es": {
      "title": "Pedido #{{order_id}} Confirmado"
    },
    "fr": {
      "title": "Commande #{{order_id}} Confirmée"
    }
  }
}

Multiple Meta Elements

Use multiple meta elements for different purposes:
{
  "version": "2022-01-01",
  "elements": [
    {
      "type": "meta",
      "channels": ["email"],
      "title": "Your Weekly Newsletter"
    },
    {
      "type": "meta",
      "channels": ["push"],
      "title": "New Newsletter Available"
    },
    {
      "type": "text",
      "content": "Check out this week's updates..."
    }
  ]
}

Channel Usage

Email

The title field becomes the email subject line. This is one of the most important fields for email deliverability and open rates.
{
  "type": "meta",
  "title": "Your order has shipped!"
}

Push Notifications

The title field becomes the push notification title. Keep it concise (typically 40-60 characters).
{
  "type": "meta",
  "title": "New message from John"
}

SMS

Meta elements are typically not used for SMS, as SMS doesn’t support titles/subjects.

Inbox

The title field is used as the notification title in the inbox.

Best Practices

  • Keep titles concise: Especially for push notifications (40-60 characters recommended)
  • Use dynamic content: Include relevant information like order numbers, names, etc.
  • Localize titles: Provide translations for all supported languages
  • Test subject lines: Email subject lines significantly impact open rates
  • Channel-specific optimization: Tailor titles for each channel’s requirements
  • Avoid spam triggers: Don’t use all caps, excessive punctuation, or spam keywords