Enviar una plantilla de forma masiva
curl --request POST \
--url https://cerberus.eazybe.com/prod/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"
}
]
}Mensajería
Enviar una plantilla de forma masiva
Enviar una plantilla de forma masiva. Consulta los parámetros, el ejemplo y las respuestas disponibles para esta operación.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
messages
/
template
/
bulk
Enviar una plantilla de forma masiva
curl --request POST \
--url https://cerberus.eazybe.com/prod/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"
}
]
}Autorizaciones
Token bearer de Eazybe. El token identifica la organización y debe mantenerse en el servidor.
Parámetros de ruta
ID del número de teléfono devuelto por GET /meta/phone-numbers.
Cuerpo
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
}
Respuesta
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 |
¿Esta página le ayudó?