Skip to content

Restricted pilot. The API reference is generated from the running API. Successful matches return manual_review until attack detection is validated.

Webhooks

Warka can notify your server about events. Configure endpoints in the console and verify every signature.

EventSent when
verification.completedA verification has a decision
identity.enrolledAn identity is enrolled or re-enrolled
identity.deletedAn identity is deleted
usage.thresholdYou pass 80% or 100% of your attempts

Verifying a signature

verify-webhook.ts
import { createHmac, timingSafeEqual } from "node:crypto";

export function isValid(rawBody: string, timestamp: string, header: string, secret: string) {
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected = "v1=" + createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  return header.split(",").some((candidate) => {
    const a = Buffer.from(candidate.trim());
    const b = Buffer.from(expected);
    return a.length === b.length && timingSafeEqual(a, b);
  });
}
  • Headers: Warka-Timestamp, Warka-Signature and Warka-Event-Id. Use the event ID to ignore duplicates.
  • Return any 2xx quickly. Failed deliveries retry with backoff, up to 8 attempts.
  • After a secret rotation both secrets sign for 24 hours.
  • Targets must be public https addresses. Payloads never include scores or images.