curl --request POST \
--url https://api.omni.z-api.io/v1/channels/{channelId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"identifier": "5511999999999"
},
"content": {
"type": "INTERACTIVE_BUTTON",
"body": {
"message": "Como você avalia nosso atendimento?"
},
"attachments": [
{
"id": "1",
"title": "Ótimo"
},
{
"id": "2",
"title": "Bom"
},
{
"id": "3",
"title": "Regular"
}
]
}
}
'{
"messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}Mensagens
Enviar texto com botões
Envie mensagens de texto com botões de resposta rápida
POST
/
v1
/
channels
/
{channelId}
/
messages
curl --request POST \
--url https://api.omni.z-api.io/v1/channels/{channelId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"identifier": "5511999999999"
},
"content": {
"type": "INTERACTIVE_BUTTON",
"body": {
"message": "Como você avalia nosso atendimento?"
},
"attachments": [
{
"id": "1",
"title": "Ótimo"
},
{
"id": "2",
"title": "Bom"
},
{
"id": "3",
"title": "Regular"
}
]
}
}
'{
"messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}Conceituação
Envia uma mensagem de texto com botões de resposta rápida. O campocontent.type deve ser INTERACTIVE_BUTTON. O destinatário pode escolher entre as opções apresentadas.
Opcionalmente, você pode incluir uma imagem ou vídeo junto à mensagem usando os campos thumbnail e mimeType dentro do body.
Detalhes da regra do WhatsApp Oficial em janela de conversa. Veja a matriz de capacidades para todos os canais.
Autorizações
Secret Key gerada no painel de Segurança do Omni Z-API
Parâmetros de caminho
ID do canal
Exemplo:
"SEU_CHANNEL_ID"
Corpo
application/json
Resposta
Mensagem enviada com sucesso
ID da mensagem enviada