Enviar un mensaje de plantilla
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/messages/template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "919900000001",
"template": {
"name": "order_update",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ravi"
}
]
}
]
}
}
'{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAxFQIAERgSN0EyRjc4...",
"message_status": "accepted"
}
]
}Mensajería
Enviar un mensaje de plantilla
Enviar un mensaje de plantilla. Consulta los parámetros, el ejemplo y las respuestas disponibles para esta operación.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
messages
/
template
Enviar un mensaje de plantilla
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/messages/template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "919900000001",
"template": {
"name": "order_update",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Ravi"
}
]
}
]
}
}
'{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAxFQIAERgSN0EyRjc4...",
"message_status": "accepted"
}
]
}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
Respuesta
200 - application/json
Template accepted for delivery
Failure responses
| Status | Meaning | Action |
|---|---|---|
401 | Missing, invalid, or expired bearer token | Re-authenticate |
404 | phoneNumberId not linked to your organization | Verify the id |
500 | Template name/language not found, template not approved, or parameter count mismatch | Confirm the template is APPROVED and parameters match |
¿Esta página le ayudó?