Create notifications
POST {{baseUrl}}/notifications
Send a notification to one or multiple users. 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 notification.
The new notification will be shown in the notification inbox of each recipient in real-time. It will also be delivered to each recipient through all channels you have enabled for your MagicBell project.
Request Body
{"notification"=>{"title"=>"<string>", "recipients"=>[{"email"=>"<string>", "external_id"=>"<string>", "matches"=>"<string>", "enim_7"=>-16509666, "eiusmod_f"=>false, "proident_85"=>true}, {"email"=>"<string>", "external_id"=>"<string>", "matches"=>"<string>"}], "content"=>"<string>", "action_url"=>"<uri>", "custom_attributes"=>{"reprehenderit5"=>true}, "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
Key | Datatype | Required | Description |
---|---|---|---|
X-MAGICBELL-API-KEY | string | (Required) The (public) API key of your MagicBell project. | |
X-MAGICBELL-API-SECRET | string | (Required) The API secret of your MagicBell project. | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"notification":{"id":"\u003cstring\u003e","title":"\u003cstring\u003e","sent_at":"\u003cnumber\u003e","content":"\u003cstring\u003e","action_url":"\u003curi\u003e","category":"\u003cstring\u003e","topic":"\u003cstring\u003e","custom_attributes":{"officia34b":"officia mollit","anim3c":true}}}