Skip to main content
Send an Inbox message using the Send API, including inbox as a routing channel. Routing channels control the delivery method for a message. Other channels include email, SMS and push.
Sending to the Inbox channel requires the Courier Inbox provider to be added to your workspace.In your workspace navigate to Integrations > Add Integration > Inbox > Courier to add the provider.
In the example below, we call the Send API to send a message to a user’s Inbox with variable interpolation.
curl -X POST https://api.courier.com/send \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "to": {
        "user_id": "example_user"
      },
      "content": {
        "title": "How does {{ villain }} like his toast?",
        "body": "On the dark side."
      },
      "data": {
        "villain": "Darth Vader"
      },
      "routing": {
        "method": "single",
        "channels": ["inbox"]
      }
    }
  }'

Passing data with an Inbox message

If you provide information in the data field, it will be passed with the inbox or push message to the SDK. Data that is referenced in your content payload or in a template (like {{ villain }} in the example above), will be interpolated. Data that is not referenced will still be passed through with the message. This can be particularly useful for deep linking, opening a particular view in your app from a link or push notification.

Using Courier Elemental Syntax

Inbox SDKs support a subset of Elemental syntax. Elemental is a JSON-based templating format for composing cross-platform notifications.
ElementWebiOSAndroid
Title
Body
Text
Action
Check out the full list of elements for syntax and examples.