Create a per-queue alert rule
Creates one supervisor alert rule for the queue. metric + op + threshold are CHECK-constrained DB-side; action picks the delivery surface (sse in-page, webhook outbound event, email org-admin bell + email). delivery_config tunes the webhook event-type slug or the email subject prefix. cooldown_seconds (default 300, bounds [0, 86400]) suppresses re-fire of the same rule; 0 restores legacy fire-every-tick.
Authorizations
Dashboard JWT token from Clerk
Headers
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
1 - 255Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
true, false Path Parameters
Queue id (que_*).
1Body
1 - 120queue_depth, asa_seconds, abandon_rate, sla_pct, aht_seconds, occupancy_pct, agents_available gt, gte, lt, lte sse, webhook, email Per-action delivery tunables. webhook_event_type overrides the outbound webhook event slug (default queue.alert_rule_fired); email_subject_prefix prepends an operator-visible prefix to the notification subject.
Re-fire suppression window (defaults DB-side to 300). 0 disables the gate (legacy fire-every-tick).
0 <= x <= 86400Response
Created — the resource was created successfully.