Broadcasts API
A broadcast is a message sent proactively from the bot to a user, without the user sending a request first. It is a great way to reengage your users, for example to remind them about a conversation they didn't finish, or let them know a product they ordered has been shipped.
POST /broadcasts
Send a broadcast on the requested channel (supported channels only) to the requested client. Broadcast requests are queued and usually sent within a few seconds. If a target is unavailable, no error is generated.
Request example
curl "https://clients.csml.dev/v1/api/broadcasts" \
-H 'content-type: application/json' \
-H 'accept: application/json' \
-H 'x-api-key: ${X-API-KEY}' \
-d $'{
"payload": {
"content": {
"flow_id": "myflow"
},
"content_type": "flow_trigger"
},
"client": {
"user_id": "some-user-id"
},
"metadata": {
"somekey": "somevalue"
}
}'
Response example
Last updated
Was this helpful?