Broadcast
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.
POST
/broadcasts
Schema Type:
"object"
Required Fields:
titlerecipients
Properties
id
"string"
The unique id for this broadcast.
action_url
["null","string"]
created_at
"string"
The timestamp when the broadcast was created.
topic
["string","null"]
custom_attributes
["null","object"]
title
required"string"
content
["null","string"]
category
["string","null"]
recipients
required"array"
overrides
["object","null"]
status
"object"
Example Request
{
"id": "d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"title": "Hello, World!",
"content": "Hello, World!",
"action_url": "https://example.com",
"category": "example",
"topic": "example",
"custom_attributes": {},
"recipients": [
{
"external_id": "83d987a-83fd034",
"email": "[email protected]",
"first_name": "Person",
"last_name": "Doe",
"custom_attributes": {
"plan": "enterprise",
"pricing_version": "v10",
"preferred_pronoun": "They"
},
"phone_numbers": [
"+1 5005550001"
]
}
],
"overrides": {}
}
An example follows
Broadcast{
"id": "d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"title": "Hello, World!",
"content": "Hello, World!",
"action_url": "https://example.com",
"category": "example",
"topic": "example",
"custom_attributes": {},
"recipients": [
{
"external_id": "83d987a-83fd034",
"email": "[email protected]",
"first_name": "Person",
"last_name": "Doe",
"custom_attributes": {
"plan": "enterprise",
"pricing_version": "v10",
"preferred_pronoun": "They"
},
"phone_numbers": ["+1 5005550001"]
}
],
"overrides": {}
}