Send a template in bulk
curl --request POST \
--url https://cerberus.eazybe.com/staging/api/v2/meta/phone-numbers/{phoneNumberId}/messages/template/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": {
"name": "order_update",
"language": {
"code": "en"
}
},
"recipients": [
{
"to": "919900000001",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ravi"
}
]
}
]
},
{
"to": "919900000002",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Priya"
}
]
}
]
},
{
"to": "919900000003"
}
],
"concurrency": 10,
"marketing": false
}
'{
"total": 3,
"successful": 2,
"failed": 1,
"results": [
{
"to": "919900000001",
"status": true,
"data": {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAx...",
"message_status": "accepted"
}
]
}
},
{
"to": "919900000002",
"status": true,
"data": {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000002",
"wa_id": "919900000002"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAy...",
"message_status": "accepted"
}
]
}
},
{
"to": "919900000003",
"status": false,
"error": "Request failed with status code 400"
}
]
}Messaging
Send a template in bulk
Sends one template to multiple recipients with optional per-recipient components. The request returns a result for every recipient.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
messages
/
template
/
bulk
Send a template in bulk
curl --request POST \
--url https://cerberus.eazybe.com/staging/api/v2/meta/phone-numbers/{phoneNumberId}/messages/template/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": {
"name": "order_update",
"language": {
"code": "en"
}
},
"recipients": [
{
"to": "919900000001",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ravi"
}
]
}
]
},
{
"to": "919900000002",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Priya"
}
]
}
]
},
{
"to": "919900000003"
}
],
"concurrency": 10,
"marketing": false
}
'{
"total": 3,
"successful": 2,
"failed": 1,
"results": [
{
"to": "919900000001",
"status": true,
"data": {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAx...",
"message_status": "accepted"
}
]
}
},
{
"to": "919900000002",
"status": true,
"data": {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000002",
"wa_id": "919900000002"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAy...",
"message_status": "accepted"
}
]
}
},
{
"to": "919900000003",
"status": false,
"error": "Request failed with status code 400"
}
]
}A
200 response can include recipient failures. Always inspect failed and every item in results[].Authorizations
Eazybe bearer token. The token resolves the caller's organization and must be kept on the server.
Path Parameters
Meta phone-number ID returned by GET /meta/phone-numbers.
Body
application/json
{
"template": {
"name": "order_update",
"language": {
"code": "en"
}
},
"recipients": [
{
"to": "919900000001",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ravi"
}
]
}
]
},
{
"to": "919900000002",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Priya"
}
]
}
]
},
{
"to": "919900000003"
}
],
"concurrency": 10,
"marketing": false
}
Response
200 - application/json
Batch processed (check successful / failed)
Failure responses
| Status | Meaning | Action |
|---|---|---|
401 | Missing, invalid, or expired bearer token | Re-authenticate |
404 | phoneNumberId not linked to your organization | Verify the id |
400 | DTO validation failed — empty recipients, concurrency outside 1–50, non-object template, or an unknown property | Read the message array |
500 | The whole batch failed before per-recipient handling | Retry the batch |
Was this page helpful?
⌘I