Webhooks API

Manage outbound webhook triggers.

Endpoints

MethodPathDescription
GET/webhooksList webhooks
POST/webhooksCreate a webhook
DELETE/webhooks/{id}Delete a webhook
POST/webhooks/{id}/testSend test payload

GET /webhooks

curl http://localhost:4200/webhooks

Response (200)

{
  "webhooks": [
    {
      "id": "wh-001",
      "agent_id": "550e8400-e29b-41d4-a716-446655440000",
      "url": "https://hooks.company.com/claims-events",
      "created_at": "2026-06-01T10:00:00Z"
    }
  ]
}

POST /webhooks

curl -X POST http://localhost:4200/webhooks \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://hooks.company.com/claims-events"
  }'

Response (201)

{"id": "wh-002"}

DELETE /webhooks/{id}

curl -X DELETE http://localhost:4200/webhooks/wh-001

Response (204 No Content)


POST /webhooks/{id}/test

curl -X POST http://localhost:4200/webhooks/wh-002/test

Response (200)

{"delivered": true, "status_code": 200, "latency_ms": 45}

Response (200 — failed delivery)

{"delivered": false, "error": "connection refused"}