Accountable Webhooks
Developers Pre-release

Webhooks

Get pipeline movements the moment they happen

Accountable sends a signed HTTPS request to your server whenever a record enters your Leads, Active, or Funded pipeline. You host one endpoint. We do the rest.

A record movesA new lead is created, or a record enters Active or Funded.
We sign and sendA POST with a JSON body and a signature header.
You verify and replyCheck the signature, return 2xx, process at your pace.

Quick start

  1. Stand up an HTTPS endpoint

    It must accept POST requests, be reachable from the public internet, and answer within 10 seconds. Plain HTTP, redirects, and private or local addresses are rejected.

  2. Add the endpoint in Accountable

    A company admin adds the URL under Integrations. Accountable shows a signing secret that starts with whsec_. It appears once, so store it somewhere safe.

  3. Verify every request

    Recompute the signature from the raw request body and your secret. Reject anything that does not match.

  4. Return a 2xx

    Acknowledge first, then do your work. Use the event ID to ignore repeats.

The event

There is one event type, PIPELINE_MOVEMENT. It fires when a record enters a pipeline tab, either because it was just created there or because it moved from another tab. Edits to a record that stays in the same tab do not send an event.

Your endpoint receives every movement for your company. To react to only some of them, filter on stage and previousStage. For example, stage === "funded" catches every funded loan, and previousStage === "lead" && stage === "active" catches a lead becoming an active loan.

FieldTypeMeaning
eventTypestringAlways PIPELINE_MOVEMENT.
eventIdstringUnique per event. Use it to ignore repeats.
occurredAtISO 8601When the movement happened. Use it to order events.
stagestringThe tab the record entered: lead, active, or funded.
previousStagestring or nullThe tab it came from. null when the record is brand new.
recordobjectThe details shown on that pipeline tab row, in camelCase.

The values below are sample data. We share the complete list of record fields before you go live.

Headers

Every request carries these headers, with Content-Type: application/json.

HeaderValue
Accountable-SignatureTimestamp and signature, for example t=1763900000,v1=9b2f….
Accountable-Event-IdMatches eventId in the body. The same event always keeps the same ID.
Accountable-Event-TypePIPELINE_MOVEMENT
Accountable-Delivery-IdIdentifies this delivery, for support requests.

Verify the signature

Anyone can send a request to a public URL. The signature proves the request came from Accountable and that nobody changed the body on the way.

signature = hex( HMAC_SHA256( secret, "<t>.<raw request body>" ) )
  1. Split the header

    Read t (a Unix timestamp) and every v1 value.

  2. Check the timestamp

    Reject requests more than 5 minutes old. This stops replays.

  3. Recompute and compare

    Sign t, a period, and the body exactly as received. Compare with a constant-time function. Accept if any v1 matches.

Use the raw bytes. If your framework parses the JSON and you serialize it again, whitespace and key order can change and the signature will not match. Read the body before parsing it.

Try it

Pick a movement. This page signs a sample request in your browser with a demo secret, then verifies it the way your server should. Edit the body to see what a tampered request looks like.

Request headers

Demo secret: . Real secrets are shown once when you add an endpoint.

Reference implementations

server.js (Express)
import crypto from 'node:crypto';
import express from 'express';

const app = express();
const SECRET = process.env.ACCOUNTABLE_WEBHOOK_SECRET;
const seen = new Set(); // use Redis or a database table in production

// Raw body: do not use express.json() on this route.
app.post('/webhooks/accountable', express.raw({ type: 'application/json' }), (req, res) => {
  const pairs = (req.get('Accountable-Signature') || '')
    .split(',')
    .map((part) => part.trim().split('='));
  const t = pairs.find(([k]) => k === 't')?.[1];
  const signatures = pairs.filter(([k]) => k === 'v1').map(([, v]) => v);

  const fresh = Math.abs(Date.now() / 1000 - Number(t)) <= 300;
  const expected = crypto
    .createHmac('sha256', SECRET)
    .update(`${t}.`)
    .update(req.body)
    .digest('hex');
  const valid = signatures.some(
    (s) => s.length === expected.length && crypto.timingSafeEqual(Buffer.from(s), Buffer.from(expected))
  );

  if (!t || !fresh || !valid) return res.sendStatus(401);

  const event = JSON.parse(req.body.toString('utf8'));
  res.sendStatus(200); // acknowledge first

  if (seen.has(event.eventId)) return; // repeat delivery
  seen.add(event.eventId);

  if (event.stage === 'funded') {
    // your logic here
  }
});

app.listen(3000);

Respond and retry

The status code you return tells Accountable what to do next.

Your responseResult
2xxDelivered We mark the event done.
5xx, 429, or no answer within 10 secondsRetried We try again automatically.
Any other 4xxFailed We do not retry. Fix the endpoint and the next event will go through.

If an endpoint keeps failing, Accountable disables it and emails your company admins. You can turn it back on once it is healthy.

Best practices

Expect the same event twice

Delivery is at-least-once. A network hiccup can cause a repeat. Store the eventId of events you have handled and skip duplicates.

Acknowledge quickly, work later

Verify, return 2xx, and hand the event to a queue or background job. Slow handlers hit the 10 second limit and cause retries.

Do not rely on arrival order

Two events for the same record can arrive out of order after a retry. Compare occurredAt before overwriting newer data with older data.

Rotate secrets without downtime

After you rotate a secret, the old one stays valid for 24 hours. During that window each request carries two v1 values. Accept a match on either, then switch your server to the new secret.

Keep the secret out of code

Store it in an environment variable or a secrets manager. Rotate it if it is ever exposed.

Testing

Before go-live, confirm that your endpoint handles these cases.

CaseExpected behavior
A new lead is createdOne event with stage: "lead" and previousStage: null.
A lead becomes an active loanOne event with stage: "active" and previousStage: "lead".
A loan is fundedOne event with stage: "funded".
A record is edited within its tabNo event.
Body or timestamp is alteredYour endpoint returns 401.
The same event arrives twiceYour system processes it once.

Webhooks are enabled per company. Contact your Accountable representative to turn them on, and send us your endpoint URL to configure.