Webhooks
Webhooks are for event-driven integrations that should not poll the API continuously.
Supported event types:
signal.created— A new scored signal was generatedexport.completed— An async export job finished successfullyexport.failed— An async export job failedsaved_query.completed— A saved query execution completedintelligence.refreshed— Match intelligence was refreshed
Subscription lifecycle
Section titled “Subscription lifecycle”- Create a webhook subscription with the target URL and event types.
- Store the returned secret once if the endpoint exposes it at creation time.
- Verify signatures on every request.
- Handle duplicate deliveries idempotently.
- Inspect delivery history when debugging.
Handler skeleton
Section titled “Handler skeleton”export async function handleFutPicksWebhook(req: Request) { const signature = req.headers.get('X-Webhook-Signature'); // sha256={hex} const deliveryId = req.headers.get('X-Webhook-Delivery-Id'); const eventType = req.headers.get('X-Webhook-Event-Type'); const timestamp = req.headers.get('X-Webhook-Timestamp'); const body = await req.text();
verifyHmacSha256(body, signature, secret);
const event = JSON.parse(body); await processEventIdempotently(deliveryId, eventType, event);}Webhook deliveries include these headers:
| Header | Description |
|---|---|
X-Webhook-Signature | HMAC-SHA256 signature with sha256= prefix |
X-Webhook-Delivery-Id | Unique delivery identifier |
X-Webhook-Event-Type | Event type (e.g. signal.created) |
X-Webhook-Timestamp | ISO 8601 delivery timestamp |
X-Webhook-Api-Version | API version string |