Skip to main content

Prerequisites

Setup

1

Get your MagicBell credentials

In MagicBell, open your project at app.magicbell.com and copy the API key and API secret.
2

Configure in Courier

Open the in Courier, enter your API key and API secret, then click “Save.”

Profile requirements

Device tokens live on the user profile rather than on the send, so one profile can hold tokens for several devices and every push provider reads them from the same place. covers the model. MagicBell addresses the recipient by email address or by external ID. Store either one once with , which merges into the profile and creates it if it does not exist:
MagicBell matches the address against the user it holds.
Then send to user_id and Courier resolves the address. For a one-off with no stored profile, pass it inline instead: "to": { "magicbell": { "external_id": "user123" } }.

Send by user id

The call in every language, and the rest of the profile object.

Send to a recipient

Courier reads email off the saved profile, so preferences apply and the value can change without touching this code.

Overrides

covers the two levels and which one wins. lists the fields every push provider takes. Overrides change the request body Courier sends to MagicBell. This example overrides the MagicBell category and action URL:

Provider details

Courier recommends routing to the channel. Naming this key in routing.channels instead is supported, and sends through just this provider.

Send to a specific provider

When that is worth doing, and what you give up: failover, channel priority, and providers you add later.