curl --request POST \
--url https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}/send-button-list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511999999999",
"message": "How would you rate our service?",
"buttonList": {
"buttons": [
{
"id": "1",
"label": "Excellent"
},
{
"id": "2",
"label": "Good"
},
{
"id": "3",
"label": "Average"
}
]
}
}
'{
"zaapId": "3999984263738042930CD6ECDE9VDWSA",
"messageId": "D241XXXX732339502B68",
"id": "D241XXXX732339502B68"
}{
"error": 405,
"message": "Method not allowed"
}{
"error": 415,
"message": "Unsupported media type"
}Mensagens
Enviar lista de botões
Envie mensagens com botões de seleção rápida
POST
/
send-button-list
curl --request POST \
--url https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}/send-button-list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511999999999",
"message": "How would you rate our service?",
"buttonList": {
"buttons": [
{
"id": "1",
"label": "Excellent"
},
{
"id": "2",
"label": "Good"
},
{
"id": "3",
"label": "Average"
}
]
}
}
'{
"zaapId": "3999984263738042930CD6ECDE9VDWSA",
"messageId": "D241XXXX732339502B68",
"id": "D241XXXX732339502B68"
}{
"error": 405,
"message": "Method not allowed"
}{
"error": 415,
"message": "Unsupported media type"
}Conceituação
Método para envio de mensagens com botões de seleção rápida. O destinatário pode escolher entre as opções apresentadas, que funcionam como resposta à mensagem. Opcionalmente, você pode incluir uma imagem ou vídeo junto aos botões adicionando o campoimage ou video dentro de buttonList.
Envie apenas
image ou video, nunca os dois ao mesmo tempo.Autorizações
Secret Key generated in the Omni Z-API Security panel
Corpo
application/json
Recipient phone number (country code + area code + number)
Exemplo:
"5511999999999"
Message text (required, cannot be empty)
Button configuration
Show child attributes
Show child attributes
Delay in seconds before sending (1-15)
Intervalo obrigatório:
1 <= x <= 15