> For the complete documentation index, see [llms.txt](https://docs.visualsentinel.com/llms.txt)

# AlertRule data model

An alert rule. Rules watch one monitor and evaluate response time or uptime conditions on its checks.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | Yes |   |
| `organizationId` | string (uuid) | No |   |
| `monitorId` | string (uuid) or null (uuid) | No | The monitor this rule watches. Older rules without a monitor never run (supported: false). |
| `name` | string | Yes |   |
| `description` | string or null | No |   |
| `enabled` | boolean | Yes |   |
| `conditions` | any | Yes | The conditions as stored: one condition object or a list that must all be true. See CreateAlertRuleRequest for the accepted shapes. Rules saved earlier with other condition types are returned as stored, with supported: false. |
| `severity` | string | No | One of: `INFO`, `WARNING`, `CRITICAL`. |
| `threshold` | integer | No |   |
| `window` | integer | No | Seconds. |
| `cooldownMinutes` | integer | No | Minimum minutes between two notifications from this rule. |
| `scheduleStart` | string or null | No | 24h HH:MM. With scheduleEnd, the rule only alerts inside this window. |
| `scheduleEnd` | string or null | No | 24h HH:MM. |
| `timezone` | string | No | IANA timezone for the schedule window. |
| `supported` | boolean | Yes | False when the rule can never run: it has no monitor, or a condition alert rules do not evaluate. Unsupported rules are never evaluated. |
| `unsupportedReason` | string or null | Yes | Why the rule is not supported, in plain words. Null when supported. |
| `monitor` | object or null | No |   |
| `monitor.id` | string (uuid) | No |   |
| `monitor.name` | string | No |   |
| `monitor.url` | string | No |   |
| `notificationChannels` | array of object | No |   |
| `notificationChannels[].id` | string (uuid) | No |   |
| `notificationChannels[].name` | string | No |   |
| `notificationChannels[].type` | string | No |   |
| `notificationChannels[].enabled` | boolean | No |   |
| `createdAt` | string (date-time) | No |   |
| `updatedAt` | string (date-time) | No |   |

## Used by

- [AlertRuleResponse](https://docs.visualsentinel.com/reference/models/alert-rule-response.md) data model
- [AlertRuleListResponse](https://docs.visualsentinel.com/reference/models/alert-rule-list-response.md) data model

Generated from the OpenAPI 3.1 specification at [https://docs.visualsentinel.com/openapi.json](https://docs.visualsentinel.com/openapi.json).
