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": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}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": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}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 WhatsApp Oficial en ventana de conversación. Consulta la matriz de capacidades para todos los canales.
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