> ## Documentation Index
> Fetch the complete documentation index at: https://hebeat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Receive signed JSON events at your own endpoint when monitors, incidents and maintenance change.

> [!NOTE]
>
> Plan feature: **webhook channels**, included in paid plans. See [pricing](https://hebeat.com/pricing).

A webhook channel sends an HTTPS `POST` with a JSON body to your endpoint for each event. Add one from **Notifications → Add webhook**, or with `POST /notification-channels` in the [API](https://hebeat.com/docs/api-reference/introduction.md).

## Set up a webhook

1. Enter the endpoint **URL**. It must use HTTPS and resolve to a public address: private, loopback and link-local addresses are refused, both when you save and before every delivery.
2. Optionally add up to 5 **custom headers**, for example an authorization token for your endpoint. Header values are stored encrypted and never shown again.
3. Choose the events and save. Copy the **signing secret** (`whsec_…`): it is shown only once.

Use **Send test event** to send a `test` event and see your endpoint's answer immediately.

## Events

| Event | When | Follows the channel's event setting |
| - | - | - |
| `monitor.down` | A monitor goes down. | Down |
| `monitor.up` | A monitor recovers. | Recovered |
| `monitor.degraded` | A monitor responds slower than its threshold. | Degraded |
| `incident.opened` | An incident opens or reopens. Lists the incident's alerts from this channel's monitors. | Down (Degraded for degraded-only alerts) |
| `incident.updated` | More of this channel's monitors joined the open incident, or one went from degraded to down. Batched: at most one per minute. | Down |
| `incident.reminder` | Nobody has acknowledged the incident yet: sent every 10 minutes, at most 4 times, to channels told about it. | Down |
| `incident.acknowledged` | A member acknowledged an incident this channel was told about. | Down |
| `incident.escalated` | An [escalation policy](https://hebeat.com/docs/knowledge-base/escalation-policies.md) step reaches this channel (named in the step, or as one of the monitor's channels) while nobody has acknowledged the incident. | Down |
| `incident.resolved` | An incident this channel was told about resolves, automatically or by a person. | Recovered |
| `maintenance.started` | A status page maintenance covering one of the channel's monitors starts. | Always |
| `maintenance.ended` | That maintenance ends. | Always |
| `test` | You clicked **Send test event**. | — |

Each channel receives `incident.opened` at most once per incident opening; `incident.updated`, `incident.reminder`, `incident.acknowledged` and `incident.resolved` only if it was told about that opening. Reminders stop as soon as someone acknowledges or resolves the incident, and incidents with only degraded monitors are never reminded. Events suppressed by a maintenance window are not sent.

`incident.*` payloads also carry `alerts` (the incident's alerts from this channel's monitors, at most 25, with `new` marking the ones this event is the first to report), `more_alerts`, and `links` with the incident page and the **acknowledge** link. The acknowledge link opens the app, where a signed-in member confirms; it carries no token, so forwarding it never acknowledges anything on its own.

## Request

```http theme={null}
POST /your/endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Hebeat-Webhooks/1.0 (+https://app.hebeat.com)
Hebeat-Signature: t=1763812800,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd
Hebeat-Event: monitor.down
Hebeat-Delivery: 5f0c6a8e-2b1d-4c3e-9f7a-1b2c3d4e5f60
```

| Header | Value |
| - | - |
| `Hebeat-Signature` | `t=<unix seconds>,v1=<hex HMAC-SHA256>`. See [Verify signatures](#verify-signatures). |
| `Hebeat-Event` | The event name. |
| `Hebeat-Delivery` | The delivery id, the same on every retry. Also the payload `id`. |

Plus your custom headers.

## Payload

```json theme={null}
{
  "api_version": "2026-11-22",
  "id": "5f0c6a8e-2b1d-4c3e-9f7a-1b2c3d4e5f60",
  "event": "monitor.down",
  "occurred_at": "2026-11-22T12:00:00.000Z",
  "workspace": { "id": "9d0c3a3e-8f0f-4f7e-8d5b-3c1f2a9e7b61", "name": "Acme" },
  "monitor": {
    "id": "1f9d5c8e-2b7a-4c3d-9e1f-6a5b4c3d2e1f",
    "name": "Checkout API",
    "type": "http",
    "target": "https://shop.example.com"
  },
  "incident": {
    "id": "2b8e1f4a-6c3d-4e5f-9a1b-7c8d9e0f1a2b",
    "number": 12,
    "title": "Checkout API",
    "status": "triggered",
    "severity": "critical",
    "started_at": "2026-11-22T12:00:00.000Z",
    "acknowledged_at": null,
    "resolved_at": null
  },
  "alert": {
    "id": "3c9f2a5b-7d4e-4f60-8b2c-8d9e0f1a2b3c",
    "status": "firing",
    "reason": null,
    "started_at": "2026-11-22T12:00:00.000Z",
    "resolved_at": null
  },
  "maintenance": null,
  "url": "https://app.hebeat.com/monitors/1f9d5c8e-2b7a-4c3d-9e1f-6a5b4c3d2e1f"
}
```

**api\_version** `string` *required*

The payload version, a date like the API's `Hebeat-Version` header. The current version is `2026-11-22`. A breaking change to the payload ships under a new date.

**id** `string (uuid)` *required*

The delivery id, identical across retries. Use it to deduplicate.

**event** `string` *required*

One of the [events](#events).

**occurred\_at** `string (date-time)` *required*

When the event happened, in UTC.

**workspace** `object` *required*

The workspace `id` and `name`.

**monitor** `object | null` *required*

The monitor the event is about: `id`, `name`, `type` (`http`, `tcp`, `dns` or `heartbeat`) and `target`. For HTTP monitors `target` is the URL without credentials, query or fragment; for TCP it is `host:port`, for DNS the domain name, and for heartbeats the schedule (never the ping URL).

**incident** `object | null` *required*

The workspace incident the event belongs to, which can group several monitors' alerts: `id`, `number`, `title`, `status` (`triggered`, `acknowledged` or `resolved`), `severity` (`critical`, `major` or `minor`), `started_at`, `acknowledged_at` and `resolved_at`.

**alert** `object | null` *required*

The monitor's alert: `id`, `status` (`firing` or `resolved`), `reason`, `started_at` and `resolved_at`. `reason` explains why a heartbeat went down (`missed`, `failed`, `exit_code:<n>` or `running_too_long`) and is `null` for probed monitors.

**maintenance** `object | null` *required*

For maintenance events: `id`, `title`, `starts_at` and `ends_at`.

**url** `string` *required*

A link to the related page in the app.

Payloads never contain request headers or bodies, check responses, secrets or subscriber data.

## Verify signatures

The signature is an HMAC-SHA256 of `<t>.<raw body>`, keyed with your signing secret (the whole `whsec_…` string), in hex. Compute it over the raw request body before parsing the JSON, compare in constant time, and reject timestamps older than 5 minutes.

```javascript Node.js theme={null}
import crypto from "node:crypto";

// rawBody: the request body exactly as received (a string), before JSON parsing.
export function verifyWebhook(rawBody, header, secret, toleranceSeconds = 300) {
  // header: the "Hebeat-Signature" request header, "t=<unix>,v1=<hex>"
  const parts = Object.fromEntries(header.split(",").map((part) => part.split("=")));
  const timestamp = Number(parts.t);
  if (!Number.isInteger(timestamp)) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false;
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const received = Buffer.from(parts.v1 ?? "", "hex");
  const wanted = Buffer.from(expected, "hex");
  return received.length === wanted.length && crypto.timingSafeEqual(received, wanted);
}
```

```python Python theme={null}
import hashlib
import hmac
import time


def verify_webhook(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
    # header: the "Hebeat-Signature" request header, "t=<unix>,v1=<hex>"
    parts = dict(part.split("=", 1) for part in header.split(","))
    try:
        timestamp = int(parts["t"])
    except (KeyError, ValueError):
        return False
    if abs(time.time() - timestamp) > tolerance:
        return False
    signed = f"{timestamp}.".encode() + raw_body
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))
```

**Rotate the secret** from the channel or with `POST /notification-channels/{channel_id}/rotate-secret`. The new secret takes effect immediately; there is no overlap window.

## Responses and retries

Answer with any `2xx` status quickly; the response body is ignored. Each request has a 10-second deadline.

| Your answer | What happens |
| - | - |
| `2xx` | Delivered. |
| `408`, `5xx`, a timeout, a network or DNS error | Retried with increasing delays, up to 5 attempts. |
| `429` | Retried, waiting for your `Retry-After` (up to 1 hour). |
| `410 Gone` | The channel is disabled and the workspace owner gets one email. Edit the channel or send a successful test to enable it again. |
| Any other `4xx` | Not retried. |
| `3xx` | Not retried: redirects are never followed. Use the final URL. |

> [!WARNING]
>
> Delivery is at least once. A timeout after your endpoint processed a request, or a lost answer, can send the same event again. Deduplicate on `Hebeat-Delivery` (the payload `id`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.