v1

latestOpenAPI 3.0.02026-07-26117198177.4 KB
Alert Rules

Create an alert rule

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

post/v1/risk/alert-rules

Request body

idstring uuid required

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

namestring required

Display name for the rule.

severitystring

Severity override. Defaults to the matched template severity.

parametersobject

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.

Example request

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "High gas on eth",
  "severity": "high"
}

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"
      }
    ]
  }
}