Docs menu · Webhooks

API reference

Webhooks

Get a signed POST to your server when a sale, refund, commission, partner or payout happens.

Set up

Go to Settings → Workspace → Webhooks, add your https endpoint, and pick the events. Use Send test to send a test.ping.

Events

EventWhen
lead.createdA lead was recorded
sale.createdA sale was recorded
sale.refundedA sale was refunded
commission.createdA partner earned commission
partner.createdA partner was added
payout.paidA partner payout was paid

Payload

{
  "id": "evt_5f3c…",
  "type": "sale.created",
  "data": { "conversionId": "…", "amountCents": 4999, "currency": "USD", "referrerId": "…" },
  "createdAt": "2026-09-15T18:04:11.000Z"
}
HeaderValue
X-Bridgly-SignatureHMAC-SHA256 (hex) of the raw body, signed with your endpoint's secret
X-Bridgly-EventThe event type
X-Bridgly-DeliveryThe event id. It stays the same across retries, so use it to skip duplicates
X-Bridgly-Attempt1, 2, …

Verify the signature

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

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

Read the body as a raw string before parsing it as JSON. Re-serialised JSON won't match the signature.

Delivery

  • Respond with a 2xx within 8 seconds.
  • Anything else is retried after 30 seconds, 5 minutes and 30 minutes. A 4xx (other than 408 and 429) isn't retried, because it means the request itself was rejected.
  • After 10 failed events in a row the endpoint is turned off. Turn it back on from the same settings page once it's fixed.
  • Every attempt, with its request and response, is in the delivery log for 30 days.

Stuck? Contact us and a person will reply.