# API de Webhooks SUMMARY: Registre callbacks HTTP para eventos de memoria, chat y tareas — reciba notificaciones cuando cambien los datos. KEY CONTEXT: Auth: Mind Key Register: POST /webhooks { url, events, secret? } List: GET /webhooks Get: GET /webhooks/:id Update: PUT /webhooks/:id { url?, events?, secret?, enabled? } Delete: DELETE /webhooks/:id Events: memory.*, memory.store, memory.update, memory.delete, chat.*, chat.message_received, task.*, task.created, task.completed Secret: HMAC-SHA256 signed payload, sent in X-Synapse-Signature header Pattern: register webhook → receive POST → process event → call Synapse API API de Webhooks Los webhooks permiten recibir callbacks HTTP cuando ocurren eventos en Synapse. Perfectos para disparar automatización externa, enviar notificaciones o sincronizar con otros sistemas. Endpoints POST /webhooks Registra un nuevo webhook. [CODE BLOCK] Respuesta: [CODE BLOCK] GET /webhooks Lista todos los webhooks del mind actual. [CODE BLOCK] GET /webhooks/:id Obtiene un webhook individual. [CODE BLOCK] PUT /webhooks/:id Actualiza un webhook (URL, eventos, secreto o flag enabled). [CODE BLOCK] DELETE /webhooks/:id Elimina un webhook. [CODE BLOCK] Tipos de evento | Patrón | Se dispara cuando | |---------|------------| | | Cualquier evento de memoria | | | Nueva memoria almacenada | | | Memoria actualizada | | | Memoria eliminada | | | Cualquier evento de chat | | | Nuevo mensaje del humano | | | Cualquier evento de tarea | | | Nueva tarea creada | | | Tarea marcada como completada | | | Todos los eventos | Payload del webhook Cuando se dispara un evento, Synapse hace POST a su URL: [CODE BLOCK] Verificación de firma Si establece un , Synapse firma cada payload con HMAC-SHA256: [CODE BLOCK] Verifíquelo en su handler: [CODE BLOCK] Patrón: sincronización en tiempo real [CODE BLOCK] Próximos pasos - Cron y Scheduler - Guía de automatización con webhooks