Skip to main content
POST
/
v1
/
broadcasts
curl --request POST \
  --url https://api.zavu.dev/v1/broadcasts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Black Friday Sale",
  "channel": "sms",
  "text": "Hi {{name}}, check out our Black Friday deals! Use code FRIDAY20 for 20% off."
}
'
{
  "broadcast": {
    "id": "brd_abc123",
    "name": "<string>",
    "status": "draft",
    "channel": "smart",
    "messageType": "text",
    "totalContacts": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "text": "<string>",
    "content": {
      "mediaUrl": "<string>",
      "mediaId": "<string>",
      "mimeType": "<string>",
      "filename": "<string>",
      "templateId": "<string>",
      "templateVariables": {}
    },
    "senderId": "<string>",
    "emailSubject": "<string>",
    "pendingCount": 123,
    "sendingCount": 123,
    "deliveredCount": 123,
    "failedCount": 123,
    "estimatedCost": 123,
    "reservedAmount": 123,
    "actualCost": 123,
    "scheduledAt": "2023-11-07T05:31:56Z",
    "startedAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "metadata": {},
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Name of the broadcast campaign.

Example:

"Black Friday Sale"

channel
enum<string>
required

Broadcast delivery channel. Use 'smart' for per-contact intelligent routing.

Available options:
smart,
sms,
whatsapp,
email
messageType
enum<string>
default:text

Type of message for broadcast.

Available options:
text,
image,
video,
audio,
document,
template
text
string

Text content or caption. Supports template variables: {{name}}, {{1}}, etc.

Example:

"Hi {{name}}, check out our Black Friday deals!"

content
object

Content for non-text broadcast message types.

senderId
string

Sender profile ID. Uses default sender if omitted.

emailSubject
string

Email subject line. Required for email broadcasts.

emailHtmlBody
string

HTML body for email broadcasts.

scheduledAt
string<date-time>

Schedule the broadcast for future delivery.

metadata
object
idempotencyKey
string

Idempotency key to prevent duplicate broadcasts.

Response

Broadcast created.

broadcast
object
required