Enviar qualquer tipo de mensagem compatível
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "919900000001",
"type": "image",
"image": {
"id": "1234567890123456",
"caption": "Your invoice"
}
}
'{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAxFQIAERgSN0EyRjc4...",
"message_status": "accepted"
}
]
}Mensagens
Enviar qualquer tipo de mensagem compatível
Enviar qualquer tipo de mensagem compatível. Consulte os parâmetros, o exemplo e as respostas disponíveis para esta operação.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
messages
Enviar qualquer tipo de mensagem compatível
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "919900000001",
"type": "image",
"image": {
"id": "1234567890123456",
"caption": "Your invoice"
}
}
'{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "919900000001",
"wa_id": "919900000001"
}
],
"messages": [
{
"id": "wamid.HBgMOTE5OTAwMDAwMDAxFQIAERgSN0EyRjc4...",
"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
Resposta
200 - application/json
Message accepted for delivery
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 | Gateway rejected the send — malformed message object, unopted-in recipient, closed 24-hour window, or rate limit | Read message; check server logs for the upstream body |
Esta página foi útil?