Enviar cartões de contato
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"
}
]
}Mensagens
Enviar cartões de contato
Enviar cartões de contato. Consulte os parâmetros, o exemplo e as respostas disponíveis para esta operação.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
messages
/
contacts
Enviar cartões de contato
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"
}
]
}Autorizações
Token bearer da Eazybe. O token identifica a organização e deve ser mantido no servidor.
Parâmetros de caminho
ID do número de telefone retornado por GET /meta/phone-numbers.
Corpo
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"
}
]
}
]
}
Resposta
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 |
Esta página foi útil?