HumanReviewed docs

Webhooks

Receive issued attestations instead of polling.

Per-request callback

Pass callbackUrl when creating a review request. When the human signs, that URL is POSTed:

json
{ "requestId": "…", "attestationUid": "0x…", "reviewKind": 1, "permalink": "https://humanreviewed.org/0x…", "badgeUrl": "https://humanreviewed.org/api/badge/0x….svg" }

Org-level webhooks (signed)

Configure endpoints in the console (Settings → Outbound webhooks). Every issued attestation is delivered as { "event": "attestation.issued", "data": { …same fields } }, signed with X-HumanReviewed-Signature: a hex HMAC-SHA256 of the raw body using the whsec_ secret (shown once at creation).

typescript
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifySignature(rawBody: string, header: string, secret: string): boolean {
  const expected = createHmac("sha256", secret).update(rawBody).digest("hex");
  return timingSafeEqual(Buffer.from(expected, "hex"), Buffer.from(header, "hex"));
}

// In your handler: read the RAW body (not the parsed object) and compare
// against the X-HumanReviewed-Signature header before trusting the payload.
Always verify against the raw body
Compute the HMAC over the exact bytes received, before JSON parsing — re-serializing can change bytes and break the comparison.