Alerts
Alert setup & events
Receive real-time notifications on Slack, Discord, a webhook endpoint, or email when budgets approach limits, calls are blocked, loops are detected, or a run is exhausted.
Alert channels
| Type | Config required | Notes |
|---|---|---|
| Slack | Incoming webhook URL | Sends a formatted card with color-coded severity. |
| Discord | Webhook URL | Same rich format as Slack. |
| Webhook | HTTPS POST endpoint | JSON payload. Works with PagerDuty, Datadog, n8n, Zapier, etc. |
| SMTP credentials in environment | Plain text. Requires server-side SMTP config — contact your admin. |
Adding a Slack channel
- In Slack, create an Incoming Webhook for your workspace: Settings → Apps → Incoming Webhooks → Add to Slack.
- Copy the webhook URL (starts with
https://hooks.slack.com/services/…). - In Zelyx, go to Settings → Alert channels → Add channel.
- Select Slack, paste the webhook URL, give it a name, and click Save.
- Click Test to send a sample message and verify it arrives.
Adding a generic webhook
// POST https://your-endpoint.com/zelyx-alerts
{
"event_type": "budget_blocked",
"timestamp": "2026-06-04T14:32:00Z",
"context": {
"company_id": "...",
"model": "gpt-4o-mini",
"spend_usd": 50.00,
"budget_usd": 50.00,
"reason": "daily_budget_exceeded"
}
}The request includes the header X-Zelyx-Event: <event_type> for quick routing in your endpoint.
Event types
| Event | Triggered when | Key data |
|---|---|---|
budget_threshold | Daily spend crosses 80% or 90% of the company cap | spend_usd, budget_usd, threshold_label (80% / 90%) |
budget_blocked | A call is blocked because the company daily cap is exhausted | spend_usd, budget_usd, model |
run_exhausted | A run budget is fully consumed | run_id, budget_usd, spent_usd, call_count |
loop_detected | A looping call pattern is detected for a session | session_id, model, call_count, window_seconds, action (warn/block) |
overdraft | A call proceeds past the daily cap (overdraft policy) | budget_usd, spend_usd, overdraft_usd, model |
forecast_warning | Budget exhaustion is predicted within ~7 days | days_until_exhaustion, exhaustion_date, monthly_projection_usd, confidence |
scope_threshold | A team or project budget crosses 80% or 90% | scope (team/project), scope_name, spend_usd, budget_usd |
Filtering events per channel
By default, a channel receives all events. You can restrict a channel to specific event types — for example, send only budget_blocked and loop_detected to your on-call Slack channel, and send forecast_warning to a weekly digest channel.
Set the filter when creating or editing the channel in Settings → Alert channels.
Alert delivery
Alerts are delivered asynchronously — they never block or slow down AI calls. If a channel endpoint is unreachable, the failure is logged but other channels still receive the alert. There is no built-in retry for failed deliveries.