Criar um modelo
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"
}Modelos
Criar um modelo
Criar um modelo. Consulte os parâmetros, o exemplo e as respostas disponíveis para esta operação.
POST
/
meta
/
wabas
/
{wabaId}
/
templates
Criar um modelo
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"
}Autorizações
Token bearer da Eazybe. O token identifica a organização e deve ser mantido no servidor.
Parâmetros de caminho
ID da conta do WhatsApp Business retornado por GET /meta/phone-numbers.
Corpo
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" } ] }
Resposta
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 foi útil?