For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhooks

Recibe eventos de tu cuenta en tu propia URL, en tiempo real. Base: https://panel.anunzi.net/api/v1/webhooks/.

Método
Ruta
Descripción

GET

list.php

Lista tus webhooks y los eventos disponibles.

POST

set.php

Crea o actualiza un webhook.

POST

delete.php

Elimina un webhook.


Eventos disponibles

  • lead.created — se creó un contacto.

  • lead.updated — se actualizó un contacto.

  • ticket.created — se creó un ticket de soporte.

  • call.finished — finalizó una llamada. (También puedes recibirlo por agente con webhook_url en Agentes.)

Suscribirse

curl -X POST "https://panel.anunzi.net/api/v1/webhooks/set.php" \
  -H "Authorization: Bearer anz_live_TU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url":"https://tu.app/anunzi-webhook", "events":["lead.created","ticket.created"] }'

Al crear, se devuelve un secret una sola vez. Puedes suscribirte a todo con "events":["*"].

Verificar la firma

Cada entrega incluye estos encabezados:

La firma es HMAC-SHA256 del cuerpo crudo usando tu secret. Verificala así (pseudocódigo):

Cuerpo del evento

Responde con 2xx. Las entregas son best-effort (sin reintentos garantizados en esta versión).

Última actualización