> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselumina.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Webhook configuration for alerts

Configure webhooks for alerts.

***

## Create Webhook

```
POST /api/webhooks
```

**Body:**

```json theme={null}
{
  "url": "https://hooks.slack.com/...",
  "events": ["cost_spike", "quality_drop"],
  "enabled": true
}
```

***

## Webhook Payload

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

***

## Slack Integration

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