Skip to content
Docs
Qubitara Synapse

Webhook payloads and signatures

Updated Version 3SYNAPSE-67

How to receive what Synapse sends. Creating and managing webhooks is described under Administration → Webhooks.

A delivery#

Synapse POSTs JSON to your address with these headers:

Header

Value

x-synapse-event

The event name, such as page.published

x-synapse-delivery

A unique id for this delivery — use it to ignore duplicates

x-synapse-timestamp

Unix seconds when it was signed

x-synapse-signature

sha256=<hex> — see below

Content-Type

application/json

And this body:

json
{
  "event": "page.published",
  "occurredAt": "2026-10-05T09:12:44.000Z",
  "organization": { "id": "…", "slug": "acme" },
  "resource": { "type": "PAGE", "id": "…", "reference": "OPS-12", "title": "Deployment runbook" },
  "space": { "id": "…", "key": "OPS" },
  "actor": { "id": "…" }
}

resource.type is PAGE, SPACE or COMMENT. space and actor are present when there is one; a scheduled job has no actor. The body never carries page content — fetch it with the API if you need it, under a credential that may read it.

Verify the signature#

The signature is an HMAC-SHA256 of "<timestamp>.<raw body>" with the webhook's signing secret, hex-encoded. Compute it over the raw request body before parsing, compare in constant time, and reject timestamps older than a few minutes to defeat replays.

js
// Node.js
const crypto = require('crypto');

function verify(secret, headers, rawBody) {
  const timestamp = headers['x-synapse-timestamp'];
  const presented = (headers['x-synapse-signature'] || '').replace(/^sha256=/, '');
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');
  return presented.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(presented, 'hex'), Buffer.from(expected, 'hex'));
}

Respond fast, work later#

Answer 2xx within a few seconds and queue the real work. A delivery that fails or times out is retried with increasing delays; a subscription that keeps failing is disabled after ten consecutive failures and must be re-enabled from the API once the receiver is fixed. GET /admin/webhooks/:id/deliveries shows recent attempts with their status codes.

Idempotency#

Retries carry the same x-synapse-delivery id. Keep the ids you have processed and skip repeats.

Targets#

Public HTTPS only. Private, loopback and link-local addresses are refused when the webhook is created.