Broadcast Primitive
A broadcast captures a noteworthy change that you want to notify your users about. It can be anything from a new message in a chat app to a new order in an e-commerce platform. MagicBell provides a simple API to create broadcasts and specify recipients.
Broadcasts have the following characteristics:
- They target specific recipients, which can be individual users or topics with subscribers.
- They contain title and optional content that gets delivered to recipients.
- They can include custom attributes for application-specific data.
- They support channel-specific overrides to customize the content for different delivery channels.
- They provide status tracking to monitor delivery progress and failures.
Lifecycle
- You create a broadcast with recipients and content.
- MagicBell processes the broadcast, creating notifications for each recipient.
- Notifications are delivered through configured channels based on user preferences.
- Status information tracks the progress and any delivery failures.
Best Practices
- Keep broadcast titles concise and descriptive.
- Use categories and topics to organize broadcasts for better user preference management.
- Leverage channel-specific overrides when content needs to be formatted differently for various channels.
- Monitor broadcast status to identify and address delivery issues.
- Use custom attributes to add contextual information that might be useful in your application.
Schema
The URL recipients will be directed to when interacting with the broadcast.
The label used to group broadcasts.
The body content delivered with the broadcast.
The timestamp when the broadcast was created.
Arbitrary custom data associated with the broadcast.
The unique id for this broadcast.
Channel- or provider-specific values that override the defaults.
Show child attributesHide child attributes
Overrides that are scoped to specific providers for a channel.
Show child attributesHide child attributes
Provider-specific overrides for Sendgrid.
Provider-specific overrides for Twilio.
Provider-specific overrides for Mailgun.
Provider-specific overrides for Firebase Cloud Messaging.
Provider-specific overrides for Apple Push Notification service.
Provider-specific overrides for the web push provider.
Provider-specific overrides for Microsoft Teams.
Provider-specific overrides for AWS SES.
Provider-specific overrides for Expo push notifications.
Provider-specific overrides for Slack.
Overrides that are scoped to individual delivery channels.
Show child attributesHide child attributes
Overrides for SMS notifications.
Show child attributesHide child attributes
The channel-specific title.
The channel-specific content.
The link associated with the channel-specific notification.
Overrides for in-app notifications.
Show child attributesHide child attributes
The link associated with the channel-specific notification.
The channel-specific title.
The channel-specific content.
Overrides for mobile push notifications.
Show child attributesHide child attributes
The channel-specific title.
The channel-specific content.
The link associated with the channel-specific notification.
Overrides for email notifications.
Show child attributesHide child attributes
The link associated with the channel-specific notification.
The channel-specific title.
The channel-specific content.
A collection of users or filters that determine who receives the broadcast.
Show child attributesHide child attributes
The recipient specification for the broadcast.
The runtime state of the broadcast execution.
Show child attributesHide child attributes
The overall processing status of the broadcast.
The summary counts for total recipients and failures.
Show child attributesHide child attributes
The number of recipients that the broadcast was sent to.
The number of failures while processing the broadcast.
A list of errors encountered while processing the broadcast.
Show child attributesHide child attributes
Show child attributesHide child attributes
The details about the processing error.
The subject or headline that will be shown to recipients.
The topic that further classifies the broadcast.
Example
{
"id": "d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"title": "Hello, World!",
"content": "I come from broadcast",
"action_url": "https://example.com",
"category": "example",
"topic": "example",
"custom_attributes": {},
"recipients": [
{
"external_id": "83d987a-83fd034",
"email": "test@example.com",
"first_name": "Person",
"last_name": "Doe",
"custom_attributes": {
"plan": "enterprise",
"pricing_version": "v10",
"preferred_pronoun": "They"
},
"phone_numbers": ["+1 5005550001"]
}
],
"overrides": {}
}