v1

latestOpenAPI 3.0.02026-07-26117198177.4 KB
Alert Rules

Update an alert rule

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.

patch/v1/risk/alert-rules/{rule_id}

Path parameters

rule_idstring required
Example:a1b2c3d4-e5f6-7890-abcd-ef1234567890

The alert rule id.

Request body

namestring

Display name for the rule.

severitystring

Severity label for the rule.

enabledboolean

Whether the rule is enabled.

parametersobject

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.

Example request

{
  "name": "High gas on eth",
  "severity": "high",
  "enabled": true
}

Response

idstring required
workspace_idstring required
namestring nullable
rule_typestring required
networkstring nullable
severitystring required
parametersobject required
trigger'BLOCK' | 'TICK' required
enabledboolean required
versionnumber required

Incremented each time the rule parameters change. Starts at 1.

runner_idstring nullable
created_atstring required
updated_atstring required

Example response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "workspace_id": "workspace-123",
  "name": "High gas on eth",
  "rule_type": "GasPressure",
  "network": "eth",
  "severity": "high",
  "parameters": {
    "threshold": 90
  },
  "trigger": "BLOCK",
  "enabled": true,
  "version": 1,
  "subscribed_channels": [
    {
      "alert_channel_id": "44444444-4444-4444-4444-444444444445",
      "min_severity": null
    }
  ],
  "runner_id": "alert-runner-eth-v2",
  "created_at": "2026-05-14T12:00:00.000Z",
  "updated_at": "2026-05-14T12:00:00.000Z",
  "alert_template": {
    "id": "1",
    "type": "large_transfer",
    "label": "Large Transfer",
    "description": "A large transfer was detected on {{network}}",
    "network": "eth",
    "severity": "high",
    "tags": [
      "defi",
      "transfer"
    ],
    "trigger": "BLOCK",
    "parameters": [
      {
        "label": "Wallet",
        "description": "The address to monitor",
        "field": "address",
        "field_type": "Address"
      }
    ]
  }
}