Link channels to an alert rule
curl --request PUT \
--url https://api.range.org/v1/risk/alert-rules/{rule_id}/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscribed_channels": [
{
"alert_channel_id": "44444444-4444-4444-4444-444444444445"
}
]
}
'import requests
url = "https://api.range.org/v1/risk/alert-rules/{rule_id}/channels"
payload = { "subscribed_channels": [{ "alert_channel_id": "44444444-4444-4444-4444-444444444445" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscribed_channels: [{alert_channel_id: '44444444-4444-4444-4444-444444444445'}]
})
};
fetch('https://api.range.org/v1/risk/alert-rules/{rule_id}/channels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.range.org/v1/risk/alert-rules/{rule_id}/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'subscribed_channels' => [
[
'alert_channel_id' => '44444444-4444-4444-4444-444444444445'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.range.org/v1/risk/alert-rules/{rule_id}/channels"
payload := strings.NewReader("{\n \"subscribed_channels\": [\n {\n \"alert_channel_id\": \"44444444-4444-4444-4444-444444444445\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.range.org/v1/risk/alert-rules/{rule_id}/channels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscribed_channels\": [\n {\n \"alert_channel_id\": \"44444444-4444-4444-4444-444444444445\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v1/risk/alert-rules/{rule_id}/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscribed_channels\": [\n {\n \"alert_channel_id\": \"44444444-4444-4444-4444-444444444445\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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",
"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",
"optional": false
}
]
}
}Alerts
Link Channels to an Alert Rule
Replaces the rule’s subscribed channels with the supplied set.
PUT
/
v1
/
risk
/
alert-rules
/
{rule_id}
/
channels
Link channels to an alert rule
curl --request PUT \
--url https://api.range.org/v1/risk/alert-rules/{rule_id}/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscribed_channels": [
{
"alert_channel_id": "44444444-4444-4444-4444-444444444445"
}
]
}
'import requests
url = "https://api.range.org/v1/risk/alert-rules/{rule_id}/channels"
payload = { "subscribed_channels": [{ "alert_channel_id": "44444444-4444-4444-4444-444444444445" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscribed_channels: [{alert_channel_id: '44444444-4444-4444-4444-444444444445'}]
})
};
fetch('https://api.range.org/v1/risk/alert-rules/{rule_id}/channels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.range.org/v1/risk/alert-rules/{rule_id}/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'subscribed_channels' => [
[
'alert_channel_id' => '44444444-4444-4444-4444-444444444445'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.range.org/v1/risk/alert-rules/{rule_id}/channels"
payload := strings.NewReader("{\n \"subscribed_channels\": [\n {\n \"alert_channel_id\": \"44444444-4444-4444-4444-444444444445\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.range.org/v1/risk/alert-rules/{rule_id}/channels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscribed_channels\": [\n {\n \"alert_channel_id\": \"44444444-4444-4444-4444-444444444445\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v1/risk/alert-rules/{rule_id}/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscribed_channels\": [\n {\n \"alert_channel_id\": \"44444444-4444-4444-4444-444444444445\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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",
"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",
"optional": false
}
]
}
}Authorizations
Use Authorization: Bearer
Path Parameters
The alert rule id.
Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Body
application/json
Channels to subscribe this rule to, each with an optional severity floor. Replaces the existing set (pass an empty array to clear all).
Show child attributes
Show child attributes
Response
200 - application/json
Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Example:
"workspace-123"
Example:
"GasPressure"
Example:
"high"
Example:
{ "threshold": 90 }
Available options:
BLOCK, TICK Example:
"BLOCK"
Example:
true
Incremented each time the rule parameters change. Starts at 1.
Example:
1
Show child attributes
Show child attributes
Example:
[
{
"alert_channel_id": "44444444-4444-4444-4444-444444444445",
"min_severity": null
}
]
Example:
"2026-05-14T12:00:00.000Z"
Example:
"2026-05-14T12:00:00.000Z"
Example:
"High gas on eth"
Example:
"eth"
Example:
"alert-runner-eth-v2"
Show child attributes
Show child attributes
Last modified on July 1, 2026
Was this page helpful?
⌘I