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_ACTION",
"body": {
"message": "Como podemos ajudar?"
},
"header": {
"message": "Omni Z-API"
},
"footer": {
"message": "Elige una opción"
},
"attachments": [
{
"id": "1",
"title": "Visita nuestro sitio web",
"name": "URL",
"url": "https://www.omni.z-api.io"
},
{
"id": "2",
"title": "Llámanos",
"name": "CALL",
"phones": [
"5511999999999"
]
}
]
}
}
'{
"messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}Mensajes
Enviar botones de acción
Envía mensajes con botones de acción (abrir URL y llamar)
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_ACTION",
"body": {
"message": "Como podemos ajudar?"
},
"header": {
"message": "Omni Z-API"
},
"footer": {
"message": "Elige una opción"
},
"attachments": [
{
"id": "1",
"title": "Visita nuestro sitio web",
"name": "URL",
"url": "https://www.omni.z-api.io"
},
{
"id": "2",
"title": "Llámanos",
"name": "CALL",
"phones": [
"5511999999999"
]
}
]
}
}
'{
"messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}Conceptos
Envía un mensaje con botones de acción a un contacto. El campocontent.type debe ser INTERACTIVE_ACTION.
Tipos de botón disponibles:
- URL — Abre un enlace al pulsarlo
- CALL — Llama a un número al pulsarlo
header y footer son opcionales.
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