The end-to-end pattern
Creating the webhook
Do this once, ahead of time. Webhooks persist until you delete them.Kicking off a job
Receiving the webhook
What to do in handleJobComplete
Don’t do slow work inside the webhook handler. Reader retries if you don’t respond within 10 seconds. Instead, enqueue the slow work and return 200 immediately.
GET /v1/jobs/{id} (paginated, so don’t miss pages beyond the first one) and does whatever your pipeline needs: index into a vector store, run LLM extraction, persist to a database.
Idempotency is non-negotiable
Reader may deliver the same event twice. If your endpoint times out but Reader eventually succeeds, it will retry, and the original delivery might still have been received. Always dedupe byX-Reader-Delivery, which is a unique UUID per delivery attempt.
Next
- Verifying webhooks: verification code for Express, FastAPI, Next.js
- Webhook retries: what to do when deliveries fail on your side
- Reliable batch scraping: webhook + retry + idempotency end to end

