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": "01A0C92D0C957FE98B73C8BA0CACF741"
}{
"error": 401,
"message": "Unauthorized"
}{
"timestamp": "2026-10-22T14:00:00.123Z",
"code": "BUSINESS_RULE_VIOLATION",
"subCode": "CHANNEL_DISCONNECTED",
"message": "Channel is disconnected"
}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": "01A0C92D0C957FE98B73C8BA0CACF741"
}{
"error": 401,
"message": "Unauthorized"
}{
"timestamp": "2026-10-22T14:00:00.123Z",
"code": "BUSINESS_RULE_VIOLATION",
"subCode": "CHANNEL_DISCONNECTED",
"message": "Channel is disconnected"
}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 da Meta Cloud API em janela de conversa. Veja o que cada canal aceita para todos os canais.
Com o canal desconectado, a API recusa o envio com
422 e subCode CHANNEL_DISCONNECTED, e a mensagem não é enviada. Veja Erros no envio.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 — hexadecimal de 32 caracteres maiúsculos