Skip to content

Webhooks

Last updated 30 Nov 2026

How Accord signs the events it sends to an app's backend, and how to check them. Webhooks are not available to customer workspaces yet.

Not available yet

An app registered in a customer workspace gets a webhook secret, shown once at registration, but the console has no setting for its webhook address yet. Until it does, Accord delivers nothing to your apps. Keep the secret: it is the one your app will check deliveries with.

A delivery ​

Each event is a POST with Content-Type: application/json and a signature header:

X-Nubisco-Signature: sha256=<hex>

The body has exactly three fields:

json
{
  "event": "membership.added",
  "timestamp": "2026-11-28T12:00:00.000Z",
  "data": {
    "user_id": "<person id>",
    "app_id": "<app id>",
    "role": "member"
  }
}

There is no top-level app_id. The address the event arrives at already says which app it is for.

The events ​

EventWhendata
membership.addedA person was given access to your appuser_id, app_id, role
membership.removedA person lost access to your appuser_id, app_id
user.updatedA person's name, email address, picture or language changeduser_id, changed, maybe picture or locale
user.deactivatedA person was deactivateduser_id, app_id

changed lists the names of the fields that changed. When the language changed, locale is the new BCP 47 tag, or null when the person went back to following their browser.

Checking the signature ​

The signature is the HMAC-SHA256 of the raw request body, keyed with the app's webhook secret, written as lower case hex after sha256=. Check it against the raw body, before you parse it, and compare in constant time:

ts
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyWebhook(
  rawBody: string,
  signature: string,
  secret: string,
): boolean {
  const expected = Buffer.from(
    "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex"),
  );
  const received = Buffer.from(signature);
  return (
    expected.length === received.length && timingSafeEqual(expected, received)
  );
}

Refuse any delivery whose signature does not match. Then refuse one whose timestamp is more than five minutes old, so a delivery someone captured cannot be sent to you again later.

Delivery ​

Each event is sent once to each address. A failed delivery (a network error, a timeout or an answer other than 2xx) is not retried. So treat an event as a prompt to refresh what you hold, never as the only record of a change. Every sign-in carries the person's current role and organizations in the token.

Answer quickly, and do slow work in the background.

Accord is proprietary software by Nubisco.