Skip to main content
Two things can call your server: a crawl as it runs, and a monitor when something changed. Both send a POST with a JSON body to a public https URL you give them.

Crawl webhooks

Set webhookUrl when you start a crawl:
Crawl webhooks are sent once, with a 5-second timeout and no retries, and aren’t signed. Treat them as a signal: confirm the result with GET /crawl/{jobId} before you rely on it.

Monitor webhooks

Add a webhook to a monitor’s notify:
Each check that alerts sends one POST with the header X-Spidra-Event: monitor.check.completed. This is the body Send a Test Notification sends:
In a real alert, monitor and check carry your monitor’s and check’s IDs and check.url opens the check in the dashboard. added, changed, removed and pages are described in Get a Monitor Check.

Verify the signature

Monitor webhooks are signed. X-Spidra-Signature is sha256= followed by the HMAC-SHA256 of the raw body, keyed with the monitor’s secret. If you don’t set a secret, Spidra creates one; read it from Get a Monitor under notify.webhook.secret.
Compute it over the raw request body, before parsing the JSON. Re-serialising changes the bytes and the signature won’t match.

Your endpoint

  • Use https on a public address. Private and internal addresses are refused when you save the URL.
  • Answer with any 2xx quickly and do slow work afterwards.
  • Monitor webhooks are retried once, 2 seconds later, if your server answers 429, a 5xx or can’t be reached. Crawl webhooks aren’t retried.
  • Expect the occasional duplicate, and use jobId or check.id to de-duplicate.