API referenceBroadcasts

POST /broadcasts

Create a draft broadcast of an approved WhatsApp template (variableMapping fills {{n}} per recipient)

POST
/broadcasts

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Request Body

application/json
  1. body
accountId*string

WhatsApp account id

profileId?string
platform?"whatsapp"
Value in"whatsapp"
name*string
description?string
template*
message?
segmentFilters?

Response Body

{success, broadcast}

application/json
  1. response
success?boolean
broadcast?
Example Request
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"  }}