Configure your endpoint
You can set webhook URLs at two levels:- Per-customer default — set in the dashboard under Manage → Webhooks. Applies to every report unless overridden.
- Per-request override — pass
webhook_urlin the request body ofPOST /v1/analyzeorPOST /v1/batch. Useful for routing different report types to different services.
Events
Headers
Every delivery includes these:Payload examples
report.completed
Mirrors the GET /v1/reports/{id} response when status is completed —
same fields, same shape:
report.failed
batch.completed
Signature verification
TheX-AcreLens-Signature header has the form:
- Pull
tandv1out of the header. - Reject if
tis more than 5 minutes old (replay protection). - Compute
HMAC-SHA256(secret, "{t}.{raw_request_body}")and compare tov1using a constant-time comparison.
Node.js
Python
Webhook secret
Your webhook secret lives in the dashboard under Manage → Webhooks. It’s:- Per-customer (one secret used for all your webhook deliveries)
- Rotatable (creates a new secret; old one immediately stops working)
- Treated as sensitive — store it like an API key, in env vars or a secret manager
Retry schedule
If your endpoint returns a non-2xx status, doesn’t respond within 30 seconds, or has a network error, AcreLens retries up to 7 times total (the initial attempt plus 6 retries):
Retried on: 5xx, 408, 429, network errors, timeouts.
Not retried on: 2xx, 3xx, all other 4xx (including 410 Gone, which signals “stop trying”).
After all retries are exhausted, the delivery is marked failed and visible in the dashboard. There’s no automatic resurrection — you’d need to refetch the report manually if you want the data.
Idempotency in your handler
AcreLens may deliver the same event more than once if your endpoint is slow to respond. Use theX-AcreLens-Delivery header (unique per delivery attempt) to dedupe — but better, key off report_id since that’s stable across retries:
Local development
Usengrok, cloudflared, or tailscale funnel to expose your local server. Drop the public URL into your dashboard’s webhook config — there’s no separate sandbox environment to wire up.
Failures don’t affect quota
Webhook delivery failures don’t consume API quota or cost you anything beyond the original report charge. Reports are still available viaGET /v1/reports/{id} if your webhook endpoint never receives them.