Şablon oluştur
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"
}Şablonlar
Şablon oluştur
Şablon oluştur. Bu işlem için parametreleri, örneği ve kullanılabilir yanıtları inceleyin.
POST
/
meta
/
wabas
/
{wabaId}
/
templates
Şablon oluştur
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"
}Yetkilendirmeler
Eazybe bearer tokenı. Token kuruluşu tanımlar ve sunucuda güvenli tutulmalıdır.
Yol Parametreleri
GET /meta/phone-numbers tarafından döndürülen WhatsApp Business hesabı kimliği.
Gövde
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"
}
]
}
Yanıt
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 |
Bu sayfa yararlı mıydı?