Crear una plantilla
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/wabas/{wabaId}/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_update",
"language": "en",
"category": "UTILITY",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order {{1}}",
"example": {
"header_text": [
"A-1042"
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, your order is on its way.",
"example": {
"body_text": [
[
"Ravi"
]
]
}
},
{
"type": "FOOTER",
"text": "Acme Retail"
}
]
}
'{
"id": "778899001125",
"status": "PENDING",
"category": "UTILITY"
}Plantillas
Crear una plantilla
Crear una plantilla. Consulta los parámetros, el ejemplo y las respuestas disponibles para esta operación.
POST
/
meta
/
wabas
/
{wabaId}
/
templates
Crear una plantilla
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/wabas/{wabaId}/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_update",
"language": "en",
"category": "UTILITY",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order {{1}}",
"example": {
"header_text": [
"A-1042"
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, your order is on its way.",
"example": {
"body_text": [
[
"Ravi"
]
]
}
},
{
"type": "FOOTER",
"text": "Acme Retail"
}
]
}
'{
"id": "778899001125",
"status": "PENDING",
"category": "UTILITY"
}Autorizaciones
Token bearer de Eazybe. El token identifica la organización y debe mantenerse en el servidor.
Parámetros de ruta
ID de la cuenta de WhatsApp Business devuelto por GET /meta/phone-numbers.
Cuerpo
application/json
{
"name": "order_update",
"language": "en",
"category": "UTILITY",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order {{1}}",
"example": {
"header_text": [
"A-1042"
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, your order is on its way.",
"example": {
"body_text": [
[
"Ravi"
]
]
}
},
{
"type": "FOOTER",
"text": "Acme Retail"
}
]
}
Respuesta
200 - application/json
Template submitted for review
Failure responses
| Status | Meaning | Action |
|---|---|---|
401 | Missing, invalid, or expired bearer token | Re-authenticate |
404 | wabaId not linked to your organization | Verify the id |
400 | Duplicate name+language, missing example values, invalid category, or malformed components | Read error.error_user_msg |
502 | Graph unreachable or timed out | Retry with backoff |
¿Esta página le ayudó?