Webhooks
| Tool | Endpoint REST | Anotaciones |
|---|---|---|
list_webhooks | GET /v1/webhooks | lectura, idempotente |
get_webhook | GET /v1/webhooks/{id} | lectura, idempotente |
create_webhook | POST /v1/webhooks | escritura |
update_webhook | PATCH /v1/webhooks/{id} | escritura |
delete_webhook | DELETE /v1/webhooks/{id} | destructiva |
list_webhook_events | GET /v1/webhooks/events | lectura, idempotente |
list_webhook_events
Sin argumentos. Devuelve el catálogo completo de eventos webhook permitidos, agrupados por categoría: conversation, message, client, whatsappFlow.
Llama esta tool primero si quieres saber qué valores son válidos para el campo events[] de create_webhook o update_webhook.
create_webhook
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
name | string (1-100) | sí | Nombre descriptivo. |
url | string URL HTTPS (≤ 500) | sí | Destino del webhook. |
events | string[] (1-N) | sí | Eventos a los que se suscribe. Ver list_webhook_events. |
active | boolean | no | Default true. |
secret | string (≤ 255) | no | Para firmar el payload. |
headers | Record<string, string> (máx 10) | no | Cabeceras extra (key ≤ 100, value ≤ 500). |
workspace | string | si multi-ws |
Ejemplo
{
"name": "create_webhook",
"arguments": {
"name": "supabase-events",
"url": "https://example.supabase.co/functions/v1/platica-webhook",
"events": ["conversation.created", "message.created", "client.created"],
"secret": "muy-secreto-y-largo",
"headers": { "X-Custom-Tag": "produccion" }
}
} update_webhook
Mismos campos que create_webhook (todos opcionales), más webhookId.
get_webhook / delete_webhook
Sólo requieren webhookId (más workspace opcional para multi-ws en delete_webhook).