Skip to main content
Configure webhooks for alerts.

Create Webhook

POST /api/webhooks
Body:
{
  "url": "https://hooks.slack.com/...",
  "events": ["cost_spike", "quality_drop"],
  "enabled": true
}

Webhook Payload

{
  "type": "cost_spike",
  "service": "chat-api",
  "baseline": 0.50,
  "current": 2.30,
  "increase": 360,
  "threshold": 200,
  "timestamp": "2026-02-12T14:30:00Z"
}

Slack Integration

curl -X POST http://api:8081/api/webhooks \
  -d '{
    "url": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
    "events": ["cost_spike", "quality_drop"]
  }'