Skip to content

X-Hub Webhooks: Send Alerts to Your Own Tools

Ask AI

Ready taskDo it with me, step by step

Chat assistants

Open in ChatGPTNew tabOpen in ClaudeNew tab

Coding agents

Claude CodeOpens the desktop appCodexOpens the desktop appCursorOpens the app from the web

Copy

View as MarkdownPlain text for AI tools
See the prompt
Read https://xproxy.io/document/xproxy-hub-webhooks.md, the XProxy guide "X-Hub Webhooks: Send Alerts to Your Own Tools". If you cannot open links, download them with curl. Then take me through it one step at a time: tell me exactly what to click or type, wait until I say it is done, and help me when what I see is different from the guide. Start by asking what I have (hardware, XProxy version, what I see now).
Other XProxy guides, each with a Markdown copy at its URL + .md, are listed in https://xproxy.io/llms.txt.

The app opens with the prompt filled in. Nothing runs until you press Enter.

X-Hub can send a signed message to your own URL when a problem opens, comes back, is fixed or is acknowledged. Use it to post in Slack, start an n8n flow or page your on-call person.

You need: a running X-Hub, an owner login, and a URL on the internet that accepts a POST.

Every try is listed under Deliveries. Your receiver checks the signature with your whsec_ secret.

How do I add a webhook?

Step 1 of 5

Open Webhooks and click Add endpoint

An owner opens Webhooks under Integrations and clicks Add endpoint 1. The page explains how messages are signed. How to verify a webhook 2 opens the checking steps.

Webhooks are owner-only. They can only be created from X-Hub in a browser, never with an API key.

What does a message look like?

X-Hub sends a JSON POST. This is an incident.opened message:

Payload
{
  "type": "incident.opened",
  "timestamp": "2026-11-27T14:04:20Z",
  "data": {
    "id": 4,
    "kind": "modem.offline",
    "severity": "warning",
    "status": "firing",
    "server_id": "mljrfvpcvrzqldv5",
    "server_name": "Los Angeles rack",
    "modem_id": "la-rack-m02",
    "position": 2,
    "title": "Modem #2 (AT&T) on Los Angeles rack is offline",
    "opened_at": "2026-11-27T21:04:20+07:00",
    "flaps": 0
  }
}

How do I check a message is real?

Messages follow the Standard Webhooks rules, so any Standard Webhooks library can check them. Every request has three headers:

  • webhook-id: a unique id, the same on every retry. Use it to ignore duplicates.
  • webhook-timestamp: seconds since 1970 when this attempt was sent. Reject old ones.
  • webhook-signature: v1, followed by a signature made with your whsec_ secret.

Easiest in Node.js: install the library with npm i standardwebhooks, then check the raw body:

Node.js
import { Webhook } from 'standardwebhooks'
const wh = new Webhook(process.env.HUB_WEBHOOK_SECRET) // the whsec_ secret
wh.verify(rawBody, headers) // throws if the message is not from your X-Hub

The same text is in X-Hub under How to verify a webhook, with a plain Node.js example without a library.

What if my receiver is down?

  • X-Hub tries up to 8 times over about a day. Deliveries shows each try: time, event, status (succeeded, pending or failed), tries, HTTP code and the error. Open a row to see the payload. A failed row has a Retry button.
  • An endpoint that fails 50 times in a row, or answers 410 Gone, is turned off automatically with the reason on its card. Fix your receiver, then switch it on again.

FAQ

Can I post to Slack directly?

Slack does not check Standard Webhooks signatures, so use a small relay (n8n, Zapier, your own script) that verifies the message and posts to Slack.

My receiver is on my LAN

X-Hub blocks internal addresses so a webhook cannot be used to reach your private network. Put the receiver on a public address, or start X-Hub with the -webhooks-allow-private option (X-Hub on a VPS).

Webhook or Telegram?

Telegram is for people, webhooks are for programs. You can use both: see Telegram bot.

What next?

Still stuck?A technician can look at your device with a one-time PIN, or chat with us on Telegram.