Skip to main content
WEBHOOK

When it is sent

One event per page that, in a check:
  • changed since the previous check,
  • is new — a page that appeared since the monitor’s first check,
  • was removed — it answers 404 or 410, or a complete crawl no longer finds it,
  • or started failing. A page that stays down sends one event, not one per check.
Two things are never sent: the first check’s baseline, where every page is new by definition, and changes the judge ruled not meaningful. Both are still recorded on the check. data is the same page object GET /monitor/{id}/checks/{checkId} returns — status, diff, judgment and, in json mode, the current extraction.

Responding

Answer with any 2xx within 10 seconds. Anything else — a timeout, a 4xx or 5xx, a redirect — is retried after 1, 5 and 15 minutes, then marked failed. Do slow work after you respond. Retries carry the same id, also sent as X-Prefetch-Delivery. Store the ids you have processed and skip repeats.

Verify the signature

Every request carries an X-Prefetch-Signature header:
v1 is the hex HMAC-SHA256 of <t>.<raw request body>, keyed with the monitor’s webhook.secret. The timestamp is signed too, so a captured request cannot be replayed with a fresh header — reject anything older than five minutes. Verify against the raw body, before any JSON parsing: re-serialising changes the bytes and breaks the signature.
The secret is in the monitor’s webhook.secret. To change it, update the monitor with "rotate_secret": true — see PATCH /monitor/{id}.

Headers

Any headers you set on the monitor’s webhook are sent as well.

monitor.check.completed

One event per check, with its counts.

POST /monitor

Configure the webhook and the goal.

Authorizations

X-API-Key
string
header
required

Your Prefetch API key. Obtain one from the dashboard.

Headers

X-Prefetch-Event
string
required

The event type.

X-Prefetch-Delivery
string
required

The delivery id — the same as id in the body, and stable across retries.

X-Prefetch-Signature
string
required

t=<unix seconds>,v1=<hex>, where hex is HMAC-SHA256 of "<t>.<raw body>" keyed with the monitor's webhook.secret.

Example:

"t=1760248862,v1=5f2b8c..."

Body

application/json
success
boolean
id
string

Delivery id, also sent as X-Prefetch-Delivery. Stable across retries — use it to de-duplicate.

Example:

"whd_5c1e9a2b7d3f4e6a8b0c2d4e6f8a1b3c"

created_at
string<date-time>
monitor_id
string
monitor_name
string
check_id
string
metadata
object

The metadata you set on the webhook.

type
enum<string>
Available options:
monitor.page
data
object

Response

200

Answer any 2xx within 10 seconds. Anything else, or no answer, is retried after 1, 5 and 15 minutes.