Signed webhooks
The webhook channel sends a JSON POST to your own HTTPS endpoint whenever something happens to a monitor or
an agent. Use it to feed your own tools, chat bots or any alerting system that accepts HTTP. Webhooks are a plan feature: Pro and
Enterprise.
Channel settings
Section titled “Channel settings”| Setting | Rule |
|---|---|
| URL | Required. https only, no credentials, public addresses only. Redirects are not followed. See Channels and delivery. |
| Secret | Optional, up to 200 characters. When set, every request is signed. The secret is stored encrypted and never shown again. |
Every request has the headers Content-Type: application/json and User-Agent: CronBeat. Only a 2xx answer counts
as delivered, anything else is retried, see Channels and delivery.
Events
Section titled “Events”| Event | Sent when |
|---|---|
monitor.down |
A monitor went down (an incident opened). |
monitor.recovered |
The monitor recovered (the incident closed). |
monitor.reminder |
A reminder for an incident that is still open. |
monitor.deadline_risk |
A running job is expected to end after its delivery time, see Delivery time warning. No incident. |
monitor.escalated |
Nobody acknowledged the incident in time, see Escalation. Sent only to the escalation channels. |
monitor.slow |
A run was much slower than usual, see Slow run alerts. |
monitor.cert_expiring |
The TLS certificate of an HTTP check is about to expire, see Certificate warning. No incident. |
agent.lost |
A Kubernetes agent stopped reporting. Host agents never produce agent.* events. |
agent.escalated |
An agent.lost incident was not acknowledged in time. |
agent.recovered |
The agent reports again. |
Payload
Section titled “Payload”Incident events (monitor.down, monitor.recovered, monitor.reminder, monitor.escalated, agent.lost, agent.recovered, agent.escalated):
{ "event": "monitor.down", "monitor": {"id": "6f1c0a52-...", "name": "Nightly backup", "url": "https://cronbeat.dev/monitors/6f1c0a52-..."}, "incident": {"id": "b2d4e8c1-...", "reason": "missed", "detail": null, "openedAt": "2026-10-03T02:05:00Z"}, "lastSuccessAt": "2026-10-02T02:00:04Z", "expectedAt": "2026-10-03T02:00:00Z"}incident.reasonis one ofmissed,failed,too_long,agent_lost.- For
agent.*events the object is namedagentinstead ofmonitor,nameis the cluster name andurlpoints to the agents page. incident.idis the same for the down, reminder, escalated and recovered events of one incident.- Fields without a value (such as
detail) can benullor missing. Treat both the same.
Slow run event (monitor.slow), delivery time event (monitor.deadline_risk) and certificate event (monitor.cert_expiring) have no incident:
{ "event": "monitor.slow", "monitor": {"id": "6f1c0a52-...", "name": "Nightly backup", "url": "https://cronbeat.dev/monitors/6f1c0a52-..."}, "reason": "slow_run", "detail": "took 7m 12s, usually 2m 3s", "occurredAt": "2026-10-03T02:11:00Z"}The certificate event has "reason": "cert_expiring" and a detail such as
The certificate of example.com expires on 2026-10-17 UTC (7 days left). Its occurredAt is not set, so treat it as
missing. It is sent once per warning level (for example at 14, 7, 3 and 1 days).
The Send test message button sends a monitor.down event for a monitor named Test message from CronBeat.
Write your receiver to ignore unknown fields, new ones may be added.
Delivery is at least once. Deduplicate with incident.id together with event (and occurredAt for
monitor.slow).
Signature
Section titled “Signature”If you configured a secret on the channel, each request has this header:
X-CronBeat-Signature: <64 hex characters>- The value is the HMAC-SHA256 of the raw request body, using the channel secret (as UTF-8 bytes) as the key,
written as lowercase hex. There is no prefix such as
sha256=. - Without a secret the header is not sent.
- Compute the HMAC over the exact bytes you received, before parsing JSON. Re-serialising the JSON can change the bytes and break the check.
- Compare in constant time.
- The signature covers the body only; it carries no timestamp. If replays matter, deduplicate as described above.
Verification examples
Section titled “Verification examples”Node.js
Section titled “Node.js”import crypto from 'node:crypto';import express from 'express';
const SECRET = process.env.CRONBEAT_WEBHOOK_SECRET;const app = express();
// Keep the raw bytes: the signature is computed over them.app.post('/cronbeat', express.raw({ type: 'application/json' }), (req, res) => { const received = req.get('X-CronBeat-Signature') ?? ''; const expected = crypto.createHmac('sha256', SECRET).update(req.body).digest('hex');
const a = Buffer.from(received); const b = Buffer.from(expected); if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) { return res.sendStatus(401); }
const event = JSON.parse(req.body.toString('utf8')); console.log(event.event, event.monitor?.name ?? event.agent?.name); res.sendStatus(200);});
app.listen(3000);Python
Section titled “Python”import hashlibimport hmacimport jsonimport os
from flask import Flask, abort, request
SECRET = os.environ["CRONBEAT_WEBHOOK_SECRET"].encode()app = Flask(__name__)
@app.post("/cronbeat")def cronbeat(): body = request.get_data() # raw bytes received = request.headers.get("X-CronBeat-Signature", "") expected = hmac.new(SECRET, body, hashlib.sha256).hexdigest() if not hmac.compare_digest(received, expected): abort(401)
event = json.loads(body) print(event["event"]) return "", 200package main
import ( "crypto/hmac" "crypto/sha256" "encoding/hex" "io" "net/http" "os")
func handler(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(http.MaxBytesReader(w, r.Body, 1<<20)) if err != nil { http.Error(w, "bad request", http.StatusBadRequest) return }
mac := hmac.New(sha256.New, []byte(os.Getenv("CRONBEAT_WEBHOOK_SECRET"))) mac.Write(body) expected := hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(r.Header.Get("X-CronBeat-Signature")), []byte(expected)) { http.Error(w, "invalid signature", http.StatusUnauthorized) return }
// parse body as JSON here w.WriteHeader(http.StatusOK)}
func main() { http.HandleFunc("/cronbeat", handler) _ = http.ListenAndServe(":3000", nil)}You can test the receiver with the Send test message button of the channel.

