Webhooks
A webhook is a URL on your server that ZilloData calls when one of your background jobs finishes. Each call is signed, so you can confirm it came from us before acting on it.
Setting one up
Register an https:// URL either in the dashboard under
Webhooks or with the API:
curl https://api.zillodata.com/v1/webhooks \ -H "Authorization: Bearer $ZILLODATA_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://hooks.example.com/zillodata", "events": ["job.succeeded", "job.failed"], "description": "Listing sync worker" }'Leave out events to receive all four. The response includes a secret
that starts with whsec_. It is shown only once, so store it with your other
secrets right away. You’ll need it to check signatures.
Webhooks apply to your whole account. Every active webhook that subscribes to an event receives it, whichever key started the job.
Events
| Event | Sent when |
|---|---|
job.succeeded |
The job finished and its results are ready |
job.failed |
The job stopped because of an error |
job.timed_out |
The job ran past its time limit |
job.aborted |
The job was stopped before finishing |
What we send
The body is JSON describing the job. It does not include the result rows.
{ "event": "job.succeeded", "delivered_at": "2026-11-03T15:42:08.117Z", "data": { "job": { "id": "3f6c1b2e-8d4a-4e7b-9a10-5c2d7e8f9b01", "type": "chained_search_detail", "status": "succeeded", "result_count": 142, "created_at": "2026-11-03T15:31:50.402Z", "started_at": "2026-11-03T15:31:51.008Z", "completed_at": "2026-11-03T15:42:07.861Z" } }}Fetch the rows afterwards with GET /v1/jobs/{id}/results.
These headers come with every request:
POST /zillodata HTTP/1.1Content-Type: application/jsonUser-Agent: zillodata/1.0x-zd-event: job.succeededx-zd-signature: t=1793720528,v1=3b8f0c...e41aChecking the signature
x-zd-signature has two parts:
tis the Unix time, in seconds, when we signed the request.v1is a lowercase hex HMAC-SHA256 digest. The key is your full webhook secret, including thewhsec_prefix. The message is the value oft, a period, and the raw request body:<t>.<body>.
To verify, rebuild that message from the bytes you received, compute the
digest, and compare it to v1 in constant time. Reject the request if the
timestamp is more than about five minutes away from your clock.
import { createHmac, timingSafeEqual } from "node:crypto";
export function isValidSignature(secret, header, rawBody) { const match = /^t=(\d+),v1=([0-9a-f]+)$/.exec(header ?? ""); if (!match) return false; const [, t, received] = match;
const ageSeconds = Math.abs(Date.now() / 1000 - Number(t)); if (ageSeconds > 300) return false;
const expected = createHmac("sha256", secret) .update(`${t}.${rawBody}`) .digest("hex");
const a = Buffer.from(received, "utf8"); const b = Buffer.from(expected, "utf8"); return a.length === b.length && timingSafeEqual(a, b);}import hashlibimport hmacimport reimport time
def is_valid_signature(secret: str, header: str, raw_body: bytes) -> bool: match = re.fullmatch(r"t=(\d+),v1=([0-9a-f]+)", header or "") if not match: return False t, received = match.groups()
if abs(time.time() - int(t)) > 300: return False
message = t.encode() + b"." + raw_body expected = hmac.new(secret.encode(), message, hashlib.sha256).hexdigest() return hmac.compare_digest(received, expected)func isValidSignature(secret, header string, rawBody []byte) bool { var t, received string for _, part := range strings.Split(header, ",") { if v, ok := strings.CutPrefix(part, "t="); ok { t = v } else if v, ok := strings.CutPrefix(part, "v1="); ok { received = v } } ts, err := strconv.ParseInt(t, 10, 64) if err != nil || received == "" { return false } if age := time.Now().Unix() - ts; age > 300 || age < -300 { return false }
mac := hmac.New(sha256.New, []byte(secret)) mac.Write([]byte(t + ".")) mac.Write(rawBody) expected := hex.EncodeToString(mac.Sum(nil)) return hmac.Equal([]byte(received), []byte(expected))}Complete server examples for Express, FastAPI, and Go are in the verification recipe.
Delivery and retries
- A delivery succeeds when your endpoint answers with any
2xxstatus. - Each attempt waits up to 8 seconds for your response.
- A failed attempt is retried twice, so there are at most three attempts. The retries come shortly after, roughly 0.25 and 1 second later.
- Every attempt is signed again with a fresh timestamp.
- You can inspect recent attempts, with status codes and the start of your
response body, at
GET /v1/webhooks/{id}/deliveries. DELETE /v1/webhooks/{id}turns a webhook off. It returns204.
Handling events well
- Check the signature on every request, and reject anything that fails.
- Reply quickly. Return
200as soon as the event is verified and do the real work in a queue, so you stay well inside the 8-second window. - Expect repeats. If your server times out after processing an event, the
retry will deliver it again. Key your processing on
data.job.id. - Fall back to polling for gaps. Retries end after three attempts, so if
your endpoint was down,
GET /v1/jobs?since=...shows anything you missed.