Channel Overrides
notification.overrides
is an optional body parameter you can set when you
create a notification. It is
used to change a specific channel's title, content, and action url when that
content should differ from other channels.
Below illustrates how to make the subject of an email different from the title of other notifications.
{
"notification": {
"title": "Task assigned to you: Upgrade to Startup plan",
"content": "Hello, please upgrade us to the Startup plan. Thank you.",
"category": "billing",
"recipients": [
{
"email": "dan@example.com"
}
],
"overrides": {
"channels": {
"email": {
"title": "[Urgent] Upgrade to Startup plan"
},
"web_push": {
"title": "Task assigned to you"
}
}
}
}
}
The keys accepted are:
in_app.title
in_app.content
in_app.action_url
email.title
email.content
email.action_url
web_push.title
web_push.content
web_push.action_url
mobile_push.title
mobile_push.content
mobile_push.action_url
Provider Overrides
You can use notification.overrides
to send payoad specific to a
delivery provider like Postmark,
Mailgun or
Firebase.
The data is sent to the provider's API. MagicBell does not validate or transform this data. Please refer to your provider's API reference, here you have links to some of the providers we integrate with:
For example, you can add cc and bcc recipients for Postmark sending this payload to the create notifications endpoint:
{
"notification": {
"title": "Task assigned to you: Upgrade to Startup plan",
"content": "Hello, please upgrade us to the Startup plan. Thank you.",
"category": "billing",
"recipients": [
{
"email": "dan@example.com"
}
],
"overrides": {
"providers": {
"postmark": {
"Cc": "mila@example.com",
"Bcc": "hana@example.com"
}
}
}
}
}