---
title: "Create Alert Rule Route"
method: POST
path: "/api/v1/alert-rules"
tags: ["alerts"]
---

# Create Alert Rule Route

`POST /api/v1/alert-rules`

## Headers

- `Authorization` string, nullable

## Request body

- AlertRuleCreate
  - `name` string, required
  - `kind` 'event' | 'metric'
  - `trigger_type` 'policy_block' | 'policy_escalate' | 'high_latency' | 'high_intent_score' | 'run_error' | 'turn_blocked' | 'turn_escalated' | 'turn_error', nullable
  - `threshold` number, nullable
  - `severity` 'info' | 'warning' | 'critical'
  - `cooldown_seconds` integer
  - `metric` 'turn_error_rate' | 'turn_blocked_rate' | 'escalation_count' | 'turn_count' | 'no_traffic' | 'token_usage' | 'llm_latency_p95_ms' | 'ttft_p95_ms' | 'llm_cost_usd' | 'guardrail_score_avg' | 'guardrail_block_count', nullable
  - `operator` 'gt' | 'gte' | 'lt' | 'lte', nullable
  - `window_seconds` 300 | 900 | 3600 | 86400, nullable
  - `group_by` 'proxy_id', nullable
  - `min_samples` integer
  - `filters` object
  - `channels` string[]
  - `proxy_id` string, uuid, nullable
  - `enabled` boolean

## Response `201`

Successful Response

- AlertRuleRead
  - `id` string, uuid, required
  - `org_id` string, uuid, required
  - `proxy_id` string, uuid, nullable, required
  - `name` string, required
  - `kind` string, required
  - `trigger_type` string, nullable, required
  - `threshold` number, nullable, required
  - `severity` string, required
  - `cooldown_seconds` integer, required
  - `metric` string, nullable, required
  - `operator` string, nullable, required
  - `window_seconds` integer, nullable, required
  - `group_by` string, nullable, required
  - `min_samples` integer, required
  - `filters` object, required
  - `channels` string[], required
  - `enabled` boolean, required
  - `created_by` string, uuid, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-25** `e63bfe8e38b4` — 5 breaking, 22 info
  - removed the enum value `high_intent_score` of the request property `trigger_type`
  - removed the enum value `high_latency` of the request property `trigger_type`
  - removed the enum value `policy_block` of the request property `trigger_type`
  - removed the enum value `policy_escalate` of the request property `trigger_type`
  - …23 more

[Change history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/alert-rules/post.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) · [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xenovia/controlplane/revisions/9efbf54a37d4/schema)
