Skip to main content
All recipes

Webhook

WebhookHTTPHMAC-SHA256

Send incident alerts to your receiver. Verify the signature before processing the body, and handle test events separately.

This alert channel is included in Pro and Enterprise. Compare plans.

Set up delivery

  1. 1

    Add an alert channel

    Open Settings → Alerts, choose Add Channel → Webhook and enter your receiver URL.

  2. 2

    Set a signing secret

    Enter a secret and store the same value securely in your receiver. The signature header is only sent when a secret is configured.

  3. 3

    Choose severity and test

    Choose a minimum severity, save and use Test. Handle alert.test as a test and incident.detected as an incident alert. Both use a flat JSON body.

Verify the signature

Pass the raw body and X-Checkupstream-Signature header to this function. The signature is a bare hex digest, with no algorithm prefix. Reject missing or invalid signatures.

verify.ts
import crypto from "node:crypto";

export function verifySignature(
  body: string,
  signature: string,
  secret: string,
): boolean {
  // Check the format before decoding untrusted header values.
  if (!/^[0-9a-f]{64}$/i.test(signature)) return false;
  const expected = crypto.createHmac("sha256", secret).update(body).digest();
  return crypto.timingSafeEqual(Buffer.from(signature, "hex"), expected);
}

Configure the integration

Add the destination or credentials, then verify the connection.