Skip to content

Build with SynthBoard

Events and webhooks

Signed POSTs to your endpoints when something happens in your offices, and the same events by cursor.

Webhooks#

Add an endpoint in the console (or POST /v1/webhooks). Each delivery is a signed POST carrying kinds, ids and dates — never your users' words. These events go out today:

  • session.complete
  • session.failed
  • session.cancelled
  • session.continued
  • session.reconvened
  • outcomes.ready
  • call.decision_due
  • call.outcome_due
  • call.floor_crossed
  • call.answers_sealed

Signatures#

HMAC-SHA256 over `${timestamp}.${body}` with the endpoint's signing secret, in X-SynthBoard-Signature; the event name and timestamp ride X-SynthBoard-Event and X-SynthBoard-Timestamp.

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

export function verify(secret: string, body: string, timestamp: string, signature: string): boolean {
  const mac = createHmac('sha256', secret).update(`${timestamp}.${body}`).digest('hex');
  return timingSafeEqual(Buffer.from(`sha256=${mac}`), Buffer.from(signature));
}

Retries#

A delivery that fails is tried again after 1, 5, 15, 60, 240 minutes. An endpoint that keeps failing pauses itself; resume it in the console. Resend any delivery from its row.

By cursor#

  • GET /v1/offices/{officeId}/events — What happened on the office's matters since a cursor (listEvents, scope record:read)