Pre-requisites

Create a list of users

Trigger Broadcast

You can trigger broadcast using supr_client.subscriber_lists.broadcast() method.

from suprsend import Suprsend,  SuprsendAPIException, SubscriberListBroadcast

supr_client = Suprsend(
  "_workspace_key_",
  "_workspace_secret_"
)

broadcast_body = {
"list_id": "_list_id_",
"template": "_template_slug_",
"notification_category": "promotional",

## ---- Optional Parameters ------
"data": {
  "key1": "value1",
  "key2": "value2"
},
"channels": [], # Channel keys - email, sms, whatsapp, androidpush, iospush, ms_teams, slack, webpush
"delay": "xxdxxhxxmxxs", 
"trigger_at": "ISO 8601 timestamp"
}

inst = SubscriberListBroadcast(body=broadcast_body)
resp = supr_client.subscriber_lists.broadcast(inst)
print(resp)

Broadcast body field description:

ParameterDescription
list_idlist of users that you want to send broadcast messages to.
templateAdd template slug here. You can get this slug by clicking on the clipboard icon next to the Template name on SuprSend templates page. It is the same for all channels
notification_categoryPreference Category to apply user preference settings while sending. Root categories - system / transactional / promotional
datavariable data defined in templates or workflow
channelsSpecify channels if you don’t want to send notification of all live channels in the template. Available channel keys - email, sms, whatsapp, androidpush, iospush, ms_teams, slack, webpush
delayBroadcast will be halted for the time mentioned in delay, and become active once the delay period is over. Example: 1d2h3m4s / 60
trigger_atTrigger broadcast on a specific date-time. Pass in ISO 8601 timestamp (eg. “2021-08-27T20:14:51.643Z”)