Webhooks

Webhook delivery, typical uses and what to watch out for when configuring them.

turbometrics can send an HTTP POST to a URL of your choice when an alert occurs. This works with Slack, Teams, Discord, Zapier, Make and every other tool that supports incoming webhooks.

Setting up Slack

  1. In Slack: Apps → “Incoming WebHooks” → “Add to Slack”
  2. Choose a channel → copy the webhook URL
  3. Enter the URL under Account → Notifications → Alert webhook in the “Webhook URL” field

Setting up Teams

  1. In Teams: channel → “...” → Connectors → “Incoming Webhook”
  2. Give it a name → copy the URL
  3. Enter the URL under Account → Notifications → Alert webhook in the “Webhook URL” field

Available events

Event When
alert.critical A scan alert with severity critical is triggered
alert.warning A scan alert with severity warning is triggered
alert.resolved A scan alert is resolved
scan.completed A scan has completed successfully
rum.alert.triggered A live data alert is triggered (p75 exceeds the threshold)
rum.alert.resolved A live data alert resolves (p75 falls below the threshold)
change.attributed A decline in the measurements of a domain can be linked to a change (diagnosis)
change.recovered The measurements behind a reported diagnosis have recovered

You can switch each event on or off individually under Account → Notifications in the “Webhook events” section. “Alert triggered” controls alert.critical and alert.warning together, “Alert resolved” controls alert.resolved. The “Send webhook test” button sends a sample message for every active event, with the same structure as a real alert; for “Alert triggered” it arrives as alert.critical.

Payload structure

alert.critical / alert.warning / alert.resolved

turbometrics sends a JSON object for every scan alert:

{
  "event": "alert.critical",
  "alert_id": 42,
  "type": "score_drop",
  "severity": "critical",
  "title": "Score dropped sharply",
  "message": "The overall score dropped by 24 points to 54.",
  "code": "score_drop",
  "params": { "points": 24, "score": 54 },
  "locale": "en",
  "target_url": "https://example.com/",
  "host": "example.com",
  "region": "de-fsn1",
  "scan_public_id": "01KN...",
  "created_at": "2026-04-01T10:00:00+00:00"
}

title and message are ready-made texts in the language of the account (locale). For your own processing, use code (the same value as type) and params: these are the raw values the text is built from.

For alert.resolved, the payload has the same fields, event is alert.resolved, and "resolved_at" is added.

Live data alerts do not use this structure; they send the rum.alert.triggered and rum.alert.resolved payloads below. There, p75 and threshold are raw numbers (milliseconds, or a decimal for CLS); format them yourself if needed.

scan.completed

{
  "event": "scan.completed",
  "url": "https://example.com/",
  "score": 74,
  "score_speed": 29,
  "score_images": 73,
  "score_caching": 96,
  "score_tech": 90,
  "lcp_ms": 2800,
  "ttfb_ms": 141,
  "cls": 0.001,
  "tbt_ms": 1635,
  "scan_url": "https://turbometrics.io/scan/01KN...",
  "scanned_at": "2026-04-03T20:45:00+00:00"
}

Typical use case: forwarding scan results automatically into Google Sheets, Slack or Notion.

rum.alert.triggered / rum.alert.resolved

For live data (RUM) alerts, the following JSON object is sent:

{
  "event": "rum.alert.triggered",
  "alert_name": "LCP zu hoch",
  "domain": "example.com",
  "metric": "LCP",
  "p75": 3200.0,
  "threshold": 2500.0,
  "unit": "ms",
  "samples": 48,
  "window_minutes": 60,
  "triggered_at": "2026-04-05T10:00:00+00:00",
  "rum_dashboard_url": "https://turbometrics.io/rum/1"
}

For rum.alert.resolved, the payload contains "resolved_at" instead of "triggered_at". "window_minutes" is the evaluation window of the rule; for auto alerts it depends on page views and is 60, 360 or 1440.

change.attributed / change.recovered

When turbometrics links a decline in the measurements of a domain to a change (for example a plugin update), it sends a diagnosis:

