Webhooks
Create an endpoint with POST /v1/webhook_endpoints { "url", "enabled_events": ["*"] }. The response includes a
signing secret (whsec_…) — shown once.
Every delivery is a POST of an event object with these headers:
Rive-Signature: t=1763630000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdRive-Event-Id: evt_...Rive-Delivery-Id: whd_...Verify it: compute HMAC-SHA256(secret, "<t>.<raw body>") as hex, compare in constant time with v1, and reject
timestamps older than 5 minutes.
import { createHmac, timingSafeEqual } from 'node:crypto';function verify(secret: string, body: string, header: string) { const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('='))); if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; const mac = createHmac('sha256', secret).update(`${t}.${body}`).digest('hex'); return mac.length === v1.length && timingSafeEqual(Buffer.from(mac), Buffer.from(v1));}Respond with any 2xx within 10 seconds. Failures are retried 5 times (after 1 min, 5 min, 30 min, 1 h, 6 h).
The delivery log is at GET /v1/webhook_deliveries; send a test event with POST /v1/webhook_endpoints/:id/test.
Endpoints must be public https URLs.