Webhooks
A webhook sends a signed POST to your server when something happens in a study, so you do not
have to poll.
Set one up
In the Jean app, Admin console, Webhooks: add an https
address on the public internet, choose its events, and copy its signing secret (whsec_…, shown
once). Send a test sends a webhook.test event. Recent deliveries are listed there, and an
endpoint can be turned off and on. A workspace has at most 10. Endpoints are managed in the app
only, not over the API.
Events
| Event | When | data |
|---|---|---|
study.launched | A study is launched. | { studyId } |
study.finished | A study is finished. | { studyId, peopleFinished } |
interview.completed | An interview ends and has been checked. | { studyId, interviewId, scripted } |
interview.held | An interview is held for review. | { studyId, interviewId, scripted } |
results.ready | Results have been written. | { studyId, interviews, writtenFrom } |
webhook.test | Only from Send a test. | { endpointId } |
scripted is true for a test-script interview, not a person. writtenFrom is "people" or
"test-script interviews".
{
"id": "evt_8Qm3...",
"type": "results.ready",
"createdAt": "2026-11-12T07:00:00.000Z",
"data": { "studyId": "...", "interviews": 12, "writtenFrom": "people" }
}
Ids and counts only. A participant's words never leave in a webhook. When one arrives, call the API for the content: the results, or the conversation.
Headers
| Header | Value |
|---|---|
Jean-Signature | t=<unix seconds>,v1=<hex HMAC-SHA256> |
Jean-Event | The event type. |
Jean-Event-Id | The same on every attempt: use it to drop a repeat. |
Jean-Delivery | One endpoint's copy. |
Content-Type | application/json |
User-Agent | Jean-Webhooks/1 |
Verify the signature
The signature is an HMAC-SHA256 with your endpoint's secret over "<t>.<body>", the exact bytes
of the body as received, made afresh on each attempt. The key is the whole secret string, the
whsec_ prefix included: do not strip it or decode it. Refuse a timestamp more than five minutes
from your own clock.
import {createHmac, timingSafeEqual} from 'node:crypto';
export function verifyJean(secret, header, rawBody, nowMs = Date.now()) {
const parts = Object.fromEntries(header.split(',').map(p => p.split('=', 2)));
const t = Number(parts.t);
if (!Number.isInteger(t) || !/^[0-9a-f]{64}$/.test(parts.v1 ?? '')) return false;
if (Math.abs(nowMs / 1000 - t) > 300) return false; // more than five minutes either way
const want = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest();
return timingSafeEqual(want, Buffer.from(parts.v1, 'hex'));
}
// verifyJean(process.env.JEAN_WEBHOOK_SECRET, req.headers['jean-signature'], rawBody)
import hashlib, hmac, time
def verify_jean(secret: str, header: str, raw_body: bytes, now: float | None = None) -> bool:
try:
parts = dict(p.split("=", 1) for p in header.split(","))
t = int(parts["t"])
except (KeyError, ValueError):
return False # a malformed header is a failed check, not an exception
if abs((now or time.time()) - t) > 300:
return False
want = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(want.encode(), parts.get("v1", "").encode())
Delivery
- A 2xx is delivered. Anything else, a redirect included, is a failure.
- Up to 6 attempts: at once, then after 1 minute, 5 minutes, 30 minutes, 2 hours and 8 hours, each with up to 10% jitter, about 10.6 hours in all.
- Each attempt has 10 seconds. At most 64 KB of your answer is read, and only its status code is kept.
- After 15 failed attempts in a row, the endpoint is turned off and the Admin console says why. Turning it on again starts the count from zero.
- An event's id is made from its type and its data, so an identical later event (the same type
and the same data) is not sent again for 30 days. The same event is queued once per endpoint,
so Jean does not send it twice; still, use
Jean-Event-Idto drop a repeat. - The address must be
httpswith no credentials in it, and must resolve to a public address. Redirects are not followed. - Deliveries are kept for 30 days.