Skip to main content
POST
/
v1
/
risk
/
alert-rules
Create an alert rule
curl --request POST \
  --url https://api.range.org/v1/risk/alert-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "High gas on eth",
  "severity": "high",
  "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

Body

application/json
id
string<uuid>
required

The id of the template this rule instantiates. The template supplies the rule_type, network, runner_id, severity, and trigger.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

name
string

Display name for the rule.

Maximum string length: 255
Example:

"High gas on eth"

severity
string

Severity override. Defaults to the matched template severity.

Maximum string length: 255
Example:

"high"

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
enum<string>

Trigger override. Defaults to the matched template trigger.

Available options:
BLOCK,
TICK

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