Create broadcasts

POST {{baseUrl}}/broadcasts

Create a broadcast to send notifications to upto a 1,000 recipients - users or topic subscribers. You can identify users by their email address or by an external_id.

You don't have to import your users into MagicBell. If a user does not exist we'll create it automatically.

You can send user attributes like firstname, customattributes, and more when creating a broadcast.

A new notification will be shown in the inbox of each recipient in real-time. It will also be delivered to each recipient through all channels you have enabled for your project.

Request Body

{"broadcast"=>{"title"=>"<string>", "recipients"=>[{"email"=>"<string>", "external_id"=>"<string>", "matches"=>"<string>"}, {"email"=>"<string>", "external_id"=>"<string>", "matches"=>"<string>"}], "content"=>"<string>", "action_url"=>"<uri>", "custom_attributes"=>{"minim88"=>true, "id_845"=>-30752217.949173182, "non_92"=>-88155558.28659564}, "category"=>"<string>", "topic"=>"<string>", "overrides"=>{"channels"=>{"in_app"=>{"title"=>"<string>", "content"=>"<string>", "action_url"=>"<string>"}, "email"=>{"title"=>"<string>", "content"=>"<string>", "action_url"=>"<string>"}, "web_push"=>{"title"=>"<string>", "content"=>"<string>", "action_url"=>"<string>"}, "mobile_push"=>{"title"=>"<string>", "content"=>"<string>", "action_url"=>"<string>"}}}}}

HEADERS

KeyDatatypeRequiredDescription
X-MAGICBELL-API-KEYstring(Required) The (public) API key of your MagicBell project.
X-MAGICBELL-API-SECRETstring(Required) The API secret of your MagicBell project.
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;broadcast&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;title&quot;:&quot;\u003cstring\u003e&quot;,&quot;created_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;recipients&quot;:[{&quot;topic&quot;:{&quot;subscribers&quot;:&quot;\u003cboolean\u003e&quot;}}],&quot;status&quot;:{&quot;status&quot;:&quot;enqueued&quot;,&quot;summary&quot;:{&quot;total&quot;:&quot;\u003cinteger\u003e&quot;,&quot;failures&quot;:&quot;\u003cinteger\u003e&quot;},&quot;errors&quot;:[{&quot;Duis3&quot;:-33877684.62399294,&quot;mollit_26a&quot;:false},{&quot;doloref55&quot;:&quot;do minim&quot;,&quot;ind&quot;:-76117224.3533991}]},&quot;content&quot;:&quot;\u003cstring\u003e&quot;,&quot;action_url&quot;:&quot;\u003curi\u003e&quot;,&quot;category&quot;:&quot;\u003cstring\u003e&quot;,&quot;topic&quot;:&quot;\u003cstring\u003e&quot;,&quot;custom_attributes&quot;:{&quot;labore805&quot;:96481481.68199375,&quot;mollit14&quot;:true},&quot;sent_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;overrides&quot;:{&quot;dolore_a57&quot;:true,&quot;in_fc&quot;:-71159749.65850036,&quot;officia0f&quot;:true,&quot;nostrud_838&quot;:false,&quot;nostrud__e&quot;:&quot;et elit laboris&quot;}}}