---
title: "Update an alert rule"
method: PATCH
path: "/v1/risk/alert-rules/{rule_id}"
tags: ["Alert Rules"]
---

# Update an alert rule

`PATCH /v1/risk/alert-rules/{rule_id}`

Partially updates a rule. Only the supplied fields change. Changing `parameters` bumps the rule's `version` and archives the previous version. To change channels, use PUT /:rule_id/channels.

## Path parameters

- `rule_id` string, required

## Request body

- PatchAlertRuleDto
  - `name` string — Display name for the rule.
  - `severity` string — Severity label for the rule.
  - `enabled` boolean — Whether the rule is enabled.
  - `parameters` object — Replacement parameter values, as a `{ field: value }` object (arrays are normalized to an object on write). Changing this bumps the rule's version and archives the previous version.

## 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)
