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)