B55 docs

Webhooks

.md

Events B55 sends as candidates move and reports land, how they are signed (Standard Webhooks), and how to verify them.

Live jobs: B55 delivers events to your endpoints over HTTPS, signed, with retries. You add and manage endpoints in the console under Settings → Webhooks. Sandbox: nothing is sent to your server. Every event is recorded and readable with GET /v0/jobs/{job_id}/events, and the console's playground shows each one as a signed delivery you can inspect, replay and copy as curl.

Events

EventWhenStatus
candidate.createdSomeone was added by email, or applied through the job's link.Sandbox
candidate.openedThe candidate opened the apply link and signed in with GitHub.Sandbox
candidate.consentedThe candidate consented.Sandbox
scan.receivedThe scan landed.Sandbox
report.readyThe report is ready. Fetch it with report_id.Sandbox
report.insufficient_evidenceNot enough history; a report exists and says so.Sandbox
candidate.expiredThe candidate never finished.Planned
consent.revokedThe candidate withdrew consent; their report and scan were deleted. See Consent and withdrawal.Live
candidate.deletedThe candidate's record was erased.Live

Payload

The body is the event object, exactly as GET /v0/jobs/{job_id}/events returns it:

{
  "object": "event",
  "event_id": "evt_000007",
  "event_type": "report.ready",
  "job_id": "job_000001",
  "candidate_id": "cand_000002",
  "report_id": "rpt_000002",
  "created_at": "2026-11-24T12:47:36.646Z"
}

report_id is set on report.ready and report.insufficient_evidence, and null on the others. Events are listed oldest first, the order they are delivered.

Signing

Deliveries follow Standard Webhooks (the scheme Svix uses), so any Standard Webhooks library can verify them.

HeaderValue
webhook-idThe event_id. Use it to drop duplicates.
webhook-timestampUnix seconds when this attempt was signed.
webhook-signaturev1,<base64 HMAC-SHA256>, space-separated if there are several.

The signature is HMAC-SHA256 over <webhook-id>.<webhook-timestamp>.<raw body>, keyed with your secret (whsec_<base64>) after base64-decoding the part after whsec_. Reject timestamps more than 5 minutes from now.

Always verify the raw body bytes, before any JSON parsing.

With the SDK

Both SDKs ship the same check as webhooks.verify (also b55.webhooks.verify / client.webhooks.verify). The TypeScript one uses Web Crypto, so it is async and runs in Node 20+, edge runtimes and Deno; it accepts a Headers object or a plain header record. The Python one takes any header mapping and the body as bytes or str. Install them as in the Quickstart.

import { webhooks } from 'b55';

// Next.js route handler
export async function POST(req: Request) {
  const body = await req.text();
  if (!(await webhooks.verify(process.env.B55_WEBHOOK_SECRET!, req.headers, body))) return new Response('bad signature', { status: 400 });
  const event = JSON.parse(body);
  // ...
  return new Response(null, { status: 204 });
}

The tolerance defaults to 300 seconds: { toleranceSec: 600 } in TypeScript, tolerance_sec=600 in Python.

Without the SDK

The same check with no dependency, to copy into any codebase:

import { createHmac, timingSafeEqual } from 'node:crypto';

/** True when one of the v1 signatures matches and the timestamp is within 5 minutes. */
export function verifyB55Webhook(secret: string, headers: Headers, rawBody: string, toleranceSec = 300): boolean {
  const id = headers.get('webhook-id');
  const timestamp = headers.get('webhook-timestamp');
  const signatures = headers.get('webhook-signature');
  if (!id || !timestamp || !signatures) return false;
  const ts = Number(timestamp);
  if (!Number.isFinite(ts) || Math.abs(Date.now() / 1000 - ts) > toleranceSec) return false;
  const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64');
  const expected = Buffer.from('v1,' + createHmac('sha256', key).update(`${id}.${timestamp}.${rawBody}`).digest('base64'));
  return signatures.split(' ').some((sig) => {
    const given = Buffer.from(sig);
    return given.length === expected.length && timingSafeEqual(given, expected);
  });
}

// Next.js route handler:
// export async function POST(req: Request) {
//   const body = await req.text();
//   if (!verifyB55Webhook(process.env.B55_WEBHOOK_SECRET!, req.headers, body)) return new Response('bad signature', { status: 400 });
//   const event = JSON.parse(body);
//   ...
//   return new Response(null, { status: 204 });
// }

Delivery, retries and replay

SandboxLive
WhereShown in the playground's webhook inspector; nothing leaves your machinePOSTed to each endpoint subscribed to the event type
SecretOne per job, shown in the playgroundOne per endpoint (whsec_…), shown once when you create or rotate it. B55 stores it encrypted and cannot show it again.
GuaranteeEvery event is listed by GET …/eventsAt least once. Deduplicate on webhook-id (the event_id).
First attemptImmediately, when the event happens
RetriesNoneAfter a failure B55 retries with growing gaps, roughly 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, then 10 hours, until the 24-hour mark. The schedule may be tuned, so rely on the guarantee rather than the exact gaps.
If it keeps failingAn endpoint that has failed for 24 hours is disabled and its owners are emailed. Fix the endpoint, then check its status in Settings → Webhooks.
Replay"Replay" in the inspector re-signs the same event with a fresh timestamp and the same webhook-idReplay from the delivery log in Settings → Webhooks

An attempt succeeds when your endpoint answers 2xx within 15 seconds. Answer quickly and do the work afterwards. Because delivery is at least once, the same webhook-id can arrive twice; treat a repeat as a no-op.

Endpoint rules

  • HTTPS only, with no username or password in the URL.
  • The URL must resolve to a public address. localhost, private networks, link-local and cloud metadata addresses are refused, both when you save the endpoint and on every delivery. To test locally, use a tunnel with a public HTTPS URL.
  • B55 does not follow redirects; a redirect counts as a failed attempt.
  • The body is ids only (see Payload). Fetch details with your API key.
  • Verify every delivery with Standard Webhooks before you trust it.