{
  "event": "change.attributed",
  "host": "example.com",
  "started_at": "2026-11-13T12:00:00+00:00",
  "confidence": "medium",
  "sentence": "Main content mobile 1.20 s → 2.80 s (+133 %). Possibly related: Elementor updated (3.24.0 → 3.25.1).",
  "metrics": [
    { "metric": "lcp", "device": "mobile", "basis": "scans", "before": 1200.0, "after": 2800.0, "change_pct": 1.3333, "label": "Main content mobile 1.20 s → 2.80 s (+133 %)" },
    { "metric": "score", "device": "mobile", "basis": "scans", "before": 82.0, "after": 64.0, "change_pct": -0.2195, "label": "Score mobile 82 → 64 (−22 %)" }
  ],
  "suspects": [
    { "change_id": 123, "kind": "plugin_updated", "component": "elementor", "from": "3.24.0", "to": "3.25.1", "occurred_at": "2026-11-13T07:00:00+00:00", "title": "Elementor updated (3.24.0 → 3.25.1)" }
  ],
  "url": "https://turbometrics.io/my-domains/example.com"
}

confidence is high (likely cause) or medium (possibly related). sentence and label are ready-made texts in the language of the account; for your own processing, use metrics and suspects. basis is scans or rum (live data). A diagnosis is a correlation, not proof.

change.recovered has the same fields, event is change.recovered, and "recovered_at" is added. It is only sent for diagnoses that were previously sent as change.attributed.

The payloads of alert.* and rum.alert.* also contain a diagnosis field: null, or {sentence, confidence, attribution_id} when the alert matches such a diagnosis.

Webhook authentication

So that your endpoint can check whether an incoming request really comes from turbometrics, you can store an authentication header under Account → Notifications.

turbometrics adds this header automatically to every outgoing webhook request – for all events (alerts, recovery, scan completed).

Configuration:

Field Description
Header name Name of the HTTP header, e.g. X-Webhook-Secret or Authorization
Header value The value your endpoint expects

Example – the request that is sent:

POST https://hooks.your-domain.com/alert
Content-Type: application/json
X-Webhook-Secret: your-secret-token

{ "event": "alert.critical", ... }

Checking it on the receiving end (PHP example):

$secret = $_SERVER['HTTP_X_WEBHOOK_SECRET'] ?? '';
if (!hash_equals('your-secret-token', $secret)) {
    http_response_code(401);
    exit;
}

The header value is stored encrypted and leaves turbometrics only as an HTTP header sent to the webhook URL you configured.

Note: Leave the header name blank → the auth header is removed. Leave the value field blank → the existing value is kept unchanged.

Retry behaviour

If a webhook delivery fails (no 2xx status code, or a timeout), turbometrics repeats the delivery automatically. Failed deliveries are logged and can be viewed under Alerts → History. After several unsuccessful attempts, turbometrics gives up on the delivery.

When they are sent

  • Scan alerts (alert.critical / alert.warning / alert.resolved): webhooks go out within about 5 minutes after the alert was triggered or resolved.
  • Live data alerts (rum.alert.triggered / rum.alert.resolved): webhooks are sent when the check detects that a threshold has been exceeded. The check runs every 5 minutes.
  • Diagnosis (change.attributed / change.recovered): checked once an hour. change.attributed is only sent for a new diagnosis with high or medium confidence, at most once per domain and day, and only for domains whose alerts have webhooks switched on. It is not sent when a scan or live data alert for the same metric (for example LCP) has fired for the domain since 48 hours before the decline began; in that case the diagnosis is shown in the app and via the API. Alerts without a metric, such as a failed scan or an HTTP status, do not count. change.recovered follows when all measurements of a reported diagnosis have recovered. Both events are switched off for every account; switch them on under Account → Notifications.
  • Scan completed (scan.completed): the webhook is sent shortly after scan processing has finished (usually within a minute).

Availability

Webhooks are available from the Pro plan onward.

Further reading