What Are Webhooks?
Webhooks let you receive real-time HTTP notifications when events occur in your FoxReach account. Instead of polling the API for changes, you register a URL and we’ll send a POST request to it whenever something happens.How It Works
1
Register a webhook
Use the API to create a webhook with your endpoint URL and the events you want to subscribe to.
2
Receive events
When a subscribed event occurs, we send a POST request to your URL with the event payload.
3
Verify and process
Verify the webhook signature to confirm it came from FoxReach, then process the event.
Creating a Webhook
Webhook Payload
When an event occurs, we send a POST request with a JSON body:X-Webhook-Signature (HMAC-SHA256 of the body), X-Event-Type, and X-Event-Id headers.
Retry Policy
If your endpoint returns a non-2xx status code, we’ll retry the delivery with exponential backoff. Each event is attempted up to 3 times in total (the initial attempt plus 2 retries):
If all 3 attempts fail, the delivery is marked failed and the webhook’s
consecutiveFailures counter increments — you can monitor this via the API. After 10 consecutive failed deliveries, the webhook is automatically disabled (isActive: false).
Best Practices
- Respond quickly — return a
200status code within 5 seconds. Process the event asynchronously if needed. - Handle duplicates — webhook deliveries can occasionally be duplicated. Use idempotent processing.
- Verify signatures — always verify the HMAC-SHA256 signature to ensure the webhook came from FoxReach. See Signature Verification.
- Use HTTPS — always use HTTPS endpoints for your webhook URLs.