Webhooks give you a push-based integration with NZOChain’s threat detection system. Instead of polling the API repeatedly to check whether a wallet’s risk level has changed, you register an HTTPS endpoint and NZOChain delivers a POST request to it the moment a threat event occurs. This is the fastest way to react to new threats — your application receives alerts in real time, with no polling overhead.Documentation Index
Fetch the complete documentation index at: https://docs.nzochain.com/llms.txt
Use this file to discover all available pages before exploring further.
Subscribe to events
Send a POST request to the subscribe endpoint to register your webhook URL and choose which events you want to receive.Endpoint
Request body
Your HTTPS endpoint that will receive webhook event payloads. Must be a publicly accessible URL with a valid TLS certificate.
The event types to subscribe to. See the event types table below for available values.
Scope this subscription to a single wallet address. When omitted, you receive events for all wallets NZOChain is monitoring on your account.
Example request
Event types
| Event | Trigger |
|---|---|
risk.score.changed | RiskScore increased or decreased significantly |
threat.detected | New malicious contract or approval detected |
approval.infinite | Infinite token approval detected |
phishing.attempt | Phishing domain or fake dApp detected |
status.critical | Wallet status escalated to CRITICAL |
Webhook payload
NZOChain sends a JSON POST request to your endpoint when an event fires. The payload includes the event type, the affected wallet, a timestamp, and adata object with event-specific details.
Example payload — threat.detected
Example payload — risk.score.changed
Verifying webhook authenticity
Each webhook request includes anX-NZOChain-Signature header. You should verify this header before processing the payload to confirm the request genuinely came from NZOChain and has not been tampered with.
The signature is an HMAC-SHA256 hash of the raw request body, signed with your webhook secret. You can find your webhook secret in the NZOChain dashboard under Settings → Webhooks.
Handling delivery and retries
When NZOChain sends a webhook event to your endpoint, your server must respond with an HTTP200 OK status within 5 seconds to acknowledge receipt. If your endpoint does not respond in time, or responds with a non-2xx status, NZOChain will retry the delivery with exponential backoff.
Respond with
200 OK as quickly as possible — ideally before you process the event. If your processing logic is slow, acknowledge receipt immediately and handle the event asynchronously in a background queue. NZOChain marks a delivery as failed after 5 seconds and will retry, which can result in duplicate deliveries if your processing is slow.