---
title: "Create Alert Rule"
method: POST
path: "/api/v1/clusters/{cluster_id}/observability/alerts/rules"
tags: ["observability"]
---

# Create Alert Rule

`POST /api/v1/clusters/{cluster_id}/observability/alerts/rules`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/clusters/{cluster_id}/observability/alerts/rules`
- Auth: none declared

Create a new alert rule for a cluster.

## Path parameters

- `cluster_id` string, uuid, required

## Request body

- AlertRuleCreate
  - `name` string, required
  - `expression` string, required
  - `duration` string, required
  - `severity` 'critical' | 'warning' | 'info', required
  - `labels` object, nullable
  - `annotations` object, nullable
  - `is_enabled` boolean
  - `notification_channel_ids` string[], nullable
  - `organization_id` string, uuid, nullable

## Response `201`

Successful Response

- AlertRuleResponse
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `organization_id` string, uuid, nullable
  - `cluster_id` string, uuid, nullable
  - `name` string, required
  - `expression` string, required
  - `duration` string, required
  - `severity` 'critical' | 'warning' | 'info', required
  - `labels` object, nullable
  - `annotations` object, nullable
  - `is_enabled` boolean, required
  - `notification_channel_ids` string[], nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
