WhatsApp Campaign API
Launch WhatsApp broadcast campaigns from your code or an AI agent — target tags, lists, CRM segments or a spreadsheet, personalize per recipient, and read delivery results.
What you can do
- Create & run campaigns via
POST /campaignsand/campaigns/{id}/run, or send ad-hoc with/campaigns/send. - Target tags, lists, CRM segments, or an explicit phone list — the audience is built for you.
- Personalize approved template variables per recipient.
- Stay compliant — opted-out and spam-flagged contacts are excluded automatically; recipients can opt out by replying.
- Read results with
/campaigns/{id}/results— per-recipient message id and status.
Ad-hoc template broadcast
Base URL: https://api.gambot.co.il/api/v1. Prefer templates for cold audiences (they deliver outside the 24h window).
POST https://api.gambot.co.il/api/v1/campaigns/send
Authorization: Bearer gmbt_your_token
{
"messageType": "Template",
"templateId": "promo_launch_0626",
"keys": ["VIP"], // target the "VIP" tag
"dryRun": true // preview audience & counts first
}Regular vs template broadcasts
A regular (free-text) broadcast only reaches recipients whose 24-hour window is open and silently skips the rest — so it is wrong for a cold audience. Gambot makes this explicit: for AI agents, a regular broadcast returns a confirmation-required state with the count of recipients who would be missed, and recommends a template instead.
An approved template broadcast can initiate conversations outside the window, so it is the right tool for announcements, promotions and reminders.
With an AI agent (MCP)
You Send the promo_launch template to everyone tagged VIP.
You Preview how many contacts a regular broadcast would actually reach.
You How did the launch campaign perform?
Via the Gambot MCP server, campaigns run through the same API — see the WhatsApp MCP page.
Run your first campaign
Create a free account, connect WhatsApp, and launch a personalized campaign via API or MCP.
Frequently asked questions
How do I send a WhatsApp campaign via API?
Create a campaign and run it (POST /campaigns then /campaigns/{id}/run) or send ad-hoc with POST /campaigns/send, targeting tags, lists, CRM segments or a phone list. Use dryRun to preview the audience first.
Are opt-outs and consent handled?
Yes. Broadcasts automatically exclude opted-out and spam-flagged contacts, and recipients can opt out by replying; responses echo consent/opt-out details.
Can I personalize templates per recipient?
Yes — map values to the template variables for each recipient (including from a spreadsheet).
Should I loop send-text to reach many people?
No. Use campaigns for bulk sends — they handle throughput, per-recipient variables, consent and reporting. The API and MCP guide you to campaigns for large audiences.