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

TypeConfig requiredNotes
SlackIncoming webhook URLSends a formatted card with color-coded severity.
DiscordWebhook URLSame rich format as Slack.
WebhookHTTPS POST endpointJSON payload. Works with PagerDuty, Datadog, n8n, Zapier, etc.
EmailSMTP credentials in environmentPlain text. Requires server-side SMTP config — contact your admin.

Adding a Slack channel

  1. In Slack, create an Incoming Webhook for your workspace: Settings → Apps → Incoming Webhooks → Add to Slack.
  2. Copy the webhook URL (starts with https://hooks.slack.com/services/…).
  3. In Zelyx, go to Settings Alert channelsAdd channel.
  4. Select Slack, paste the webhook URL, give it a name, and click Save.
  5. Click Test to send a sample message and verify it arrives.

Adding a generic webhook

json
// 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

EventTriggered whenKey data
budget_thresholdDaily spend crosses 80% or 90% of the company capspend_usd, budget_usd, threshold_label (80% / 90%)
budget_blockedA call is blocked because the company daily cap is exhaustedspend_usd, budget_usd, model
run_exhaustedA run budget is fully consumedrun_id, budget_usd, spent_usd, call_count
loop_detectedA looping call pattern is detected for a sessionsession_id, model, call_count, window_seconds, action (warn/block)
overdraftA call proceeds past the daily cap (overdraft policy)budget_usd, spend_usd, overdraft_usd, model
forecast_warningBudget exhaustion is predicted within ~7 daysdays_until_exhaustion, exhaustion_date, monthly_projection_usd, confidence
scope_thresholdA 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.

TipAdd a test channel with no filter to receive all events during initial setup — helps you verify the right events are firing before configuring production 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.