OrvyxDevelopers

Webhooks

Push instead of poll: Orvyx POSTs signed events to your endpoint and retries until you acknowledge.

Event catalogue

The list of event types Orvyx can deliver, with their payload schemas, is maintained at hooks.orvyx.io/events. This page covers delivery mechanics; it does not duplicate the catalogue.

How delivery works

When something happens in your workspace that you subscribed to, Orvyx sends a single POST request to your HTTPS endpoint. The request body is the event as JSON, and it always arrives with a signature header that lets you prove it came from Orvyx.

Your endpoint must be reachable over HTTPS with a valid certificate. Plain HTTP is never used, because the signature alone does not help if the transport can be read or rewritten in transit.

Verifying the signature

Each delivery carries a signing secret known only to you and Orvyx, plus a timestamp header. The signature is an HMAC-SHA256 over the raw request body — the exact bytes, not a re-serialized version — computed with that secret.

Verify by recomputing the HMAC over the raw body you received and comparing it to the signature in constant time. Check the timestamp too: signatures outside a five-minute tolerance are treated as replays and rejected, so an attacker cannot replay an old, validly-signed delivery forever.

This means you must read the body as a string before parsing it. If your framework has already parsed and re-serialized the JSON, whitespace and key order may differ and the HMAC will not match.

Node.js verification
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyDelivery(
  rawBody: string,
  signature: string,
  timestamp: string,
  secret: string,
): boolean {
  const ageMs = Math.abs(Date.now() - Number(timestamp) * 1000);
  if (ageMs > 5 * 60 * 1000) return false;

  const expected = createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected, "utf8");
  const b = Buffer.from(signature, "utf8");
  return a.length === b.length && timingSafeEqual(a, b);
}

Idempotency

Every delivery carries an event id. Because retries exist (see below), you will occasionally receive the same event more than once — this is normal, not a bug.

Store the event id of every delivery you process, and skip any delivery whose id you have already seen. Scope the store to your endpoint’s lifetime; a database table or a keyed cache with a TTL longer than the retry window is enough.

Retries

A delivery counts as acknowledged when your endpoint answers with any 2xxstatus. Anything else — a non-2xx status, a timeout, a connection reset — is treated as a failed delivery and retried.

Acknowledge first, work later: validate and persist the event, return 200, and do the slow work after responding. An endpoint that runs a long pipeline before answering will accumulate retries it did not need.

Never trust the payload without verifying

Your endpoint is a public URL that anyone on the internet can POST to. Until you have verified the HMAC signature and the timestamp tolerance, treat the body as untrusted input — do not act on it, do not log it as fact, and do not skip the check “just this once” in a dev environment.