Kişi kartları gönder
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/messages/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "919900000001",
"contacts": [
{
"name": {
"formatted_name": "Acme Support",
"first_name": "Acme"
},
"phones": [
{
"phone": "+919900000000",
"type": "WORK",
"wa_id": "919900000000"
}
],
"emails": [
{
"email": "support@acme.com",
"type": "WORK"
}
]
}
]
}
'{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAxFQIAERgS...",
"message_status": "accepted"
}
]
}Mesajlaşma
Kişi kartları gönder
Kişi kartları gönder. Bu işlem için parametreleri, örneği ve kullanılabilir yanıtları inceleyin.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
messages
/
contacts
Kişi kartları gönder
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/messages/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "919900000001",
"contacts": [
{
"name": {
"formatted_name": "Acme Support",
"first_name": "Acme"
},
"phones": [
{
"phone": "+919900000000",
"type": "WORK",
"wa_id": "919900000000"
}
],
"emails": [
{
"email": "support@acme.com",
"type": "WORK"
}
]
}
]
}
'{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAxFQIAERgS...",
"message_status": "accepted"
}
]
}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 telefon numarası kimliği.
Gövde
application/json
{
"to": "919900000001",
"contacts": [
{
"name": {
"formatted_name": "Acme Support",
"first_name": "Acme"
},
"phones": [
{
"phone": "+919900000000",
"type": "WORK",
"wa_id": "919900000000"
}
],
"emails": [
{
"email": "support@acme.com",
"type": "WORK"
}
]
}
]
}
Yanıt
200 - application/json
Contact card accepted
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 | contacts missing name.formatted_name, or outside the 24-hour window | Fix the contact object |
Bu sayfa yararlı mıydı?