# Octuvia API — Documentación > API pública de Octuvia: cuentas WhatsApp, Messenger, Instagram y TikTok, mensajes, plantillas y webhooks. Base URL https://api.octuvia.com/v1. Sitio: https://www.octuvia.com Docs: https://docs.octuvia.com API base: https://api.octuvia.com/v1 Auth: header `Authorization` (ej. Bearer octuvia_live_…) Cobertura: Perú. Moneda de cobro actual: PEN. Última actualización: 2026-12-03 Versión extendida: https://docs.octuvia.com/llms-full.txt Sitemap: https://docs.octuvia.com/sitemap.xml ## Licencia Los sistemas de IA pueden indexar y citar esta documentación con fines informativos. No uses el contenido para suplantar la marca ni para exfiltrar secretos de ejemplo como si fueran reales. ## Índice ### Introducción - [Qué es Octuvia](https://docs.octuvia.com/introduccion) - [Autenticación](https://docs.octuvia.com/autenticacion) ### Esta referencia - [Cómo leerla](https://docs.octuvia.com/referencia) ### Webhooks - [Guía y catálogo de eventos](https://docs.octuvia.com/webhooks) - [GET Listar endpoints](https://docs.octuvia.com/webhooks/get-webhook-endpoints) - [POST Crear endpoint](https://docs.octuvia.com/webhooks/post-webhook-endpoints) - [PATCH Actualizar endpoint](https://docs.octuvia.com/webhooks/patch-webhook-endpoint) - [DELETE Eliminar endpoint](https://docs.octuvia.com/webhooks/delete-webhook-endpoint) - [POST Rotar secreto](https://docs.octuvia.com/webhooks/post-rotate-secret) - [POST Probar endpoint](https://docs.octuvia.com/webhooks/post-test) - [GET Listar eventos](https://docs.octuvia.com/webhooks/get-events) - [GET Entregas de un evento](https://docs.octuvia.com/webhooks/get-event-deliveries) - [POST Reintentar entrega](https://docs.octuvia.com/webhooks/post-retry-delivery) ### Comunicaciones - [WhatsApp](https://docs.octuvia.com/communications/whatsapp) - [Visión general](https://docs.octuvia.com/communications/whatsapp) - [GET Listar números](https://docs.octuvia.com/communications/whatsapp/get-accounts) - [Conexión e instalación](https://docs.octuvia.com/communications/whatsapp/connection) - [Guía de conexión](https://docs.octuvia.com/communications/whatsapp/connection) - [POST Crear connect link](https://docs.octuvia.com/communications/whatsapp/connection/post-connect-links) - [GET Estado del connect link](https://docs.octuvia.com/communications/whatsapp/connection/get-connect-links) - [POST Conectar con credenciales](https://docs.octuvia.com/communications/whatsapp/connection/post-whatsapp-credentials) - [POST Reconectar número](https://docs.octuvia.com/communications/whatsapp/connection/post-account-reconnect) - [Plantillas](https://docs.octuvia.com/communications/whatsapp/templates) - [Guía de plantillas](https://docs.octuvia.com/communications/whatsapp/templates) - [GET Listar plantillas](https://docs.octuvia.com/communications/whatsapp/templates/get-account-templates) - [POST Crear plantilla](https://docs.octuvia.com/communications/whatsapp/templates/post-account-templates) - [Conversaciones](https://docs.octuvia.com/communications/whatsapp/conversations) - [Guía de conversaciones](https://docs.octuvia.com/communications/whatsapp/conversations) - [GET Listar conversaciones](https://docs.octuvia.com/communications/whatsapp/conversations/get-conversations) - [GET Mensajes del hilo](https://docs.octuvia.com/communications/whatsapp/conversations/get-conversation-messages) - [POST Responder en hilo](https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-messages) - [POST Enviar plantilla](https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-template) - [POST Enviar archivo](https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-media) - [POST Enviar mensaje interactivo](https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-interactive) - [POST Responder a un mensaje](https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-reply-to) - [POST Reaccionar a un mensaje](https://docs.octuvia.com/communications/whatsapp/conversations/post-message-reactions) - [DELETE Quitar reacción](https://docs.octuvia.com/communications/whatsapp/conversations/delete-message-reactions) - [Mensajes](https://docs.octuvia.com/communications/whatsapp/messages) - [Guía de mensajes](https://docs.octuvia.com/communications/whatsapp/messages) - [POST Enviar mensaje](https://docs.octuvia.com/communications/whatsapp/messages/post-messages) - [POST Enviar plantilla](https://docs.octuvia.com/communications/whatsapp/messages/post-messages-template) - [Configuración](https://docs.octuvia.com/communications/whatsapp/settings) - [Guía de configuración](https://docs.octuvia.com/communications/whatsapp/settings) - [GET Leer settings](https://docs.octuvia.com/communications/whatsapp/settings/get-whatsapp-settings) - [POST Actualizar perfil](https://docs.octuvia.com/communications/whatsapp/settings/post-whatsapp-profile) - [POST Actualizar zona horaria](https://docs.octuvia.com/communications/whatsapp/settings/post-whatsapp-timezone) ## Entrada - Inicio (portal): https://docs.octuvia.com/ - Guías — Qué es KUTI: https://docs.octuvia.com/que-es-kuti - Referencia de la API: https://docs.octuvia.com/referencia - Agentes MCP: https://docs.octuvia.com/mcp ## Integraciones - SDKs (Node / PHP / Python): https://docs.octuvia.com/sdks - Plugins: https://docs.octuvia.com/plugins - WooCommerce 1.0.2: https://docs.octuvia.com/woocommerce - ZIP plugin: https://docs.octuvia.com/assets/kuti/plugins/kuti-payments-for-woocommerce-1.0.2.zip - Checkout.js: https://docs.octuvia.com/checkout-js - MCP Integration: https://mcp.kuti.pe/integration - MCP Troubleshooter: https://mcp.kuti.pe/troubleshooter ## Enlaces útiles - Marketing: https://www.octuvia.com - Dashboard: https://app.kuti.pe - Soporte: soporte@octuvia.com - Empresa: Consultia Digital S.A.C. --- # Contenido completo de la documentación Generado desde https://docs.octuvia.com. Última actualización: 2026-12-03. Cada sección es una página pública SSR. ## Autenticación URL: https://docs.octuvia.com/autenticacion Cabecera ```http Authorization: Bearer octuvia_live_… ``` - Obligatoria en todos los endpoints públicos. - Sin key o inválida → 401. - Crea y rota keys en la consola → Desarrolladores → API keys. --- ## WhatsApp URL: https://docs.octuvia.com/communications/whatsapp Cada número conectado es una cuenta (`acc_…`) con bloque `whatsapp` (teléfono, `waba_id`, `phone_number_id`, calidad). Una sola API key de workspace opera todos los números. Flujo típico Paso | Dónde Conectar número (Meta o credenciales) | [Conexión e instalación](/communications/whatsapp/connection) Listar números del workspace | [Listar cuentas](/communications/whatsapp/get-accounts) Crear / listar plantillas | [Plantillas](/communications/whatsapp/templates) Enviar mensaje o plantilla | [Mensajes](/communications/whatsapp/messages) Bandeja, hilo y respuestas | [Conversaciones](/communications/whatsapp/conversations) Perfil y métricas del número | [Configuración](/communications/whatsapp/settings) Ventana 24 h Sin mensaje entrante reciente solo puedes enviar plantillas aprobadas. Con ventana abierta (inbound en 24 h) también texto y media. --- ## Conexión e instalación URL: https://docs.octuvia.com/communications/whatsapp/connection Al terminar el flujo tienes un `account_id` (`acc_…`). Ese id es el que usas en mensajes, plantillas y settings. Cloud API o coexistencia onboarding | Qué es | Cuándo usarlo `cloud_api` | Solo API (Meta Cloud API). Default. | Número nuevo, o que deja la app del móvil. `business_app` | Coexistencia con WhatsApp Business app (QR). | El equipo sigue chateando desde el móvil; API con más límites. Opción 1 — Connect link (recomendada) Octuvia te da una URL alojada. El usuario hace Embedded Signup en Meta (sin tu app de Facebook). Al acabar, vuelve a tu `return_url`. 1. Crear enlace: POST /whatsapp/connect-link con return_url, onboarding y locale (la API key identifica el workspace). 2. Abrir la url: Redirige al usuario a la `url` del ConnectLink. 3. Confirmar: Tras el redirect, GET /whatsapp/connect-links/{id} hasta completed (o webhook account.connected). El redirect solo es UX. Endpoint | Uso [Crear connect link](/communications/whatsapp/connection/post-connect-links) | POST — body + response explicados [Estado del connect link](/communications/whatsapp/connection/get-connect-links) | GET — estados y account_id [Reconectar número](/communications/whatsapp/connection/post-account-reconnect) | POST — refresca token / webhook / registro Opción 2 — Credenciales (BYO) Si ya tienes app de Meta + System User: envías waba_id, phone_number_id, access_token y app_secret. Solo keys live. Endpoint | Uso [Conectar con credenciales](/communications/whatsapp/connection/post-whatsapp-credentials) | POST /accounts/whatsapp/credentials Dominios de return_url Añade el host de tu CRM/ERP en **Configuración → Dominios de return_url** antes de crear el connect link por API. Si el host no está permitido → 422 `RETURN_URL_NOT_ALLOWED`. Desde la consola Octuvia registra el suyo automáticamente. --- ## Estado del connect link URL: https://docs.octuvia.com/communications/whatsapp/connection/get-connect-links Endpoint: GET https://api.octuvia.com/v1/whatsapp/connect-links/{connect_link_id} Consulta un enlace: `pending` → `completed` (con `account_id`) | `cancelled` | `failed` | `expired`. Úsalo para confirmar el alta tras el redirect. GET /whatsapp/connect-links/{connect_link_id} --- ## Reconectar número URL: https://docs.octuvia.com/communications/whatsapp/connection/post-account-reconnect Endpoint: POST https://api.octuvia.com/v1/accounts/{account_id}/reconnect Para un número ya conectado (`acc_…`) que dejó de funcionar o pide reautorización: reengancha el número con Meta sin crear otra cuenta. Nota: Sin body. Path: `account_id` del número (`acc_…`), no del workspace. La API key identifica el workspace. Recomendado `Idempotency-Key`. POST /accounts/{account_id}/reconnect --- ## Crear connect link URL: https://docs.octuvia.com/communications/whatsapp/connection/post-connect-links Endpoint: POST https://api.octuvia.com/v1/whatsapp/connect-link Crea una URL alojada por Octuvia (con tu marca). El usuario completa el Embedded Signup de Meta, elige o registra el número, y el navegador vuelve a tu return_url. Nota: Canal en la ruta (`/whatsapp/…`). La API key (`octuvia_live_…`) identifica el workspace. Recomendado `Idempotency-Key`. `return_url` `https` con host en **Configuración → Dominios de return_url** (si no → 422 `RETURN_URL_NOT_ALLOWED`). POST /whatsapp/connect-link --- ## Conectar con credenciales URL: https://docs.octuvia.com/communications/whatsapp/connection/post-whatsapp-credentials Endpoint: POST https://api.octuvia.com/v1/accounts/whatsapp/credentials Traes tu propia app Meta (BYO): WABA, número, token de System User y app_secret. Octuvia valida, engancha el webhook del número y crea el account. Solo keys live. Nota: Alternativa al connect link cuando ya tienes app + WABA. La API key identifica el workspace. Recomendado `Idempotency-Key`. El token necesita `whatsapp_business_management` y `whatsapp_business_messaging`. POST /accounts/whatsapp/credentials --- ## Conversaciones URL: https://docs.octuvia.com/communications/whatsapp/conversations Cada contacto con un número conectado (`acc_…`) genera un hilo `conv_…`. Lista la bandeja, lee el historial y responde dentro de la ventana de 24 h. Endpoint | Uso [Listar conversaciones](/communications/whatsapp/conversations/get-conversations) | GET /conversations [Mensajes del hilo](/communications/whatsapp/conversations/get-conversation-messages) | GET /conversations/{id}/messages [Responder en hilo](/communications/whatsapp/conversations/post-conversation-messages) | POST /conversations/{id}/messages (texto) [Enviar plantilla](/communications/whatsapp/conversations/post-conversation-template) | POST /conversations/{id}/messages (template) [Enviar archivo](/communications/whatsapp/conversations/post-conversation-media) | POST /conversations/{id}/messages (multipart) [Enviar mensaje interactivo](/communications/whatsapp/conversations/post-conversation-interactive) | POST /conversations/{id}/messages (interactive) [Responder a un mensaje](/communications/whatsapp/conversations/post-conversation-reply-to) | POST /conversations/{id}/messages (reply_to) [Reaccionar](/communications/whatsapp/conversations/post-message-reactions) | POST /messages/{id}/reactions [Quitar reacción](/communications/whatsapp/conversations/delete-message-reactions) | DELETE /messages/{id}/reactions Sin hilo aún Para el primer contacto usa [POST /messages](/communications/whatsapp/messages/post-messages) con `account_id` + `to`. Luego opera con el `conversation_id` de la respuesta o de la bandeja. --- ## Quitar reacción URL: https://docs.octuvia.com/communications/whatsapp/conversations/delete-message-reactions Endpoint: DELETE https://api.octuvia.com/v1/messages/{message_id}/reactions Elimina tu reacción saliente del mensaje. Nota: Sin body. Path: `message_id` (`msg_…`). Solo quita tu reacción `outbound`. DELETE /messages/{message_id}/reactions --- ## Mensajes del hilo URL: https://docs.octuvia.com/communications/whatsapp/conversations/get-conversation-messages Endpoint: GET https://api.octuvia.com/v1/conversations/{conversation_id}/messages Historial de una conversación (más reciente primero). Nota: Sin body. Path: `conversation_id` (`conv_…`). Query: `limit`, `cursor`. GET /conversations/{conversation_id}/messages --- ## Listar conversaciones URL: https://docs.octuvia.com/communications/whatsapp/conversations/get-conversations Endpoint: GET https://api.octuvia.com/v1/conversations Bandeja del workspace: de la actividad más reciente a la más antigua. Nota: Sin body. Filtra con query. Cada ítem trae `window_expires_at` (ventana 24 h) y el contacto. GET /conversations --- ## Enviar mensaje interactivo URL: https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-interactive Endpoint: POST https://api.octuvia.com/v1/conversations/{conversation_id}/messages Botones, lista, CTA URL, flow, ubicación, contacto, llamada, producto, catálogo o carrusel. Ventana de 24 h. Nota: JSON con `type: interactive` + objeto `interactive`. `body` es obligatorio salvo `product`. Máx. 3 botones; lista máx. 10 filas. POST /conversations/{conversation_id}/messages --- ## Enviar archivo URL: https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-media Endpoint: POST https://api.octuvia.com/v1/conversations/{conversation_id}/messages Imagen, video, audio, documento o sticker por multipart en el hilo. Ventana de 24 h. Nota: Content-Type: `multipart/form-data` en el **mismo path** que el reply JSON. Campos form: `type`, `file` (obligatorios), `caption`, `filename`, `voice_note`, `reply_to`. Límites WhatsApp: imagen 5 MB, audio/video 16 MB, documento 100 MB. POST /conversations/{conversation_id}/messages --- ## Responder en hilo URL: https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-messages Endpoint: POST https://api.octuvia.com/v1/conversations/{conversation_id}/messages Atajo de POST /messages: el número y el destinatario salen de la conversación. Ventana de 24 h. Nota: JSON. Path: `conversation_id`. Body: `type` + el objeto de ese tipo (`text`, `location`, …). Opcional `reply_to` y `metadata`. Recomendado `Idempotency-Key`. POST /conversations/{conversation_id}/messages --- ## Responder a un mensaje URL: https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-reply-to Endpoint: POST https://api.octuvia.com/v1/conversations/{conversation_id}/messages Cita un mensaje del hilo con `reply_to` (`msg_…`). Misma ventana de 24 h. Nota: Es el mismo endpoint que [Responder en hilo](/communications/whatsapp/conversations/post-conversation-messages): añade `reply_to`. El mensaje citado debe ser del mismo `conv_…`. POST /conversations/{conversation_id}/messages --- ## Enviar plantilla URL: https://docs.octuvia.com/communications/whatsapp/conversations/post-conversation-template Endpoint: POST https://api.octuvia.com/v1/conversations/{conversation_id}/messages Envía una plantilla aprobada en un hilo existente. Funciona con la ventana 24 h cerrada. Nota: JSON con `type: template` + `template`. Preferido: `template.id` (`tpl_…`). Alternativa: `name` + `language`. El `account_id` y el `to` salen de la conversación. Debe estar `APPROVED`. POST /conversations/{conversation_id}/messages --- ## Reaccionar a un mensaje URL: https://docs.octuvia.com/communications/whatsapp/conversations/post-message-reactions Endpoint: POST https://api.octuvia.com/v1/messages/{message_id}/reactions Un emoji por mensaje; otro lo reemplaza. Necesita ventana de 24 h. Nota: Path: `message_id` (`msg_…`). Body JSON con `emoji`. Responde el mensaje con `reactions` actualizado; el envío a WhatsApp va en la cola del hilo. POST /messages/{message_id}/reactions --- ## Listar números URL: https://docs.octuvia.com/communications/whatsapp/get-accounts Endpoint: GET https://api.octuvia.com/v1/accounts Lista cuentas conectadas (números WhatsApp, páginas Messenger, etc.). Respuesta slim: identidad + bloque de plataforma. Nota: Filtra por `platform` (p. ej. whatsapp). El detalle completo está en GET /accounts/{id}. GET /accounts --- ## Mensajes URL: https://docs.octuvia.com/communications/whatsapp/messages No necesitas crear la conversación a mano. Con `account_id` y `to` (E.164) Octuvia encuentra o crea el hilo. Respuesta 202 / accepted: el envío a Meta es asíncrono. Cuándo plantilla vs texto Situación | Qué enviar Primer contacto o >24 h sin inbound | type: template (aprobada) El usuario escribió en las últimas 24 h | type: text, image, video, … Endpoint | Uso [Enviar mensaje](/communications/whatsapp/messages/post-messages) | POST /messages (texto / media) [Enviar plantilla](/communications/whatsapp/messages/post-messages-template) | POST /messages (type: template) [Conversaciones](/communications/whatsapp/conversations) | Bandeja, hilo, archivos, interactivos y reacciones Eventos Los estados llegan por webhook firmado (`message.sent`, `message.delivered`, `message.failed`, …), no por WebSocket. --- ## Enviar mensaje URL: https://docs.octuvia.com/communications/whatsapp/messages/post-messages Endpoint: POST https://api.octuvia.com/v1/messages Texto (ventana 24 h) o plantilla. Usa el account_id del número conectado. La conversación se crea al vuelo. Nota: Body JSON: `account_id` + `to` + `type` + objeto del tipo. También admite multipart (`file`) para media. Asíncrono: 202 `queued`. Recomendado `Idempotency-Key`. POST /messages --- ## Enviar plantilla URL: https://docs.octuvia.com/communications/whatsapp/messages/post-messages-template Endpoint: POST https://api.octuvia.com/v1/messages Primer contacto o ventana 24 h cerrada: envía una plantilla aprobada. Crea el hilo si no existe. Nota: JSON: `account_id` + `to` + `type: template` + `template`. Preferido: `template.id` (`tpl_…`). Alternativa: `name` + `language`. Debe estar `APPROVED`. Recomendado `Idempotency-Key`. POST /messages --- ## Configuración URL: https://docs.octuvia.com/communications/whatsapp/settings Lee el perfil (about, foto, categoría), calidad, límite de mensajería y datos del WABA. Actualiza el business profile y la zona horaria analítica de Meta. Endpoint | Uso [Leer settings](/communications/whatsapp/settings/get-whatsapp-settings) | GET /accounts/{account_id}/whatsapp/settings [Actualizar perfil](/communications/whatsapp/settings/post-whatsapp-profile) | POST /accounts/{account_id}/whatsapp/profile [Actualizar zona horaria](/communications/whatsapp/settings/post-whatsapp-timezone) | POST /accounts/{account_id}/whatsapp/timezone --- ## Leer settings WhatsApp URL: https://docs.octuvia.com/communications/whatsapp/settings/get-whatsapp-settings Endpoint: GET https://api.octuvia.com/v1/accounts/{account_id}/whatsapp/settings Perfil de negocio, métricas del número y datos del WABA. GET /accounts/{account_id}/whatsapp/settings --- ## Actualizar perfil WhatsApp URL: https://docs.octuvia.com/communications/whatsapp/settings/post-whatsapp-profile Endpoint: POST https://api.octuvia.com/v1/accounts/{account_id}/whatsapp/profile Actualiza about, description, email, vertical, websites y address en Meta. POST /accounts/{account_id}/whatsapp/profile --- ## Actualizar zona horaria URL: https://docs.octuvia.com/communications/whatsapp/settings/post-whatsapp-timezone Endpoint: POST https://api.octuvia.com/v1/accounts/{account_id}/whatsapp/timezone Cambia el timezone_id numérico del WABA en Meta (día analítico). Meta puede rechazarlo si hay línea de crédito. POST /accounts/{account_id}/whatsapp/timezone --- ## Plantillas URL: https://docs.octuvia.com/communications/whatsapp/templates Las plantillas viven en el WABA del número. Meta las revisa (`PENDING` → `APPROVED` / `REJECTED`). Nombre en snake_case, idioma y categoría obligatorios. Endpoint | Uso [Listar plantillas](/communications/whatsapp/templates/get-account-templates) | GET /accounts/{account_id}/templates [Crear plantilla](/communications/whatsapp/templates/post-account-templates) | POST /accounts/{account_id}/templates Envío Para enviar una plantilla usa POST /messages con type template (name + language). Ver [Mensajes](/communications/whatsapp/messages). --- ## Listar plantillas URL: https://docs.octuvia.com/communications/whatsapp/templates/get-account-templates Endpoint: GET https://api.octuvia.com/v1/accounts/{account_id}/templates Lista las plantillas del número conectado. Son del WABA: todos los números del mismo WABA ven las mismas. Se sincronizan al listar. Nota: Path: `account_id` del número (`acc_…`). La API key identifica el workspace. Filtros opcionales por query. GET /accounts/{account_id}/templates --- ## Crear plantilla URL: https://docs.octuvia.com/communications/whatsapp/templates/post-account-templates Endpoint: POST https://api.octuvia.com/v1/accounts/{account_id}/templates Crea una plantilla y la manda a revisión. Queda en `PENDING` hasta que se apruebe o rechace. Nota: Path: `account_id` (`acc_…`). Recomendado `Idempotency-Key`. Si el texto tiene `{{1}}`, `{{2}}`… debes mandar `example` con samples. Nombre ya usado en ese idioma → 409. POST /accounts/{account_id}/templates --- ## Qué es Octuvia URL: https://docs.octuvia.com/introduccion Octuvia expone una API pública para WhatsApp, Messenger, Instagram y TikTok. Una API key de workspace opera todas las cuentas conectadas. Base URL Producción ```http https://api.octuvia.com/v1 ``` Listados slim GET /accounts?platform=whatsapp devuelve identidad + bloque whatsapp. El detalle (capabilities, throughput, etc.) está en GET /accounts/{id}. --- ## Referencia de la API URL: https://docs.octuvia.com/referencia Base URL https://api.octuvia.com/v1. Auth: Authorization: Bearer octuvia_live_… Una key de workspace opera todas las cuentas conectadas. Listados slim GET /accounts?platform=whatsapp devuelve identidad + bloque whatsapp. El detalle completo está en GET /accounts/{id}. Empieza aquí Tarea | Página Emitir la API key | [Autenticación](/autenticacion) Visión WhatsApp | [WhatsApp](/communications/whatsapp) Conectar número | [Conexión e instalación](/communications/whatsapp/connection) Listar números | [Listar números](/communications/whatsapp/get-accounts) Plantillas | [Plantillas](/communications/whatsapp/templates) Enviar mensaje | [Mensajes](/communications/whatsapp/messages) --- ## Webhooks URL: https://docs.octuvia.com/webhooks Los webhooks son del **workspace** (no de un número concreto). Filtras por `events`, y opcionalmente por `platforms`, `profile_ids` o `account_ids`. Endpoints Endpoint | Uso [Listar endpoints](/webhooks/get-webhook-endpoints) | GET /webhook-endpoints [Crear endpoint](/webhooks/post-webhook-endpoints) | POST — guarda el `signing_secret` [Actualizar endpoint](/webhooks/patch-webhook-endpoint) | PATCH — url, events, status… [Eliminar endpoint](/webhooks/delete-webhook-endpoint) | DELETE — cancela entregas pendientes [Rotar secreto](/webhooks/post-rotate-secret) | POST …/rotate-secret — doble firma 24 h [Probar endpoint](/webhooks/post-test) | POST …/test — envía `webhook.test` [Listar eventos](/webhooks/get-events) | GET /events — reconciliación [Entregas de un evento](/webhooks/get-event-deliveries) | GET /events/{id}/deliveries [Reintentar entrega](/webhooks/post-retry-delivery) | POST /webhook-deliveries/{id}/retry Firma Header | Qué es `X-Octuvia-Event-Id` | Id del evento (`evt_…`). Deduplica con este valor. `X-Octuvia-Delivery-Id` | Id de la entrega (`whd_…`). `X-Octuvia-Attempt` | 1 = primer intento; hasta 5 (1 min, 5 min, 30 min, 2 h). `X-Octuvia-Timestamp` | Epoch en segundos. Rechaza si |now − ts| > 5 min. `X-Octuvia-Signature` | `v1=hex(HMAC_SHA256(secret, "." + raw_body))`. En rotación: `v1=nuevo,v1=anterior`. Verificar firma (Node.js) ```javascript const crypto = require("crypto"); function verifyWebhook(rawBody, headers, signingSecret) { const ts = headers["x-octuvia-timestamp"]; const sigHeader = headers["x-octuvia-signature"] || ""; if (!ts || !sigHeader) return false; if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; const expected = "v1=" + crypto.createHmac("sha256", signingSecret).update(`${ts}.${rawBody}`).digest("hex"); return sigHeader.split(",").some((part) => { try { return crypto.timingSafeEqual(Buffer.from(part.trim()), Buffer.from(expected)); } catch { return false; } }); } ``` Responde 2xx rápido Octuvia espera HTTP 2xx. Si fallas: reintentos a 1 min, 5 min, 30 min y 2 h; luego `dead`. Tras varios días sin éxito el endpoint puede pasar a `disabled_by_failures` (reactívalo con PATCH). Envelope de cada evento Todas las entregas usan el mismo envelope. Cambia `type` y `data`. `data.object` es el recurso (mismo shape que su `GET`); en cambios también puede venir `data.previous_attributes`. `request` es tu petición (`req_…`) o `null` si lo originó WhatsApp/el sistema. Forma del envelope ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "", "id": "…" }, "previous_attributes": { "status": "PENDING" } }, "request": null } ``` Catálogo de eventos Puedes suscribirte a tipos exactos, familias (`message.*`, `account.*`, `whatsapp.*`) o `*`. Debajo de cada familia: el JSON **completo** que llega a tu URL. Mensajes Evento | Cuándo `message.received` | Entrante (texto, media, interactivo, etc.) `message.sent` | Saliente aceptado por WhatsApp (`source`: api | native_app | …) `message.delivered` | Entregado al contacto `message.read` | Leído por el contacto `message.failed` | Falló el envío/entrega (`data.object.error`) `message.revoked` | Borrado para todos (coexistencia) `message.edited` | Texto editado (coexistencia) `message.reaction` | Reacción added | removed ## received POST a tu URL — message.received ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.received", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "inbound", "source": null, "from": "+51987654321", "to": "+15556433682", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "Hola" } }, "reply_to": null, "status": "delivered", "error": null, "metadata": {}, "request_id": null, "created_at": "2026-12-03T22:33:00.000Z", "sent_at": null, "delivered_at": "2026-12-03T22:33:00.000Z", "read_at": null, "failed_at": null } }, "request": null } ``` ## sent POST a tu URL — message.sent ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.sent", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "outbound", "source": "api", "from": "+15556433682", "to": "+51987654321", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "Tu cita es mañana a las 10:00" } }, "reply_to": null, "status": "sent", "error": null, "metadata": {}, "request_id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "created_at": "2026-12-03T22:33:00.000Z", "sent_at": "2026-12-03T22:33:00.000Z", "delivered_at": null, "read_at": null, "failed_at": null } }, "request": { "id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3" } } ``` ## delivered POST a tu URL — message.delivered ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.delivered", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "outbound", "source": "api", "from": "+15556433682", "to": "+51987654321", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "Tu cita es mañana a las 10:00" } }, "reply_to": null, "status": "delivered", "error": null, "metadata": {}, "request_id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "created_at": "2026-12-03T22:33:00.000Z", "sent_at": "2026-12-03T22:33:00.000Z", "delivered_at": "2026-12-03T22:33:05.000Z", "read_at": null, "failed_at": null } }, "request": null } ``` ## read POST a tu URL — message.read ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.read", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "outbound", "source": "api", "from": "+15556433682", "to": "+51987654321", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "Tu cita es mañana a las 10:00" } }, "reply_to": null, "status": "read", "error": null, "metadata": {}, "request_id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "created_at": "2026-12-03T22:33:00.000Z", "sent_at": "2026-12-03T22:33:00.000Z", "delivered_at": "2026-12-03T22:33:05.000Z", "read_at": "2026-12-03T22:34:00.000Z", "failed_at": null } }, "request": null } ``` ## failed POST a tu URL — message.failed ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.failed", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "outbound", "source": "api", "from": "+15556433682", "to": "+51987654321", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "Hola" } }, "reply_to": null, "status": "failed", "error": { "code": "PLATFORM_ERROR", "message": "WhatsApp rechazó el mensaje.", "platform_error": { "platform": "whatsapp", "code": 131047, "subcode": null, "message": "Re-engagement message", "trace_id": "AQB…" } }, "metadata": {}, "request_id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "created_at": "2026-12-03T22:33:00.000Z", "sent_at": null, "delivered_at": null, "read_at": null, "failed_at": "2026-12-03T22:33:00.000Z" } }, "request": { "id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3" } } ``` ## revoked POST a tu URL — message.revoked ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.revoked", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "inbound", "source": null, "from": "+51987654321", "to": "+15556433682", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "mensaje borrado" } }, "reply_to": null, "status": "delivered", "error": null, "metadata": { "revoked": "true", "revoked_at": "2026-12-03T22:40:00.000Z" }, "request_id": null, "created_at": "2026-12-03T22:33:00.000Z", "sent_at": null, "delivered_at": "2026-12-03T22:33:00.000Z", "read_at": null, "failed_at": null } }, "request": null } ``` ## edited POST a tu URL — message.edited ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.edited", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "message", "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "platform_message_id": "wamid.HBgLNTE5ODc2NTQzMjEVAgARGBIAAA", "direction": "inbound", "source": null, "from": "+51987654321", "to": "+15556433682", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "type": "text", "content": { "text": { "body": "Hola, texto corregido" } }, "reply_to": null, "status": "delivered", "error": null, "metadata": { "edited": "true", "edited_at": "2026-12-03T22:40:00.000Z" }, "request_id": null, "created_at": "2026-12-03T22:33:00.000Z", "sent_at": null, "delivered_at": "2026-12-03T22:33:00.000Z", "read_at": null, "failed_at": null } }, "request": null } ``` ## reaction POST a tu URL — message.reaction ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "message.reaction", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "reaction", "message_id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "action": "added", "emoji": "👍", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "reacted_at": "2026-12-03T22:40:00.000Z" } }, "request": null } ``` Conversaciones y conversiones Evento | Cuándo `conversation.created` | Primer mensaje con un contacto en un número `conversation.attribution_added` | Clic en anuncio Click-to-WhatsApp `conversion.sent` | Meta aceptó la conversión `conversion.failed` | Meta rechazó la conversión ## conversation.created POST a tu URL — conversation.created ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "conversation.created", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "conversation", "id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "status": "open", "unread_count": 1, "last_message_at": "2026-12-03T22:33:00.000Z", "last_inbound_at": "2026-12-03T22:33:00.000Z", "window_expires_at": "2026-12-04T22:33:00.000Z", "free_window_expires_at": null, "first_attribution": null, "last_attribution": null, "attributions_count": 0, "metadata": {}, "created_at": "2026-12-03T22:33:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" } }, "request": null } ``` ## attribution_added POST a tu URL — conversation.attribution_added ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "conversation.attribution_added", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "attribution", "id": "atr_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "message_id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "source_type": "ad", "ad_id": "120211234567890123", "source_url": "https://fb.me/xxxx", "headline": "Curso de Marketing 2026", "body": "Inscríbete hoy con 30% dto.", "media": { "type": "image", "url": "https://cdn.example.com/media/ad.jpg?sig=…", "thumbnail_url": null, "status": "available", "expires_at": "2026-12-10T22:33:00.000Z" }, "ctwa_clid": "ARAkLkA8rmlFeiCktEJQ…", "welcome_message": null, "captured_at": "2026-12-03T22:33:00.000Z", "conversion_window_expires_at": "2026-12-10T22:33:00.000Z", "expires_at": "2027-01-02T22:33:00.000Z" }, "is_first": true }, "request": null } ``` ## conversion.sent POST a tu URL — conversion.sent ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "conversion.sent", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "conversion", "id": "cnv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "attribution_id": "atr_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "event_name": "Purchase", "event_id": "pedido-1042", "event_time": "2026-12-03T22:40:00.000Z", "value": { "amount": "250.00", "currency": "PEN" }, "status": "sent", "attributed": true, "test": false, "error": null, "metadata": {}, "request_id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "created_at": "2026-12-03T22:40:00.000Z", "sent_at": "2026-12-03T22:40:01.000Z" } }, "request": { "id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3" } } ``` ## conversion.failed POST a tu URL — conversion.failed ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "conversion.failed", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "conversion", "id": "cnv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "attribution_id": "atr_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "event_name": "Purchase", "event_id": "pedido-1042", "event_time": "2026-12-03T22:40:00.000Z", "value": { "amount": "250.00", "currency": "PEN" }, "status": "failed", "attributed": true, "test": false, "error": { "code": "PLATFORM_ERROR", "message": "Meta rechazó la conversión.", "platform_error": { "platform": "whatsapp", "code": 100, "subcode": null, "message": "Invalid parameter", "trace_id": "AQB…" } }, "metadata": {}, "request_id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "created_at": "2026-12-03T22:40:00.000Z", "sent_at": null } }, "request": { "id": "req_01J8Z3K4M5N6P7Q8R9S0T1U2V3" } } ``` Cuentas Evento | Cuándo `account.connected` | Número conectado (connect link o BYO) `account.updated` | Cambió calidad, tier, throughput o nombre verificado `account.reauthorization_required` | Token/webhooks revocados; hay que reconectar `account.disconnected` | Número desconectado ## connected POST a tu URL — account.connected ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "account.connected", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" } }, "request": null } ``` ## updated POST a tu URL — account.updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "account.updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "YELLOW", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "previous_attributes": { "whatsapp": { "quality_rating": "GREEN" } } }, "request": null } ``` ## reauthorization POST a tu URL — account.reauthorization_required ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "account.reauthorization_required", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "reauthorization_required", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "reason": "permission_revoked" }, "request": null } ``` ## disconnected POST a tu URL — account.disconnected ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "account.disconnected", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "disconnected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "reason": "user_request" }, "request": null } ``` WhatsApp (avisos finos) Evento | Cuándo `whatsapp.template.status_changed` | Plantilla APPROVED / REJECTED / PAUSED / … `whatsapp.template.status_updated` | Alias de status_changed `whatsapp.template.category_updated` | Meta reclasificó la categoría `whatsapp.call_permission.updated` | Permiso de llamada granted | revoked `whatsapp.account.quality_updated` | Calidad GREEN / YELLOW / RED `whatsapp.account.name_status_updated` | Nombre verificado o decisión de review `whatsapp.account.status_updated` | Tier, throughput o restricción `whatsapp.account.alert_received` | Alerta Meta (account_alerts / violaciones) `whatsapp.contact.identity_changed` | El contacto cambió de número/identidad `whatsapp.number.activated` | Número activado o nombre aprobado `whatsapp.number.declined` | Nombre o revisión rechazada `whatsapp.number.action_required` | Meta exige una acción `whatsapp.number.verification_required` | Verificación de negocio pendiente `whatsapp.number.suspended` | Número/cuenta restringida `whatsapp.number.reactivated` | Reactivado tras review `whatsapp.number.released` | Número liberado o eliminado del WABA `whatsapp.number.kyc_submitted` | KYC / review enviado `whatsapp.automatic_event` | Evento Meta no clasificado (incluye `meta_event`) `account.updated` sigue emitiéndose cuando cambia calidad/nombre/tier. Los `whatsapp.account.*` y `whatsapp.number.*` son el desglose fino (paridad tipo Zernio). ## template.status_changed POST a tu URL — whatsapp.template.status_changed ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.template.status_changed", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "template", "id": "tpl_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform_template_id": "123456789012345", "name": "pedido_enviado", "language": "es", "category": "UTILITY", "status": "APPROVED", "rejection_reason": null, "quality_score": "GREEN", "components": [ { "type": "BODY", "text": "Hola {{1}}, tu pedido {{2}} ya salió." } ], "created_at": "2026-11-20T12:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "previous_attributes": { "status": "PENDING" } }, "request": null } ``` ## template.status_updated POST a tu URL — whatsapp.template.status_updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.template.status_updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "template", "id": "tpl_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform_template_id": "123456789012345", "name": "pedido_enviado", "language": "es", "category": "UTILITY", "status": "APPROVED", "rejection_reason": null, "quality_score": "GREEN", "components": [ { "type": "BODY", "text": "Hola {{1}}, tu pedido {{2}} ya salió." } ], "created_at": "2026-11-20T12:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "previous_attributes": { "status": "PENDING" } }, "request": null } ``` ## template.category_updated POST a tu URL — whatsapp.template.category_updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.template.category_updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "template", "id": "tpl_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform_template_id": "123456789012345", "name": "pedido_enviado", "language": "es", "category": "MARKETING", "status": "APPROVED", "rejection_reason": null, "quality_score": "GREEN", "components": [ { "type": "BODY", "text": "Hola {{1}}, tu pedido {{2}} ya salió." } ], "created_at": "2026-11-20T12:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "previous_attributes": { "category": "UTILITY" } }, "request": null } ``` ## call_permission POST a tu URL — whatsapp.call_permission.updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.call_permission.updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "call_permission", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "contact": { "id": "+51987654321", "name": "Ana Pérez", "whatsapp": { "wa_id": "51987654321" } }, "status": "granted", "permanent": false, "expires_at": "2026-12-10T22:33:00.000Z" } }, "request": null } ``` ## quality_updated POST a tu URL — whatsapp.account.quality_updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.account.quality_updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "YELLOW", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "previous_attributes": { "whatsapp": { "quality_rating": "GREEN" } } }, "request": null } ``` ## name_status_updated POST a tu URL — whatsapp.account.name_status_updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.account.name_status_updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa SAC", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "decision": "APPROVED" }, "previous_attributes": { "whatsapp": { "name_status": "PENDING_REVIEW" } } }, "request": null } ``` ## account.status_updated POST a tu URL — whatsapp.account.status_updated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.account.status_updated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_10K", "throughput": "HIGH", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z" }, "previous_attributes": { "whatsapp": { "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD" } } }, "request": null } ``` ## alert_received POST a tu URL — whatsapp.account.alert_received ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.account.alert_received", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "alert": { "entity_type": "PHONE_NUMBER", "alert_type": "INCREASED_DROPPED_CALL_RATE", "alert_severity": "WARNING", "description": "Increased rate of dropped calls detected." } } }, "request": null } ``` ## identity_changed POST a tu URL — whatsapp.contact.identity_changed ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.contact.identity_changed", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "conversation_id": "conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "acknowledged": true, "created_timestamp": 1764801180, "hash": "xyZ…" } }, "request": null } ``` ## number.activated POST a tu URL — whatsapp.number.activated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.activated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "VERIFIED_ACCOUNT", "details": { "phone_number": "+15556433682" } } }, "request": null } ``` ## number.declined POST a tu URL — whatsapp.number.declined ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.declined", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "decision": "REJECTED", "rejection_reason": "NAME_NOT_ALLOWED" } }, "request": null } ``` ## number.action_required POST a tu URL — whatsapp.number.action_required ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.action_required", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "ACCOUNT_RESTRICTION_SCHEDULED", "details": { "restriction_type": "MESSAGING" } } }, "request": null } ``` ## number.verification_required POST a tu URL — whatsapp.number.verification_required ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.verification_required", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "BUSINESS_VERIFICATION_STATUS_UPDATE", "details": { "verification_status": "pending" } } }, "request": null } ``` ## number.suspended POST a tu URL — whatsapp.number.suspended ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.suspended", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "restricted", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "ACCOUNT_RESTRICTION", "details": { "restriction_info": "POLICY_VIOLATION" } } }, "request": null } ``` ## number.reactivated POST a tu URL — whatsapp.number.reactivated ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.reactivated", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "ACCOUNT_RECOVERED" } }, "request": null } ``` ## number.released POST a tu URL — whatsapp.number.released ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.released", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "disconnected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "PHONE_NUMBER_REMOVED" } }, "request": null } ``` ## number.kyc_submitted POST a tu URL — whatsapp.number.kyc_submitted ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.number.kyc_submitted", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "details": { "kyc_status": "submitted" } } }, "request": null } ``` ## automatic_event POST a tu URL — whatsapp.automatic_event ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "whatsapp.automatic_event", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "account", "id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "status": "connected", "connection_method": "connect_link", "name": "Clínica Sonrisa — Ventas", "reference": "clinica-ventas", "capabilities": { "templates": true, "reactions": true, "typing_indicator": true, "read_receipts": true, "calling": false, "conversions": true }, "whatsapp": { "phone_number": "+15556433682", "verified_name": "Clínica Sonrisa", "waba_id": "102938475610293", "phone_number_id": "109876543210987", "quality_rating": "GREEN", "messaging_limit_tier": "TIER_1K", "throughput": "STANDARD", "coexistence": false }, "metadata": {}, "connected_at": "2026-11-01T10:00:00.000Z", "created_at": "2026-11-01T10:00:00.000Z", "updated_at": "2026-12-03T22:33:00.000Z", "meta_event": "PARTNER_ADDED", "details": { "partner_app_id": "1234567890" } } }, "request": null } ``` Prueba Evento | Cuándo `webhook.test` | POST /webhook-endpoints/{id}/test ## webhook.test POST a tu URL — webhook.test ```json { "object": "event", "id": "evt_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "type": "webhook.test", "api_version": "v1", "created_at": "2026-12-03T22:33:00.000Z", "livemode": true, "profile_id": "prf_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "account_id": "acc_01J8Z3K4M5N6P7Q8R9S0T1U2V3", "platform": "whatsapp", "data": { "object": { "object": "webhook_test", "webhook_endpoint_id": "whe_01J8Z3K4M5N6P7Q8R9S0T1U2V3" } }, "request": null } ``` --- ## Eliminar endpoint URL: https://docs.octuvia.com/webhooks/delete-webhook-endpoint Endpoint: DELETE https://api.octuvia.com/v1/webhook-endpoints/{webhook_endpoint_id} Borra el endpoint. Las entregas pendientes a esa URL se cancelan. DELETE /webhook-endpoints/{webhook_endpoint_id} --- ## Entregas de un evento URL: https://docs.octuvia.com/webhooks/get-event-deliveries Endpoint: GET https://api.octuvia.com/v1/events/{event_id}/deliveries Intentos de entrega de un evento a tus endpoints (status, intentos, HTTP). GET /events/{event_id}/deliveries --- ## Listar eventos URL: https://docs.octuvia.com/webhooks/get-events Endpoint: GET https://api.octuvia.com/v1/events Log de eventos del workspace (más reciente primero). Útil si tu endpoint estuvo caído: reconciliás y reintentas entregas. GET /events --- ## Listar endpoints URL: https://docs.octuvia.com/webhooks/get-webhook-endpoints Endpoint: GET https://api.octuvia.com/v1/webhook-endpoints Lista los webhook endpoints del workspace (modo de la API key). GET /webhook-endpoints --- ## Actualizar endpoint URL: https://docs.octuvia.com/webhooks/patch-webhook-endpoint Endpoint: PATCH https://api.octuvia.com/v1/webhook-endpoints/{webhook_endpoint_id} Cambia URL, eventos, filtros o status (enabled / disabled). Úsalo también para reactivar uno en disabled_by_failures. PATCH /webhook-endpoints/{webhook_endpoint_id} --- ## Reintentar entrega URL: https://docs.octuvia.com/webhooks/post-retry-delivery Endpoint: POST https://api.octuvia.com/v1/webhook-deliveries/{delivery_id}/retry Reencola una entrega para envío inmediato, incluso si quedó dead. Idempotency-Key recomendado. POST /webhook-deliveries/{delivery_id}/retry --- ## Rotar secreto URL: https://docs.octuvia.com/webhooks/post-rotate-secret Endpoint: POST https://api.octuvia.com/v1/webhook-endpoints/{webhook_endpoint_id}/rotate-secret Genera un signing_secret nuevo. Durante expire_previous_in_seconds (default 24 h) cada entrega lleva dos firmas en X-Octuvia-Signature (v1=nuevo,v1=anterior) para migrar sin perder eventos. POST /webhook-endpoints/{webhook_endpoint_id}/rotate-secret --- ## Probar endpoint URL: https://docs.octuvia.com/webhooks/post-test Endpoint: POST https://api.octuvia.com/v1/webhook-endpoints/{webhook_endpoint_id}/test Envía un evento webhook.test firmado a tu URL y devuelve el resultado del intento (status HTTP y cuerpo). No reintenta. POST /webhook-endpoints/{webhook_endpoint_id}/test --- ## Crear endpoint URL: https://docs.octuvia.com/webhooks/post-webhook-endpoints Endpoint: POST https://api.octuvia.com/v1/webhook-endpoints Registra una URL HTTPS y los eventos a recibir. El signing_secret (whsec_…) solo se muestra aquí y al rotar: guárdalo. Nota: Recomendado `Idempotency-Key`. La URL debe ser HTTPS pública (accesible desde internet). POST /webhook-endpoints ---