WhatsApp Bulk Messaging API — Full Tutorial 2026
WhatsApp bulk messaging lets you send personalised messages to thousands of contacts at once — product launches, promotions, event reminders, or service announcements. With a 98% open rate, it dramatically outperforms email newsletters.
This tutorial shows you how to run a bulk WhatsApp campaign using the WapiConnect API with rate-controlled delivery to keep your number safe.
Run Your First WhatsApp Campaign Free
7-day trial included. No credit card required.
Start Free TrialWhy Rate Control Matters
Sending 1,000 messages in 30 seconds is the fastest way to get your WhatsApp number flagged or banned. WhatsApp's systems detect unusual sending patterns. The solution: add delays between messages and spread your campaign over time.
A safe sending rate for a warm number is 30–60 messages per minute with random delays between each send.
Step 1 — Prepare Your Contact List
Your contact list should be an array of objects with at least a phone number, and optionally a name for personalisation:
// contacts.js
const contacts = [
{ name: 'Rahul', phone: '919876543210' },
{ name: 'Priya', phone: '919876543211' },
{ name: 'Arjun', phone: '919876543212' },
// ... more contacts
];
module.exports = contacts;
Step 2 — Use the Bulk Broadcast API
WapiConnect's bulk broadcast endpoint handles rate limiting automatically. You submit your campaign and the platform queues and delivers messages at a safe rate:
const contacts = require('./contacts');
const campaign = {
sessionId: process.env.WAPICONNECT_SESSION_ID,
contacts: contacts.map(c => ({
number: c.phone,
message: `Hi ${c.name}! 🎉 Our biggest sale of the year starts tomorrow.\n\nGet 40% off everything at wapiconnect.cloud\n\nReply STOP to opt out.`
})),
delayBetweenMessages: 3000, // 3 seconds between each message
};
const response = await fetch('https://api.wapiconnect.cloud/api/bulk-send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.WAPICONNECT_API_KEY
},
body: JSON.stringify(campaign)
});
const result = await response.json();
console.log('Campaign ID:', result.campaignId);
// Use campaignId to track delivery status
Step 3 — Send in Batches (Alternative Approach)
If you prefer manual control, use the single-send endpoint with a sleep function:
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
async function runCampaign(contacts, messageTemplate) {
const results = [];
for (const contact of contacts) {
const message = messageTemplate.replace('{{name}}', contact.name);
try {
const res = await fetch('https://api.wapiconnect.cloud/api/send-message', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.WAPICONNECT_API_KEY
},
body: JSON.stringify({
sessionId: process.env.WAPICONNECT_SESSION_ID,
number: contact.phone,
message
})
});
const data = await res.json();
results.push({ phone: contact.phone, success: data.success });
console.log(`Sent to ${contact.phone}: ${data.success ? 'OK' : 'FAILED'}`);
} catch (err) {
results.push({ phone: contact.phone, success: false, error: err.message });
}
// Random delay between 2–4 seconds
const delay = 2000 + Math.random() * 2000;
await sleep(delay);
}
return results;
}
runCampaign(contacts, 'Hi {{name}}! Your exclusive offer is ready.')
.then(results => {
const sent = results.filter(r => r.success).length;
console.log(`Campaign complete: ${sent}/${results.length} delivered`);
});
Step 4 — Track Delivery with Webhooks
Set up a webhook in the WapiConnect portal to receive real-time delivery updates:
// Express.js webhook receiver
app.post('/webhook/whatsapp', express.json(), (req, res) => {
const { event, messageId, status, phone } = req.body;
if (event === 'message.delivered') {
console.log(`Delivered to ${phone} — messageId: ${messageId}`);
// Update your DB
}
if (event === 'message.read') {
console.log(`Read by ${phone}`);
}
res.sendStatus(200);
});
Bulk Messaging Best Practices
- Only message opt-in contacts — users must have explicitly agreed to receive messages from you.
- Always include an opt-out option — "Reply STOP to unsubscribe" protects both you and your recipients.
- Personalise every message — even just a first name significantly reduces complaint rates.
- Send at sensible hours — avoid early mornings and late nights in the recipient's time zone.
- Keep messages relevant — irrelevant messages get reported, and reported numbers get banned.
- Spread large campaigns across multiple sessions — WapiConnect supports multi-session for exactly this reason.
Message Template Ideas for Bulk Campaigns
// Promotional
`Hi ${name}! 🛍️ Flash sale — 30% off all plans today only.
Visit wapiconnect.cloud to grab your discount.
Reply STOP to opt out.`
// Event reminder
`Hi ${name}, just a reminder — our webinar starts in 1 hour.
Join here: [link]
See you soon! 👋`
// Re-engagement
`Hi ${name}, we miss you! 👋
You haven't logged in for 30 days. Come back and see what's new.
Reply HELP for support or STOP to unsubscribe.`
Launch Your First WhatsApp Campaign
Bulk broadcast included in all paid plans. Try free for 7 days.
Start Free Trial