Docs / API: Alert rules
List rules
Returns all alert rules of this account, or of this key if the key has no account.
GET/api/v1/rules
| Property | Value |
|---|---|
| Authentication | Required. Send Authorization: Bearer <key>. |
| Rate-limit cost | 1 unit |
| Status | Live |
#Request
curl -s "https://farbeamlabs.com/api/v1/rules" \
-H "Authorization: Bearer $FARBEAM_KEY"const res = await fetch("https://farbeamlabs.com/api/v1/rules", {
headers: { Authorization: `Bearer ${process.env.FARBEAM_KEY}` }
});
const { data, meta, error } = await res.json();
if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data);import os, requests
res = requests.get(
"https://farbeamlabs.com/api/v1/rules",
headers={"Authorization": f"Bearer {os.environ['FARBEAM_KEY']}"},
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])You can send this request now in the API playground.
#Response
This response is real. It was captured from the running API when this page was built. Arrays are cut to two items.
JSON
{
"data": [
{
"id": "rule_000000000000",
"name": "Large stablecoin moves",
"expression": "usd >= 5m and token in [\"USDC\",\"USDT\"]",
"url": "https://example.com/hooks/farbeam",
"format": "json",
"cooldown_seconds": 300,
"last_fired_at": null,
"enabled": true,
"created_at": "2026-11-04T20:10:58.171Z",
"consecutive_failures": 0
}
],
"meta": {
"request_id": "req_42763851fefa",
"as_of": "2026-11-04T20:10:58.172Z"
}
}#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_key | The request has no key. |
| 401 | invalid_key | The key is unknown or revoked. |
All errors share one format. See errors.