# X-Hub Webhooks: Send Alerts to Your Own Tools

> For AI tools: this is the Markdown copy of https://xproxy.io/document/xproxy-hub-webhooks. Every XProxy guide has one at its URL + `.md`; the index of all guides is https://xproxy.io/llms.txt.

Send signed incident messages from X-Hub to Slack, n8n or your own server. Add an endpoint, pick events, check deliveries and verify messages.

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](https://xproxy.io/document/xproxy-hub-setup), an **owner** login, and a URL on the internet that accepts a POST.

## How do I add a webhook?

**Step 1: Open Webhooks and click Add endpoint**

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

![The empty Webhooks page with Add endpoint and How to verify a webhook marked (demo)](https://media1.xproxy.io/docs/hub/wh-1-empty.webp)

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

**Step 2: Type the URL of your receiver**

Fill the form: the **URL** that receives the messages, an optional **Description** so you remember what it is, the **Events to send**. Click **Add endpoint**.

![The Add endpoint form with the URL, description, events and the Add endpoint button marked (demo)](https://media1.xproxy.io/docs/hub/wh-3-add-dialog.webp)

> X-Hub refuses addresses on internal networks (for example 192.168.x.x) unless it was started with the option that allows them. Use a public address.

**Step 3: Pick the events**

Leave **Events to send** empty to get everything. Or pick **incident.opened** (a problem starts) and **incident.resolved** (a problem is fixed). The other two are **incident.reopened** (a problem comes back) and **incident.acknowledged** (someone is handling it).

![The list of four incident events with opened and resolved marked (demo)](https://media1.xproxy.io/docs/hub/wh-2-events-list.webp)

**Step 4: Copy the secret now**

X-Hub shows a secret that starts with `whsec_`. Your receiver uses it to check that messages really come from your X-Hub. **It is shown only once.** Copy it, then click **I have copied it**.

![The signing secret window with the secret, the shown-only-once notice and the I have copied it button marked (demo)](https://media1.xproxy.io/docs/hub/wh-4-secret.webp)

> Lost the secret? Open the **...** menu of the endpoint and choose **Rotate secret** for a new one. Update your receiver with it.

**Step 5: Send a test**

Each endpoint has a card. The dot and **Healthy** show it works. The switch pauses or resumes it. **Send test** sends a test message and shows **Test: delivered · HTTP 200** or the error. **Deliveries** lists what was sent. The **...** menu at the end has **Edit**, **Rotate secret** and **Delete**.

![An endpoint card with the address, the switch, Send test and Deliveries marked (demo)](https://media1.xproxy.io/docs/hub/wh-5-list.webp)

> Your receiver must answer with a 2xx status. Any other answer counts as a failed attempt.

## 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](https://www.standardwebhooks.com) 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](https://xproxy.io/document/xproxy-hub-telegram).

## What next?

Add AI help or approvals.

[AI assistants →](https://xproxy.io/document/xproxy-hub-ai-assistants) [Users and API keys →](https://xproxy.io/document/xproxy-hub-users)

---

Source: https://xproxy.io/document/xproxy-hub-webhooks
