Skip to content

Webhooks

Webhooks tell your server when something finishes, so you don’t have to poll.

Event Sent when
research.completed Research finished with at least one report
research.failed Research finished without any report
research.cancelled Research was cancelled
research.run.completed One provider’s report is ready (one event per provider)
research.merge.completed A synthesis merge finished; report_id is the synthesis
research.merge.failed A synthesis merge failed

The exact payload of each event is in the API reference.

Terminal window
curl https://deeperesearch.com/v1/webhooks \
-H "Authorization: Bearer $DEEPER_RESEARCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/hooks/deeper", "events": ["research.completed", "research.failed"] }'

Leave out events to receive all of them. The URL must be public and use https.

Each event is a POST with a JSON body:

{
"id": "research.completed:6f0c2a1e-…",
"type": "research.completed",
"created_at": "2026-11-19T14:02:11.482Z",
"data": {
"research": {
"id": "6f0c2a1e-…",
"status": "completed",
"query": "Which Postgres-backed job queues…",
"charged_usd": 3.42,
"runs": [{ "vendor": "parallel", "offering": "pro-fast", "state": "completed", "charged_usd": 1.2 }]
}
}
}

Answer with any 2xx status within 10 seconds. Do slow work, like fetching the reports, after you’ve answered.

Events are signed following the Standard Webhooks spec, so any Standard Webhooks library can verify them. Each request has three headers:

Header Contents
webhook-id The event id
webhook-timestamp When it was sent, in Unix seconds
webhook-signature v1, followed by a base64 HMAC-SHA256 signature

The signature is computed over {webhook-id}.{webhook-timestamp}.{raw body}, with your secret (without its whsec_ prefix, base64-decoded) as the key. Verify it against the raw request body, before parsing the JSON, and reject events more than five minutes old.

import crypto from "node:crypto";
export function verifyWebhook(rawBody, headers, secret) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
const signatures = headers["webhook-signature"] ?? "";
if (!id || !timestamp || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const expected = crypto.createHmac("sha256", key).update(`${id}.${timestamp}.${rawBody}`).digest();
return signatures.split(" ").some((entry) => {
const [version, signature] = entry.split(",");
const given = Buffer.from(signature ?? "", "base64");
return version === "v1" && given.length === expected.length && crypto.timingSafeEqual(given, expected);
});
}

If your endpoint doesn’t answer 2xx in time, the event is retried with increasing delays, up to 8 more times over several hours, then marked failed. GET /v1/webhooks/{id}/deliveries shows each delivery’s attempts, last response status and last error.

The same event can arrive more than once, and events can arrive out of order. Use the event id to ignore events you’ve already handled.

DELETE /v1/webhooks/{id} stops all deliveries to it.