Discord delivery
A rule with format: "discord" sends a Discord webhook message rather than Farbeam JSON. It needs no receiver of your own. This is the only chat format that works today. Telegram and email delivery are Planned.
#Set it up
- In Discord, open the channel settings, then Integrations, then Webhooks, and create a webhook. You need the Manage Webhooks permission.
- Copy the webhook URL.
- Create a rule with that URL and
formatset todiscord. - Send a test delivery.
curl -s -X POST "https://farbeamlabs.com/api/v1/rules" \
-H "Authorization: Bearer $FARBEAM_KEY" \
-H "content-type: application/json" \
-d '{"name":"Stablecoins over 10m","expression":"usd >= 10m and token in [\"USDC\",\"USDT\"]","url":"https://discord.com/api/webhooks/000000000000000000/replace-with-your-token","format":"discord"}'const res = await fetch("https://farbeamlabs.com/api/v1/rules", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FARBEAM_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
name: "Stablecoins over 10m",
expression: 'usd >= 10m and token in ["USDC","USDT"]',
url: process.env.DISCORD_WEBHOOK_URL,
format: "discord",
}),
});
console.log((await res.json()).data);import os, requests
res = requests.post(
"https://farbeamlabs.com/api/v1/rules",
headers={"Authorization": f"Bearer {os.environ['FARBEAM_KEY']}"},
json={
"name": "Stablecoins over 10m",
"expression": 'usd >= 10m and token in ["USDC","USDT"]',
"url": os.environ["DISCORD_WEBHOOK_URL"],
"format": "discord",
},
timeout=30,
)
print(res.json()["data"])Then test it:
curl -s -X POST "https://farbeamlabs.com/api/v1/rules/$RULE_ID/test" \
-H "Authorization: Bearer $FARBEAM_KEY"You can do the same in the console.
#What is sent
This body was produced by the service's formatter on 2026-11-04 UTC, with an example row and rule name.
{
"content": "**Large stablecoin moves**: $1,128,425 USDC on Ethereum from 0x0510…cfe7 to Coinbase 10\nhttps://farbeamlabs.com/tx/ethereum/0x0a6ea84a9867ababa17d342b62835eaf0e783059108afc8691f55e4fc20edbea",
"allowed_mentions": { "parse": [] }
}It renders as two lines: a bold rule name with the amount, token, chain and parties, then a link to the transaction page. A liquidity rule states the change, the window and the new liquidity value.
| Part | Source |
|---|---|
| Rule name | The rule's name, in bold |
| Amount | usd, rounded to a whole dollar with commas |
| Token and chain | token, and the chain name |
| Parties | The label when it exists, else a shortened address. Addresses longer than 14 characters show the first 6 and last 4. |
| Link | https://farbeamlabs.com/tx/<chain>/<tx>. A liquidity rule links to https://farbeamlabs.com/token/<chain>/<address>. |
allowed_mentions has an empty parse list. A rule name holding @everyone will not ping anyone.
The whole content is cut to 1,900 characters. Discord's limit is 2,000.
A test delivery sends this:
{
"content": "Farbeam test delivery for rule \"Large stablecoin moves\".",
"allowed_mentions": { "parse": [] }
}#What is different from JSON
| Feature | json | discord |
|---|---|---|
| Body | Event JSON with full row | One content string |
| Full row in the body | Yes | No |
| Signature headers | Sent, and you verify them | Sent, and Discord ignores them |
| Signing secret | Needed | Created, but you can ignore it |
| Message layout | Your choice | Fixed. No custom template and no embeds. |
If you need a custom message, use json, verify it in your own service, then post to Discord from there.
#Discord behavior to expect
- A successful post returns 204, which counts as delivered.
- Discord's rate limit returns 429, which counts as a failed attempt and is retried by the normal schedule.
- A deleted webhook returns 404. After four attempts per delivery and 20 failed deliveries in a row, the rule turns off.
#Choosing the rule
Chat channels get noisy. At a floor of $100,000, the index stores many rows per minute across chains, so a rule with no filter will reach the cap of 120 per hour within minutes. Start high, with a floor like usd >= 10m, and lower it once you see the rate. Check matched against tested in Validate a rule first.
usd >= 10m and not sampledAdd not sampled if you do not want Solana rows, which are sampled. Keep a note in the channel topic that a transfer is not a trade. See transfers vs trades.
#Protect the URL
Anyone with a Discord webhook URL can post to that channel. Treat it as a secret. The rule's url is returned by GET /rules, to the key that owns it. Keep the API key safe, and do not paste responses into public places. If it leaks, delete the webhook in Discord and create a new one, then PATCH the rule with the new URL.