Send a WhatsApp campaign through the API
Send a WhatsApp campaign through the API: marketing template, recipients, immediate or scheduled launch, pause and resume, plan quotas, Meta's marketing limits and delivery tracking.
To send a WhatsApp campaign through the API with Genuka WA, you get a MARKETING template
approved by Meta, create the campaign with POST /api/v1/campaigns and its recipient list, then
launch it — right away or at a given date — with POST /api/v1/campaigns/{id}/launch. Sending
carries on in the background, every recipient is tracked through to read and reply, and Meta bills
delivered messages directly to your own WhatsApp Business account.
Last updated November 18, 2026
What you need before sending a campaign
- A connected number and its
connectionId— see Connecting a number. - An API key, used server-side only — see Authentication.
- A payment method on your Meta account. Genuka is a Meta Tech Provider, not a BSP: Meta bills
your WhatsApp Business Account (WABA) directly, and a client onboarded by a Tech Provider must
add its own payment method
(Meta, Partners).
Without one, the template gets approved but Meta refuses the send with error
131042, and the campaign pauses. - Recipients who agreed to hear from you. That is a WhatsApp rule, not a best practice — the opt-in section further down covers it.
How do I create the marketing template?
Outside the 24-hour customer service window, only an approved template is delivered. A campaign
always uses one. Submit it with the MARKETING category:
curl -X POST https://wa.genuka.com/api/v1/templates \
-H "Authorization: Bearer $GENUKA_WA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "con_1",
"name": "october_sale",
"language": "en_US",
"category": "MARKETING",
"components": [
{ "type": "BODY",
"text": "Hi {{1}}, 20% off the whole shop until Sunday.",
"example": { "body_text": [["Awa"]] } },
{ "type": "BUTTONS", "buttons": [
{ "type": "URL", "text": "See the offers", "url": "https://example.com/sale" }
] }
]
}'The response is a 201 carrying the template's id and its status. Meta reviews it —
review can take up to 24 hours
(Meta, Template fundamentals).
The verdict reaches your webhooks (template.status_changed) and
GET /api/v1/templates/{id}. A campaign only goes out with an approved template.
Every body variable ({{1}}, {{2}}…) needs an example, or the template is rejected. The
API reference covers media headers, named parameters and buttons.
How do I create and launch the campaign?
Create the campaign
POST /api/v1/campaigns takes four fields, all required: connectionId, templateId, name
and recipients. Each recipient carries its number in international format (+ and country
code) and its own variables. The campaign is created as draft: nothing is sent yet.
Launch it
POST /api/v1/campaigns/{id}/launch checks the campaign (quota, template, number), sets aside
opted-out contacts, then sends a first batch within the request — about forty seconds — and
answers with status, sent, failed, skipped and pending. A small campaign answers
status: "completed": everything went out. A larger one answers status: "running": the rest goes
out in the background, with no further call from you. sent means Meta accepted the message, not
that it arrived — delivery and read come afterwards, by webhook.
Follow it to the end
Poll GET /api/v1/campaigns/{id} (every 30 seconds to a minute is plenty) until status is
completed or failed, or listen to the message status webhooks. The
per-recipient detail is on GET /api/v1/campaigns/{id}/recipients. The tracking section further
down covers both.
# 1. Create the campaign (draft)
curl -X POST https://wa.genuka.com/api/v1/campaigns \
-H "Authorization: Bearer $GENUKA_WA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "con_1",
"templateId": "tpl_123",
"name": "October sale",
"recipients": [
{ "to": "+237690000001", "variables": ["Awa"] },
{ "to": "+237690000002", "variables": ["Paul"] }
]
}'
# { "data": { "id": "cmp_9", "name": "October sale", "status": "draft", "_count": { "recipients": 2 } } }
# 2. Launch it
curl -X POST https://wa.genuka.com/api/v1/campaigns/cmp_9/launch \
-H "Authorization: Bearer $GENUKA_WA_API_KEY"
# { "data": { "status": "completed", "sent": 2, "failed": 0, "skipped": 0, "pending": 0 } }
# 3. If it answered "running", follow it until "completed" or "failed"
curl https://wa.genuka.com/api/v1/campaigns/cmp_9 \
-H "Authorization: Bearer $GENUKA_WA_API_KEY"variables is a positional array for the body parameters. For a media header, a dynamic button
or named parameters, pass an object instead —
{ "body": [...], "bodyNamed": { "first_name": "Awa" }, "header": {...}, "buttons": [...] } —
the same shape as sending a template. A named-parameter template's values
go in bodyNamed: put in body, they would be sent as positional parameters.
Why is the launch refused?
These checks run before the first send: a refused launch has sent nothing and the campaign stays
draft. The most common refusals:
| Status | Code | Cause |
|---|---|---|
402 | plan_limit_messages | The list does not fit in what is left of the period's quota. Every pending recipient counts, except those set aside as opted out of a MARKETING campaign |
402 | subscription_past_due | The trial or the paid period has lapsed |
400 | send_template | The template is not approved (in review, rejected, paused) — the message says which |
409 | send_config | The number was disconnected from the API in the WhatsApp Business app (coexistence): reconnect it |
409 | number_released | The number was released from your plan: reconnect it through Embedded Signup |
403 | account_deactivated | The client that owns the number is suspended |
409 | campaign_already_launched | The campaign is no longer draft: only a draft can be launched, once |
400 | invalid_scheduled_at | scheduledAt is not an ISO 8601 date |
404 | campaign_not_found | The id does not exist or is outside your key's scope |
On creation, a templateId and a connectionId belonging to two different clients answer
400 template_connection_mismatch, and a list without a single usable to answers
400 no_valid_recipients. Other codes are in the error reference.
How does a campaign go out?
Launching moves the campaign to scheduled, then the request itself sends a first batch for about
forty seconds. Whatever is left is sent in the background by a job that runs every minute, in
batches, at the number's throughput: there is nothing for you to call again. Two campaigns on the
same number go out one after the other, since they share its throughput. Each recipient is sent
once: a batch holds the campaign while it works, and a second launch call is refused with
409 campaign_already_launched.
| Campaign status | Meaning |
|---|---|
draft | Created, not launched yet |
scheduled | Launched, waiting for its date (scheduledAt) or the next run |
running | Sending |
paused | Suspended, by you or by Genuka — pauseReason says why |
completed | Nothing left to send, at least one message went out |
failed | Nothing left to send, and not a single message went out |
cancelled | Cancelled: recipients not reached yet were moved to skipped |
How do I schedule a campaign?
Pass scheduledAt (an ISO 8601 date) in the launch body. The same checks run right away — a
quota that falls short is refused now, not at send time — then the campaign waits as scheduled
and nothing goes out before that date. A date in the past sends right away.
curl -X POST https://wa.genuka.com/api/v1/campaigns/cmp_9/launch \
-H "Authorization: Bearer $GENUKA_WA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "scheduledAt": "2026-11-20T08:00:00Z" }'
# { "data": { "status": "scheduled", "scheduledAt": "2026-11-20T08:00:00.000Z", "sent": 0, "failed": 0, "skipped": 0, "pending": 2 } }How do I pause, resume or cancel a campaign?
| Route | Effect | Refusal |
|---|---|---|
POST /api/v1/campaigns/{id}/pause | scheduled or running → paused, with pauseReason: "manual". The current batch stops at its next hundred recipients | 409 campaign_not_pausable |
POST /api/v1/campaigns/{id}/resume | paused → scheduled. A scheduledAt still ahead is kept; otherwise sending restarts right away, where it stopped | 409 campaign_not_paused |
POST /api/v1/campaigns/{id}/cancel | draft, scheduled, running or paused → cancelled. Recipients still pending move to skipped. Final | 409 campaign_not_cancellable |
None of these routes takes a body. All answer with the campaign's state:
{ "data": { "id": "cmp_9", "status": "paused", "pauseReason": "manual", "scheduledAt": "2026-11-18T09:12:04.000Z" } }Why does a campaign pause on its own?
When a cause concerns the whole campaign, Genuka pauses it instead of failing every remaining
recipient: those not reached yet stay pending, and resuming picks up exactly where it stopped.
Fix the cause, then call resume. These checks run again on every batch, so resuming before the
fix pauses the campaign again with the same reason.
pauseReason | Cause | What to do |
|---|---|---|
manual | You called pause | resume whenever you like |
plan_limit_messages | The period's quota ran out mid-send (other sends consume it too) | Add numbers, move up a tier or wait for the next period |
subscription_inactive | The trial or the paid period has lapsed | Renew the subscription |
meta_payment_method | Meta refuses the send because the WABA has no payment method (error 131042) | Add a payment method in Meta's Business Manager |
waba_access_lost | Meta no longer bills this number on your WABA: the number has probably moved to another account | Reconnect the number |
number_unavailable | The number can no longer send (released from your plan, for example) | Reconnect the number |
template_not_sendable | The template can no longer be sent (paused or disabled by Meta), or the number was disconnected from the API in the WhatsApp Business app | Get the template approved again, or reconnect the number |
company_inactive | The client that owns the number was suspended | Reactivate the client from its dashboard page |
How many messages can a campaign send?
Genuka never charges for a message; Meta still bills its own per-message fees directly to your WABA, with no markup from Genuka. Your plan includes a quota of outbound messages per paid number per billing period (Meta fees not included), shared between API sends and campaign recipients. The period's quota is: numbers paid for × the tier's per-number allowance. The counter starts again from zero with each new period: every month on a monthly subscription, at renewal on an annual one.
| Tier | Max numbers | Messages included per number per period |
|---|---|---|
| Starter | 5 | 500 |
| Growth | 15 | 5,000 |
| Scale | 100 | 30,000 |
| Enterprise | custom | custom |
Example: 3 numbers on Growth give 15,000 messages for the period. The 7-day free trial runs on the
Growth tier with one number, so 5,000 messages. Only messages Meta accepted are counted: a send
Meta refuses on the call consumes nothing, but a message accepted and then reported as failed
by webhook stays counted. Prices are on the pricing page and in Markdown at
/pricing.md.
What limits does Meta put on marketing campaigns?
The Genuka quota is not the only ceiling. Meta enforces four of its own, whatever your plan:
| Meta limit | What it says | What you see |
|---|---|---|
| Messaging limit | Unique recipients you can reach outside a customer service window, per moving 24 hours, at business portfolio level: 250 for a new portfolio, then 2,000, 10,000, 100,000, unlimited (docs) | WhatsApp Manager, Account tools > Messaging limits (same page). The messagingLimitTier from GET /api/v1/numbers?refresh=true is only indicative: it comes from a field Meta has deprecated and can be empty |
| Per-user marketing limit | WhatsApp may not deliver a marketing template to someone who receives many and reads few. Wait at least 24 hours before resending (docs) | Error 131049 on the status webhook, recipient failed |
| US numbers | WhatsApp does not currently deliver marketing templates to US phone numbers (same page) | Recipient fails |
| Throughput | 80 messages per second per number by default, 20 for a coexistence number (throughput, coexistence) | Sending is paced to it |
The per-user marketing limit is not currently active for messages sent from or to the European Economic Area, the United Kingdom, Japan and South Korea (same Meta page).
A campaign's MARKETING templates are first offered to Meta's
Marketing Messages API;
if your account does not have access to it, the send falls back to the classic endpoint without
stopping the campaign.
How much does a campaign cost on Meta's side?
Meta charges per delivered message, at the rate for the template's category and the recipient's country calling code, on your business portfolio (Meta, Pricing). Genuka adds no markup and never handles that payment.
Do I need opt-in for a WhatsApp campaign?
Yes. The WhatsApp Business policy only lets you contact someone who gave you their number and confirmed they want to receive your messages (WhatsApp Business Messaging Policy). Meta adds that the request must name your business and state clearly what the person is opting in to, through any channel you like — website, SMS, paper form (Meta, Get opt-in). Quality that stays low for a sustained period gets the number rate-limited by Meta (same page).
Genuka enforces marketing opt-outs on campaigns for you:
- When a user stops marketing messages from within WhatsApp, Meta announces it by webhook and
Genuka records it. A send refused with
131050("this recipient has chosen to stop receiving marketing messages") is recorded too. - When a
MARKETINGcampaign launches, those contacts are excluded before any send and markedskipped, with the reason. They consume neither quota nor Meta billing. UTILITYandAUTHENTICATIONcampaigns are not filtered: they are not marketing messages.
A keyword of your own ("reply STOP") is not interpreted automatically: replies reach you on
message.received, and removing those contacts from your lists is up to you.
How do I track a campaign's results?
GET /api/v1/campaigns/{id} returns the campaign, its template, its number, its dates, a stats
object counting recipients by status and a metrics object with the counts and rates the
dashboard shows:
{
"data": {
"id": "cmp_9",
"name": "October sale",
"status": "completed",
"scheduledAt": "2026-11-18T09:12:04.000Z",
"startedAt": "2026-11-18T09:12:04.000Z",
"completedAt": "2026-11-18T09:14:51.000Z",
"cancelledAt": null,
"pauseReason": null,
"createdByName": null,
"template": { "id": "tpl_123", "name": "october_sale", "language": "en_US", "status": "approved" },
"_count": { "recipients": 1200 },
"stats": { "read": 640, "delivered": 410, "sent": 95, "failed": 41, "skipped": 14 },
"metrics": {
"counts": {
"total": 1200, "pending": 0, "deferred": 0, "skipped": 14, "sent": 1170,
"delivered": 1050, "read": 640, "failed": 41, "replied": 96, "clicked": 58, "optedOut": 3
},
"rates": {
"delivered": 89.7, "read": 54.7, "replied": 8.2, "clicked": 5,
"optedOut": 0.3, "failed": 3.4, "progress": 100
}
}
}
}In stats, each recipient is counted once, under its most advanced status: a read message sits in
read, not in delivered. metrics.counts counts differently: sent there means every message
Meta accepted, including those later delivered, read or reported failed, and delivered
includes read messages. deferred is the share of pending that Meta asked to wait, with a retry
planned. replied, clicked and optedOut count the recipients who replied, tapped a quick-reply
button or opted out.
The rates in metrics.rates are percentages with one decimal, computed over sent: not over the
audience, since a recipient set aside or not sent yet could not read anything. Two exceptions:
failed is computed over sent + failed, and progress is the share of the audience already
handled (sent, failed or skipped). scheduledAt, startedAt, completedAt and cancelledAt date
each step; createdByName names the dashboard user who created it, and is null for a campaign
created through the API.
| Recipient status | Meaning |
|---|---|
pending | Not sent yet, or deferred by Meta (see nextAttemptAt) |
sent | Accepted by Meta |
delivered | Reached the phone |
read | Read — only if the recipient has read receipts on |
failed | Refused, with Meta's reason in errorMessage and its code in errorCode |
skipped | Set aside: opted out of marketing at launch, or the campaign was cancelled |
For failures, GET /api/v1/campaigns/{id}/recipients?status=failed&limit=1000 lists each recipient
with errorMessage, errorCode, attempts, nextAttemptAt, sentAt, deliveredAt, readAt,
failedAt, repliedAt, clickedAt, clickedButton and optedOutAt (200 rows by default, 1,000
at most). In real time, subscribe an endpoint to message.delivered, message.read,
message.failed and user_preference.stopped — see Webhooks.
GET /api/v1/campaigns lists your campaigns with their status, scheduledAt, pauseReason,
startedAt and completedAt.
How are replies, taps and opt-outs attributed?
Meta has no notion of a campaign: Genuka ties these actions to a send, with deliberately narrow rules.
- A reply that quotes the campaign message, or a tap on one of its quick-reply buttons, belongs to
that send, however late it comes. The button tapped is stored in
clickedButton. - Any other message belongs to the latest campaign send that person received on that number, if it is less than 72 hours old.
- A reaction (emoji) is not a reply.
- An opt-out (STOP) belongs to the latest campaign send that person received for that client, if it is less than 7 days old.
- Only the first reply and the first tap are kept:
repliedcounts recipients who replied, not messages.
How do I resend to recipients blocked by the marketing limit?
The per-user marketing limit usually shows up after the send: Meta accepts the message, then the
status webhook comes back failed with error 131049
(Meta, Per-user limits).
The recipient moves to failed, with Meta's text in errorMessage (Meta describes this error as
"This message was not delivered to maintain healthy ecosystem engagement"). That failure is final
for the campaign: launch only applies to a draft.
To try those people again, wait at least 24 hours, list
GET /api/v1/campaigns/{id}/recipients?status=failed, keep the ones whose errorCode is 131049
(or the code received on message.failed) and create a new campaign with them.
In the rarer case where Meta refuses the send itself with 131049, there is nothing for you to
do: the recipient stays pending (counted in metrics.counts.deferred) and Genuka retries it after
1 hour, then after 6 hours. On the third refusal, it moves to failed. attempts and
nextAttemptAt show where it stands.
What if I want a UI rather than an API?
The Genuka WA dashboard has a Campaigns page: you pick recipients from your contacts, by tag or by CSV import, launch or schedule the send and follow its results, without writing code. The API remains the way to automate. If you also want to segment a customer base by buying behavior, Genuka Core, Genuka's business management platform, does it: it categorizes your customers and launches targeted WhatsApp, SMS and email campaigns.
FAQ
Can I send a campaign to contacts who never messaged me?
Yes, with an approved template and their opt-in. That is exactly what a template is for: it is the only message delivered outside the 24-hour window. Meta's messaging limit (250 unique recipients per 24 hours for a new portfolio) applies to those sends.
How much does a WhatsApp campaign cost with Genuka WA?
Two separate lines. Meta bills each delivered template to your business portfolio, by category and recipient country. Genuka charges a subscription per WhatsApp number, with a message allowance included, and takes no markup on Meta's rates.
What happens if a recipient opted out?
On a MARKETING campaign, they are excluded before sending and marked skipped. They do not use
your quota and Meta charges you nothing for them.
Why is sent high but delivered low?
sent only means Meta accepted the message. Delivery receipts follow by webhook; if they do not
come, look at failed and at errors 131049 (marketing limit) or 131026 (recipient unreachable).
Can I launch the same campaign again?
No: launch only applies to a draft, and answers 409 campaign_already_launched afterwards. A
paused campaign is picked up with resume, where it stopped. To resend to failed recipients,
create a new campaign with them.
Sources
- Meta — Messaging limits
- Meta — Per-user marketing template message limits
- Meta — Throughput
- Meta — Pricing on the WhatsApp Business Platform
- Meta — Get opt-in for WhatsApp
- Meta — Template fundamentals
- Meta — Marketing Messages API: get started
- Meta — Partners (Tech Providers and Solution Partners)
- Meta — Error codes
- Meta — Onboard WhatsApp Business app users
- WhatsApp — Business Messaging Policy
- Genuka — genuka.com
WhatsApp order notifications from your backend
Send WhatsApp order confirmations, shipping and delivery updates from your backend: utility templates, variables, idempotency and delivery statuses.
Receive WhatsApp replies and statuses via webhook
Receive WhatsApp replies and delivery statuses on your server: register a webhook, verify the HMAC signature, deduplicate, handle retries and replay.