Skip to main content
PATCH
/
v1
/
risk
/
alert-rules
/
{rule_id}
Update an alert rule
curl --request PATCH \
  --url https://api.range.org/v1/risk/alert-rules/{rule_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "High gas on eth",
  "severity": "high",
  "enabled": true,
  "parameters": {}
}
'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "workspace_id": "workspace-123",
  "rule_type": "GasPressure",
  "severity": "high",
  "parameters": {
    "threshold": 90
  },
  "trigger": "BLOCK",
  "enabled": true,
  "version": 1,
  "subscribed_channels": [
    {
      "alert_channel_id": "44444444-4444-4444-4444-444444444445",
      "min_severity": null
    }
  ],
  "created_at": "2026-05-14T12:00:00.000Z",
  "updated_at": "2026-05-14T12:00:00.000Z",
  "name": "High gas on eth",
  "network": "eth",
  "runner_id": "alert-runner-eth-v2"
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer

Path Parameters

rule_id
string
required

The alert rule id.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Body

application/json
name
string

Display name for the rule.

Maximum string length: 255
Example:

"High gas on eth"

severity
string

Severity label for the rule.

Maximum string length: 255
Example:

"high"

enabled
boolean

Whether the rule is enabled.

Example:

true

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 - application/json
id
string
required
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

workspace_id
string
required
Example:

"workspace-123"

rule_type
string
required
Example:

"GasPressure"

severity
string
required
Example:

"high"

parameters
object
required
Example:
{ "threshold": 90 }
trigger
enum<string>
required
Available options:
BLOCK,
TICK
Example:

"BLOCK"

enabled
boolean
required
Example:

true

version
number
required

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

Example:

1

subscribed_channels
object[]
required
Example:
[
{
"alert_channel_id": "44444444-4444-4444-4444-444444444445",
"min_severity": null
}
]
created_at
string
required
Example:

"2026-05-14T12:00:00.000Z"

updated_at
string
required
Example:

"2026-05-14T12:00:00.000Z"

name
string | null
Example:

"High gas on eth"

network
string | null
Example:

"eth"

runner_id
string | null
Example:

"alert-runner-eth-v2"

Last modified on July 1, 2026