Skip to content

Broadcasts

Send messages to thousands of recipients with a single API call

View .md

Broadcasts let you send the same message to many recipients without making individual API calls. Perfect for marketing campaigns, announcements, and bulk notifications.

Why Use Broadcasts?

Instead of making 10,000 individual API calls:

TypeScript
// Without broadcasts - 10,000 API calls for (const contact of contacts) { await zavu.messages.send({ to: contact.phone, text: "Black Friday sale starts now!", }); }

Use a single broadcast:

TypeScript
// With broadcasts - 3 API calls total const broadcast = await zavu.broadcasts.create({ name: "Black Friday Campaign", channel: "sms", text: "Black Friday sale starts now!", }); await zavu.broadcasts.contacts.add(broadcast.id, { contacts: contacts.map(c => ({ recipient: c.phone })), }); await zavu.broadcasts.send(broadcast.id);

Key Features

Batch Processing

Add up to 1,000 contacts per request. Zavu handles rate limiting and delivery optimization automatically.

Personalization

Customize each message with per-contact template variables like names, order IDs, or custom fields.

Scheduling

Schedule broadcasts for future delivery. Perfect for time-zone aware campaigns.

Real-time Progress

Poll for delivery progress with instant updates on sent, delivered, and failed counts.

Balance Reservation

When you send a broadcast, Zavu reserves the estimated cost from your balance. This ensures funds are available for the entire campaign and prevents overspending.

Code
Balance: $100.00 → Send Broadcast ($25 estimated) → Available: $75.00, Reserved: $25.00

Reserved funds are released when the broadcast completes or is cancelled. Learn more

Broadcast Lifecycle

Code
Draft → Pending Review → Approved → Scheduled (optional) → Sending → Completed ↓ ↓ Rejected ────→ Escalated ────→ Rejected Final Cancelled ↑ ↓ └──── Edit ←───┘
StatusDescription
draftInitial state. Add/remove contacts freely.
pending_reviewContent being reviewed by AI.
pending_admin_reviewPassed automated review, waiting for a person at Zavu. Every channel except email (and WhatsApp on an approved template, which skips review) stops here.
approvedReview passed, ready to send.
rejectedContent rejected, edit and retry.
escalatedSent to human review.
rejected_finalRejected by human review (cannot appeal).
scheduledWaiting to send at scheduled time.
sendingMessages being delivered.
completedAll messages processed.
cancelledBroadcast stopped before completion. Can be cancelled from any status up to and including sending, except paused and rejected_final.

Quick Example

import Zavudev from '@zavudev/sdk'; const zavu = new Zavudev({ apiKey: process.env['ZAVUDEV_API_KEY'], // This is the default and can be omitted }); // 1. Create the broadcast const broadcast = await zavu.broadcasts.create({ name: "Order Confirmation Campaign", channel: "sms", text: "Hi {{name}}, your order #{{order_id}} has shipped!", }); // 2. Add contacts with personalization await zavu.broadcasts.contacts.add(broadcast.id, { contacts: [ { recipient: "+14155551234", templateVariables: { name: "John", order_id: "ORD-001" } }, { recipient: "+14155555678", templateVariables: { name: "Jane", order_id: "ORD-002" } }, ], }); // 3. Send immediately await zavu.broadcasts.send(broadcast.id); // 4. Check progress const progress = await zavu.broadcasts.progress(broadcast.id); console.log(`${progress.percentComplete}% complete`);

Supported Channels

ChannelMessage TypesPersonalization
SMSTextTemplate variables
WhatsAppText, Image, Video, Audio, Document, TemplateTemplate variables
EmailText, HTMLTemplate variables

Limits

LimitDefaultNotes
Contacts per request1,000Add contacts in batches
Contacts per broadcast1,000Contact support to increase
Concurrent broadcastsNo limitRate limits still apply

Next Steps

API Reference

Manage broadcasts programmatically: