Skip to main content
Webhooks let your backend receive event notifications instead of polling. You register an HTTPS endpoint; Telepatia POSTs a signed JSON envelope to it whenever a subscribed event occurs. Every delivery is signed with HMAC-SHA256 so you can prove it came from Telepatia. Register a webhook with POST /v1/webhooks; the response returns a signingSecret once — store it now.

Events

Event catalog

Subscribe to one or more events per webhook (the events array at creation).

Subscribing to events

Pass an events array when registering a webhook to choose exactly which events it receives. Each delivery’s type tells you which event fired, so a single endpoint can handle the whole lifecycle.
Update the subscription at any time with PATCH /v1/webhooks/{id} and a new events array.

Event envelope

Every webhook POST body is a JSON envelope. id is stable across redeliveries — dedupe on it. data carries the event’s business object — for scribe_session.* events, a snapshot of the session:
The data object for scribe_session.* events: The same data shape is sent for every scribe_session.* event; status reflects the actual session state and completedAt is null when the session did not complete.

Verifying the signature

Each request carries an X-Scribe-Api-Signature header (Stripe-style):
t is the Unix timestamp the request was signed at; v1 is the hex HMAC-SHA256 of "{t}." + raw_request_body, keyed by your signing secret. Verify over the raw request body before parsing — re-serializing JSON can change the bytes and break the comparison. Use a constant-time compare and reject timestamps outside a 5-minute window to blunt replay attacks.
Each request also carries X-Scribe-Api-Event-Id (equal to the envelope id) for quick logging.

Retry & delivery

  • Return a 2xx quickly to acknowledge. Do slow work asynchronously.
  • A 5xx, network error, or timeout is retried with exponential backoff (≈2s up to ≈2min between attempts) for up to 6 attempts across ~15 minutes.
  • Any 4xx (including 408 and 429) is treated as permanent — the delivery is not retried.
  • Retries reuse the same envelope id, so dedupe on it to stay idempotent.

Rotating the signing secret

Call POST /v1/webhooks/{id}/rotate-secret to generate a new secret. The response returns the new signingSecret once and bumps signingSecretVersion. The previous secret stops verifying immediately, so roll the new value out to your endpoint before rotating.