Skip to main content
You can create a notification template using the Notification Designer. After you create a template (or edit an existing one), add a new channel and select “Inbox”. This will provide you with a blank template that you can use to customize the content that will delivered with that notification. When calling the API, replace the content field with a template field that defines either a Template ID or an Event ID.
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"  },  "template": "TEMPLATE_OR_EVENT_ID",  "data": {  "villain": "Darth Vader"  },  "routing": {  "method": "single",  "channels": ["inbox"]  }  }  }' 

Data Mapping

When Data Payload Mapping is enabled, keys under the data property will be passed through to Inbox clients. To enable data mapping navigate to a notification template with Inbox, select Channel Settings ( menu) > Data Mapping, and toggle Enabled. Values in the message send request payload are accessible by calling request(value). By default keys are mapped one-to-one from the message payload to the message received by the client:
{  data: request("data") } 

Data mapping enabled

Email and Inbox Event Sync

By default, Email and Inbox channels in the same notification template have event statuses synced. This means that if a notification is sent via the in-app inbox and email channels, opening the email will mark the in-app inbox notification read. If you’d like emails and inbox messages to update independently, you can disable this feature by toggling Opt Out of Inbox Sync in the Courier Inbox provider settings.
Inbox Toggle Sync

Centralized Notification System for iOS, Web, and Android

Markdown Rendering

The Courier Inbox provider can be configured to render rich text in templates to Markdown. For example, when Markdown rendering is enabled italicized text will be output as _italicized text_. Enable Markdown rendering by selecting Markdown Rendering from the Rendering Version dropdown menu in the Courier Inbox provider settings.
@trycourier/react-inbox v1.13.0 and above automatically render Markdown-formatted messages.Other SDKs, including the latest Courier React SDK (v8), do not include built-in Markdown rendering. We recommend new and existing apps migrate to v8. See the Courier React v8 migration guide for details on how to upgrade and support Markdown, if required by your app.