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.
The snippet 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": "[email protected]"
}
],
"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
sms.title
sms.content
sms.action_url
Provider Overrides
You can use notification.overrides
to send provider-specific data and customize the behavior of any provider. The data is sent to the provider's API as-is: MagicBell does not validate or transform it.
For example, you can:
- Add CC and BCC recipients for Postmark
- Use a SendGrid email template
- Tag an email in Mailgun
- Specify the "from" in Amazon SES
- Modify the badge of your iOS app icon
- Pass the URL of an image to display in a Firebase notification
- Make use of Slack's Block Kit
- ...And anything the provider's API supports
More details in the provider-specific docs: