Queues an approved WhatsApp template message as a branded broadcast to one or more recipients, using the Meta-style payload format.
Endpoint
POST {{base_url}}/whatsappBranded/24/{{username}}/messages
Replace {{username}} in the URL with your account username (must match the JWT).
Authentication
Required. Send a JWT in the header:
Authorization: Bearer <jwt_token>
{{base_url}} = https://wa20.nuke.co.in/v6/api
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer <jwt_token> |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messaging_product | string | Yes | Must always be "whatsapp". |
to | array of strings | Yes | Recipient phone numbers with country code. This endpoint is broadcast-only — always send an array, even for a single recipient. |
type | string | Yes | Must always be "template". |
template | object | Yes | Template definition. |
template.name | string | Yes | Exact approved template name from your account. |
template.language.code | string | Yes | Meta language code like en, en_US, or supported language input that can be normalized. |
template.components | array | No | Required only when the template needs variables, a media header, or button parameters. Applied identically to every recipient in the broadcast. |
All recipients receive the same
template.components(same variables/media/buttons) — this endpoint doesn't support per-recipient personalized variables in a single call.
Example Request
{
"messaging_product": "whatsapp",
"to": [
"9198XXXXXXXX",
"9197XXXXXXXX"
],
"type": "template",
"template": {
"name": "templateName",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://3225b5de-a0f2-4563-86da-dcecda736e70.jpg"
}
}
]
},
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Rahul" },
{ "type": "text", "text": "+91 9876543210" },
{ "type": "text", "text": "https://XYZ.com" }
]
}
]
}
}
curl --location '{{base_url}}/whatsappBranded/24/{{username}}/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{bearer_token}}' \
--data '{
"messaging_product": "whatsapp",
"to": ["9198XXXXXXXX", "9197XXXXXXXX"],
"type": "template",
"template": {
"name": "templateName",
"language": { "code": "en" },
"components": [
{
"type": "header",
"parameters": [
{ "type": "image", "image": { "link": "https://3225b5de-a0f2-4563-86da-dcecda736e70.jpg" } }
]
},
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Rahul" },
{ "type": "text", "text": "+91 9876543210" },
{ "type": "text", "text": "https://driveocall.com" }
]
}
]
}
}'
Example Response — 202 Accepted
{
"success": true,
"message": "Template campaign queued successfully",
"request_id": "WCAMP_20260803_93908137",
"username": "demo_official",
"template_name": "billing_12",
"category": "utility",
"contacts": 2
}
Response Fields
| Field | Description |
|---|---|
success | Whether the request was accepted. |
message | Confirmation that the campaign was queued. |
request_id | Unique campaign ID, in the format WCAMP_YYYYMMDD_XXXXXXXX. Use this to track the campaign. |
username | Your account username. |
template_name | Name of the template that was queued. |
category | Template category, derived from the approved template — marketing, utility, or auth. |
contacts | Number of valid recipients accepted into the broadcast (after normalization/validation). |
How It's Processed
- Every number in
tois normalized and validated (8–20 digits after cleanup); invalid numbers are dropped silently, and the count in the response reflects only valid recipients. - The template is looked up for your account and must be approved — body/header placeholder counts and language must match the approved template, same as the regular Send Template Message API.
- Once validated, the broadcast is handed off to a background queue and processed asynchronously — the
202 Acceptedresponse means it's queued, not that every message has been sent yet. - Each recipient is recorded under this campaign's
request_idfor tracking.
Validation Rules
messaging_productmust be"whatsapp".tomust contain at least one valid recipient (8–20 digit number after normalization) — the request fails if none are valid.typemust be"template".template,template.name, andtemplate.language.codeare required.template.components, if present, must be an array.- The template must exist for your account and be approved.
template.language.codemust match the approved template's language.- Body/header component parameter counts must match the number of placeholders (
{{1}},{{2}}, etc.) in the approved template.
Error Responses
| Status | Message | Reason |
|---|---|---|
400 | messaging_product must be whatsapp | Invalid or missing messaging_product. |
400 | to is required and must contain at least one valid recipient | to missing or empty. |
400 | No valid recipient phone numbers provided | None of the numbers in to passed validation. |
400 | type must be template | Type is not template. |
400 | template must be an object | Template payload missing/invalid. |
400 | template.name is required | Template name missing. |
400 | template.language.code is required | Template language missing/unrecognized. |
400 | template.components must be an array | Invalid components type. |
404 | Template not found | No matching approved template for this username. |
409 | Template is pending Meta approval | Template exists but not approved yet. |
409 | Template was rejected by Meta | Template was rejected. |
409 | Template is not approved for sending | Template status is not sendable. |
422 | Template language does not match the approved template | Language mismatch with stored approved template. |
422 | Template body parameter count does not match the approved template | Body placeholder count mismatch. |
422 | Template header parameter count does not match the approved template | Header placeholder count mismatch. |
500 | (dynamic error message) | Internal failure while queueing the broadcast. |
Notes
- This endpoint is for branded broadcasts only — it always expects
toas an array. There is no single-recipient variant for this channel. - Branded broadcasts are tracked separately from regular WhatsApp Template broadcasts — they use their own request ID series (
WCAMP_...) and their own internal processing queue. - The Get Contacts by Request ID endpoint documented for regular templates reads from the standard template contacts table — it does not currently return contacts for branded broadcasts, since branded broadcast recipients are stored separately. Confirm with your team whether a dedicated "Get Branded Contacts" endpoint exists or is planned before pointing users to one for status tracking.
- As with the regular bulk template endpoint, all recipients in one request receive identical
template.components— for personalized variables per recipient, send separate requests.
