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": "¿Cómo valoras nuestra atención?"
},
"attachments": [
{
"id": "1",
"title": "Excelente"
},
{
"id": "2",
"title": "Bueno"
},
{
"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"
}Mensajes
Enviar texto con botones
Envía mensajes de texto con botones de respuesta 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": "¿Cómo valoras nuestra atención?"
},
"attachments": [
{
"id": "1",
"title": "Excelente"
},
{
"id": "2",
"title": "Bueno"
},
{
"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"
}Conceptos
Envía un mensaje de texto con botones de respuesta rápida. El campocontent.type debe ser INTERACTIVE_BUTTON. El destinatario puede elegir entre las opciones que se le presentan.
Opcionalmente puedes incluir una imagen o un vídeo junto con el mensaje usando los campos thumbnail y mimeType dentro de body.
Detalles de la regla de Meta Cloud API en ventana de conversación. Consulta qué acepta cada canal para todos los canales.
Con el canal desconectado, la API rechaza el envío con
422 y subCode CHANNEL_DISCONNECTED, y el mensaje no se envía. Consulta Errores al enviar.Autorizaciones
Secret Key generada en el panel de Seguridad de Omni Z-API
Parámetros de ruta
ID del canal
Ejemplo:
"SU_CHANNEL_ID"
Cuerpo
application/json
Respuesta
Mensaje enviado correctamente
ID del mensaje enviado — hexadecimal de 32 caracteres en mayúsculas