API referenceBroadcasts
POST /broadcasts
Create a draft broadcast of an approved WhatsApp template (variableMapping fills {{n}} per recipient)
POST
BearerAuthheader
AuthorizationBearer <token>API key sk_...
application/json- body
accountId*stringWhatsApp account id
profileId?stringplatform?"whatsapp"Value in
"whatsapp"name*stringdescription?stringtemplate*message?segmentFilters?{success, broadcast}
application/json- response
success?booleanbroadcast?curl -X POST 'https://example.com/api/v1/broadcasts' \ -H 'Content-Type: application/json' \ -d '{ "accountId": "string", "name": "string", "template": { "name": "string", "language": "string" }}'Example Response
{ "success": true, "broadcast": { "id": "string", "name": "string", "description": "string", "platform": "whatsapp", "accountId": "string", "accountName": "string", "profileId": "string", "status": "draft", "template": { "name": "string", "language": "string", "components": [ {} ], "variableMapping": { "property1": { "field": "name", "customValue": "string" }, "property2": { "field": "name", "customValue": "string" } } }, "segmentFilters": { "tags": [ "string" ], "isSubscribed": true, "customFields": {} }, "messagePreview": "string", "scheduledAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "recipientCount": 0, "sentCount": 0, "deliveredCount": 0, "readCount": 0, "failedCount": 0, "pendingCount": 0, "lastError": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}