Docs Concepts

Webhooks

How saved searches push new innovations to you, and how to trust them.

How delivery works

Save a search under Webhooks. About every ten minutes we POST newly published matches to your endpoint, up to 50 per request, with "event": "innovations.published". The Send test button sends a ping with one sample so you can check your handler. Endpoints must use HTTPS.

Check the signature

Each request carries TW-Signature: t=<timestamp>,v1=<hex>. Compute an HMAC-SHA256 of timestamp + "." + raw body with your webhook's signing secret and compare it to v1 in constant time. Reject old timestamps to stop replays.
Python
import hashlib, hmac, time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    t, sig = int(parts["t"]), parts["v1"]
    if abs(time.time() - t) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + body, hashlib.sha256)
    return hmac.compare_digest(expected.hexdigest(), sig)

Answer fast, dedupe

Reply with any 2xx within ten seconds and do slow work afterwards. Anything else counts as a failure and the same innovations come again next time, so dedupe on innovation_id. After 20 failures in a row the webhook pauses; press Resume on the Webhooks page once your endpoint is fixed.