POST
/
{workspace_key}
/
broadcast
curl --request POST \
  --url https://hub.suprsend.com/{workspace_key}/broadcast \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "list_id": "_list_id_",
  "template": "_template_slug_",
  "notification_category": "transactional",
  "channels": [
    "<string>"
  ],
  "data": {},
  "delay": "<string>",
  "trigger_at": "2023-12-25",
  "tenant_id": "<string>"
}'
"Ok"

Authorizations

Authorization
string
header
required

Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.

Path Parameters

workspace_key
string
required

Body

application/json
list_id
string
default:_list_id_
required

unique identifier to user list that you want to send broadcast messages to.

template
string
default:_template_slug_
required

Unique slug name of the template created on SuprSend dashboard. You can get this by clicking on the clipboard icon next to the Template name on SuprSend templates page.

notification_category
string
default:transactional
required

Category in which your notification belongs. You can understand more about them in the Notification Category documentation

channels
string[]

If set, broadcast will be sent only on the channels defined here irrespective of communication channels present in user profile.

data
object

Mock data to replace the template variables.

delay
string

Broadcast will be halted for the time mentioned in delay, and become active once the delay period is over. Format - XXdXXhXXmXXs or if its number (n) then delay is in seconds (n)

trigger_at
string

Trigger broadcast on a specific date-time. Format - date string in ISO 8601 eg. "2022-08-27T20:14:51.643Z"

tenant_id
string

string identifier of the tenant this broadcast is associated with

Response

202
application/json
202 - Accepted
message
string
Example:

"Accepted - OK"