---
title: "Create an alert rule"
method: POST
path: "/v1/risk/alert-rules"
tags: ["Alert Rules"]
---

# Create an alert rule

`POST /v1/risk/alert-rules`

Creates an alert rule from a registered template. Supply the template id; rule_type, network, and runner_id are copied from it (not supplied).

## Request body

- CreateAlertRuleDto
  - `id` string, uuid, required — The id of the template this rule instantiates. The template supplies the rule_type, network, runner_id, severity, and trigger.
  - `name` string, required — Display name for the rule.
  - `severity` string — Severity override. Defaults to the matched template severity.
  - `parameters` object — User-supplied parameter values, as a `{ field: value }` object. A `[{ field, value }]` array or single-element wrapper is also accepted and normalized to an object on write.
  - `trigger` 'BLOCK' | 'TICK' — Trigger override. Defaults to the matched template trigger.

## Response `200`

- AlertRuleDto
  - `id` string, required
  - `workspace_id` string, required
  - `name` string, nullable
  - `rule_type` string, required
  - `network` string, nullable
  - `severity` string, required
  - `parameters` object, required
  - `trigger` 'BLOCK' | 'TICK', required
  - `enabled` boolean, required
  - `version` number, required — Incremented each time the rule parameters change. Starts at 1.
  - `subscribed_channels` SubscribedChannelDto[], required
    - `alert_channel_id` string, required
    - `min_severity` 'info' | 'low' | 'medium' | 'high' | 'critical', nullable
  - `runner_id` string, nullable
  - `created_at` string, required
  - `updated_at` string, required
  - `alert_template` AlertTemplateDto
    - `id` string, required — Unique identifier of the alert rule template.
    - `type` string, required — Internal rule type identifier used by the alert engine.
    - `label` string, required — Short display name for the template.
    - `description` string, required — Message template sent when the rule fires. Supports `{{variable}}` placeholders.
    - `network` string, required — Network slug this template targets.
    - `severity` 'low' | 'medium' | 'high', required — Risk severity of alerts produced by this template.
    - `tags` string[], required — Categorisation tags for filtering and discovery.
    - `trigger` 'BLOCK' | 'TICK', required — Whether the template is evaluated per block or per tick.
    - `parameters` RuleParameterDto[], required — Parameters the user must supply when creating an alert rule from this template.
      - `label` string, required — Human-readable label for this parameter.
      - `description` string, required — Description of what value to provide.
      - `field` string, required — Field key used when creating an alert rule from this template.
      - `field_type` string, required — Expected value type (e.g. "Address", "Amount").
      - `optional` boolean, required — Whether this parameter is optional.

---

[API](https://skmtc.net/range/apis/range-platform-api.md) · [All operations](https://skmtc.net/range/apis/range-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/range/range-platform-api/revisions/9926df2e476d/schema)
