Monitoring is asynchronous — new breach records are found when new intelligence arrives, not when you ask. Webhooks deliver events to you: PureWL sends an HTTP request to an endpoint you own when an event occurs.

Set up webhooks

Webhooks are configured by PureWL, not through the API:
  1. Send PureWL your webhook URL: the HTTPS endpoint where you want events delivered.
  2. PureWL configures the event subscription on that URL.
  3. PureWL shares the signing secret for that URL. Use it to verify every request.
Each webhook URL has its own signing secret. All event types configured on the same URL, including Dark Web Monitoring and Data Broker Opt-Out events, share that URL’s secret. Store the secret on your server, like your Secret Key, and never expose it in client-side code.

Events

dwm.breach.detected

Sent by the daily freshness check (02:00 UTC) when one or more of your monitored users’ assets has new breach records since the previous check. No new breaches means no event that day. The payload’s event field is breach.detected. One delivery covers every affected user; asset values are partially masked.

Payload

string
Event type: breach.detected.
string
When the check ran (ISO 8601, UTC).
number
Page of this delivery, starting at 1.
number
Total pages in this delivery.
number
Number of users with new breach records.
object[]
Users with new breach records.

Sample payload

dwm.breach.detected
To see the new records themselves, run a Dark Web Scan for the asset.

Verify webhook signatures

Every webhook request is signed, so your endpoint can confirm it came from PureWL and was not altered. Accept a request only when its signature is valid. Reject any request with a missing or invalid signature. To verify a request:
  1. Compute the HMAC-SHA256 digest of the raw request body, using the signing secret as the key.
  2. Hex-encode the digest.
  3. Compare it with the value after v0= in the x-outpost-signature header.
  4. Use a constant-time comparison, to prevent timing attacks.
  5. Accept the request only if the two values match.
Compute the signature over the body exactly as received. If your framework parses the JSON first and you re-serialize it, the bytes can change and valid requests will fail verification.

Handling events

  • Accept HTTPS only, use an unguessable endpoint path, and verify the signature of every request.
  • Respond immediately, then process asynchronously, so slow handling is not mistaken for a failed delivery.
  • Expect duplicates and out-of-order delivery, and skip event types you do not recognize rather than erroring.
  • Read every page — when totalPages is greater than 1, the event arrives in several deliveries.