Webhooks and signatures
A webhook is an address of yours that the service calls when something happens: a job finishes, a monitor detects a change, a quota runs out. You register it with POST /v1/webhooks, or on the Webhooks page, choosing the event types it receives (* for all of them).
The request you receive
A delivery is a POST with a JSON body:
{"id": "evt_01J…", "type": "job.completed", "created_at": "2026-10-07T09:30:00Z", "data": {…}}
and these headers:
| Header | Content |
|---|---|
Vaicrawl-Signature | t=<timestamp>,v1=<signature>: see below. |
Vaicrawl-Event-Id | The identifier of the event; the same on every retry. |
Vaicrawl-Event-Type | The type of the event. |
Vaicrawl-Delivery-Id | The identifier of this delivery. |
User-Agent | VaicrawlWebhooks/1.0 (+https://vaicrawl.com/bot) |
Answer with any 2xx status within 10 seconds. Do the real work after answering: a slow endpoint is treated as a failed one. Redirects are followed, at most three.
The address must be public: an address that resolves to a private or local network is refused, when the webhook is created and again at every delivery.
Verifying the signature
Each webhook has a secret, which starts with whsec_ and is shown only once, when the webhook is created. The signature proves that a delivery comes from the service and has not been altered.
v1 is the HMAC-SHA256, in hexadecimal, of <timestamp>.<body> computed with the secret, where <timestamp> is the t of the header and <body> is the raw body of the request, byte for byte.
1. Read t and v1 from the Vaicrawl-Signature header. 2. Compute the HMAC-SHA256 of t, a dot and the raw body — before parsing the JSON — with your secret. 3. Compare it with v1 in constant time. 4. Refuse the delivery if t is more than five minutes away from your clock: whoever intercepted a delivery cannot replay it later.
In Python:
import hashlib, hmac, time
def is_authentic(secret: str, header: str, body: bytes) -> bool:
parts = dict(item.split('=', 1) for item in header.split(','))
timestamp = int(parts['t'])
if abs(time.time() - timestamp) > 300:
return False
signed = str(timestamp).encode('ascii') + b'.' + body
expected = hmac.new(secret.encode('utf-8'), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts['v1'])
The Python SDK does the same with vaicrawl_sdk.webhooks.verify_signature. If a new signature scheme is ever introduced it will be added next to v1 (v2=…), without removing v1.
Retries
A delivery that does not get a 2xx is retried with an increasing wait: after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. That is six attempts in a little less than fifteen hours.
When the last attempt fails:
- the webhook is marked as failing, and the account receives one email about it;
- a
delivery.failedevent is created.
Because of retries the same event can arrive more than once: use Vaicrawl-Event-Id (or id in the body) to recognise an event you have already handled.
Catching up
Every event is also kept by the service. GET /v1/events?since=<event id or ISO 8601 moment> returns the events after that point, oldest first, in the same shape as the body of a delivery: use it after an outage instead of waiting for retries. type= narrows it to one event type.
Event types
| Type | When |
|---|---|
job.started | A job has started downloading pages. |
job.progress | A job has made progress. At most once every 10 seconds per job. |
job.completed | A job has finished. |
job.failed | A job has stopped because of an error. |
job.cancelled | A job has been cancelled. |
capture.created | A new capture (a page, or a new version of its text) has been archived. |
change.detected | A monitor has detected a change. |
monitor.failing | A monitor has failed several times in a row. |
quota.warning | A quota of the plan is almost used up. |
quota.exceeded | A quota of the plan has been used up. |
connection.failing | A connection to a third-party service has failed several times in a row. |
notices.suspended | Sending your notices from the Vaicrawl domain (mode service) has been suspended: too many complaints or hard bounces in the last days. The payload has cause (complaints or bounces) and the counts of the window; never an address. The notices stay queued. |
credits.low | Your credit balance went below the threshold. The payload has balance and threshold. Sent once each time the balance goes below. |
credits.depleted | Your credit balance is used up: the usage beyond the quota stops. The payload has balance. |
credits.purchased | Credits have been added to your balance (a pack, an automatic recharge). The payload has transaction_id, kind, credits, balance and pack. |
promotion.granted | A promotion benefit has been granted to you (at sign-up, on first use, with a code, with a gift code or by the staff). The payload has source, origin and benefits (each with id, type and expires_at). |
promotion.expiring | A promotion benefit is about to end. Sent once per benefit. The payload has benefit_id, type, expires_at and remaining. |
delivery.failed | A webhook delivery has failed after all its retries. |
webhook.test | A test event, sent on request by POST /v1/webhooks/{id}/test to that webhook only. |
Types are added over time, never removed. A webhook subscribed to * also receives the types added later: ignore the types you do not know.
What a delivery never contains
Identifiers in data are the public ones (job_01J…). A delivery never carries secrets, and never data of another customer.
Limits
A customer can have at most 20 webhooks. The log of the deliveries of a webhook, with the status and the duration of each attempt, is GET /v1/webhooks/{id}/deliveries.