Skip to Content
OpenPerf

Respond

Webhooks

Receive errors, releases and alerts as signed HTTP requests on your own endpoint.

A webhook sends an HTTP POST request to your URL when something happens in the organization: an error appears, a release is created or an alert fires. Only the owner of the organization can see and manage webhooks.

Add an endpoint

  1. Open Settings → API.
  2. In the Webhooks section, click Add webhook.
  3. Enter the Endpoint URL. It must start with https://.
  4. Click Add webhook. The page of the new webhook opens.
API settings with the Webhooks section and the Add webhook button

A new webhook is enabled and gets every event type from all projects. If you see Webhooks are not configured on this server, webhooks are unavailable on your OpenPerf server.

Choose events

On the webhook page, the Events section has a switch for each event type. At least one switch stays on.

Webhook page with the endpoint URL, the signing secret, the event switches and recent deliveries
EventSent whendata fields
error.createdAn error appears for the first time.environments, group (id, type, message, culprit, level, status, firstSeenAt)
error.regressedA resolved error comes back.Same as error.created (group.status is regressed)
release.createdA release is added to the project for the first time.release (id, version, projectVersion, ref, url, releasedAt)
release.deployedA release is deployed to an environment.release, deploy (id, environment, name, url, startedAt, finishedAt)
alert.firingAn alert sends a notification other than a recovery.event (id, type), rule, environments, value, group
alert.resolvedA firing alert is back to normal.Same as alert.firing (event.type is resolved)
webhook.testYou click Send test (always delivered).webhookId (project is null)

On the same page you can edit the Endpoint URL, pause the webhook with Disable and remove it with Delete webhook under Danger zone.

Delivery format

Each event is one POST request with a JSON body:

{
  "id": "01JD3K8Q7V5M2X9C4T6B8N0RWE",
  "type": "error.created",
  "createdAt": "2026-11-20T09:14:03.512Z",
  "organization": { "id": "b9Xk2mQ7Lw4Rt8Zy1Nc5Vd3Hs6Fj0PaG", "slug": "acme" },
  "project": {
    "id": "01JC8Y5T2H9W4E6R1A3S7D0FGK",
    "name": "Storefront",
    "slug": "storefront-7q2m4k"
  },
  "data": {
    "environments": ["production"],
    "group": {
      "id": "01JD3K8Q6N1P4Z8X2V5C7B9MHT",
      "type": "TypeError",
      "message": "Cannot read properties of undefined (reading 'total')",
      "culprit": "renderCart (src/cart/Cart.tsx)",
      "level": "error",
      "status": "unresolved",
      "firstSeenAt": "2026-11-20T09:14:01.870Z"
    }
  }
}
HeaderValue
content-typeapplication/json
user-agentOpenPerf-Webhooks/1
webhook-idThe event ID, equal to id in the body. It stays the same when a delivery is retried.
webhook-timestampThe time of this attempt as Unix seconds.
webhook-signaturev1, followed by the signature in base64.

Respond with a 2xx status within 10 seconds. Any other status, a timeout or a connection error counts as a failed attempt. Redirects are not followed.

Verify the signature

Each webhook has its own Signing secret, shown on the webhook page. It starts with whsec_. The format follows the Standard Webhooks specification:

  1. Take the part of the secret after whsec_ and decode it from base64. This is the key.
  2. Join the webhook-id header, the webhook-timestamp header and the raw request body with dots.
  3. Compute HMAC-SHA256 of that string with the key and encode it in base64.
  4. Compare the result with the part of webhook-signature after v1,.
verify-webhook.ts
import { createHmac, timingSafeEqual } from "node:crypto";

const TOLERANCE_SECONDS = 300;

export const verifyWebhook = (body: string, headers: Headers, secret: string) => {
  const id = headers.get("webhook-id");
  const timestamp = headers.get("webhook-timestamp");
  const signature = headers.get("webhook-signature");

  if (!id || !timestamp || !signature) {
    return false;
  }

  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > TOLERANCE_SECONDS) {
    return false;
  }

  const expected = createHmac("sha256", Buffer.from(secret.replace(/^whsec_/, ""), "base64"))
    .update(`${id}.${timestamp}.${body}`)
    .digest();
  const received = Buffer.from(signature.replace(/^v1,/, ""), "base64");

  return received.length === expected.length && timingSafeEqual(received, expected);
};

Pass the body exactly as it arrived, before any JSON parsing:

handler.ts
import { verifyWebhook } from "./verify-webhook";

export const handleWebhook = async (request: Request) => {
  const body = await request.text();

  if (!verifyWebhook(body, request.headers, process.env.OPENPERF_WEBHOOK_SECRET ?? "")) {
    return new Response("Invalid signature", { status: 401 });
  }

  const event = JSON.parse(body);
  console.log(event.type, event.id);

  return new Response(null, { status: 204 });
};

The timestamp check rejects requests replayed later. The example allows five minutes of clock difference.

Retries and automatic disabling

A failed delivery is retried, up to 8 attempts in total. The wait before the first retry is 30 to 60 seconds and doubles after each attempt, up to one hour. Every attempt has a new webhook-timestamp and signature and the same webhook-id, so use webhook-id to skip events you have already handled.

After 10 deliveries in a row fail, OpenPerf disables the webhook. The list shows Disabled after repeated failed deliveries. Fix the endpoint and click Enable on the webhook page.

A disabled webhook gets no events. Events that happen while it is disabled are not sent later.

Check deliveries

The Recent deliveries section lists every delivery with its event type, the HTTP status or No response, the number of attempts and a status: Sent, Failed or Pending. Click a delivery to see the error, the first 2,048 characters of the response and the payload. Deliveries are kept for 30 days.

Send test sends a webhook.test event to the endpoint, also when the webhook is disabled. You can send up to 5 tests per minute.

Limits

  • A webhook gets events from all projects of the organization, except demo projects. There is no filter by project.
  • The host of the URL must resolve to a public address. A delivery to a private address fails without retries.
  • The signing secret cannot be changed. To get a new one, delete the webhook and add it again.
  • A failed delivery cannot be sent again by hand.

On this page