Set up webhooks
Webhooks are configured by PureWL, not through the API:- Send PureWL your webhook URL: the HTTPS endpoint where you want events delivered.
- PureWL configures the event subscription on that URL.
- 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’sevent 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
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:
- Compute the HMAC-SHA256 digest of the raw request body, using the signing secret as the key.
- Hex-encode the digest.
- Compare it with the value after
v0=in thex-outpost-signatureheader. - Use a constant-time comparison, to prevent timing attacks.
- Accept the request only if the two values match.
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
totalPagesis greater than1, the event arrives in several deliveries.