DevelopersWebhooks
  1. Developers
  2. API reference

Webhooks

RevFirst can call your server the moment someone replies, says they’re interested, or books a meeting. Every call is signed, so you can prove it came from RevFirst.

#Set up an endpoint

  1. In the RevFirst app, open Integrations → API & webhooks.
  2. Paste your address and tick the events you want. It must be a public https:// address: no localhost, IP addresses, private hosts or user names in the link.
  3. Copy the signing secret (whsec_…). It’s shown once.
  4. Press Send a test. A sample event with "test": true in data arrives right away.

#Event types

EventWhen it’s sentdata contains
reply.receivedSomeone replied on email or LinkedIn. Out-of-office messages and bounces are not sent.person, reply
lead.interestedA reply was tagged interested: they want a call, times or more information. RevFirst also opens a deal.person, reply, deal_id
meeting.bookedSomeone booked through your calendar link.person, meeting, deal_id

An interested reply sends both reply.received and lead.interested, if you subscribed to both.

#Payload

Each delivery is a POST with a JSON body and these headers:

HeaderValue
RevFirst-EventThe event type, e.g. lead.interested
RevFirst-DeliveryThe event id (same as the body’s id)
RevFirst-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256>
User-AgentRevFirst-Webhooks/1.0
Content-Typeapplication/json
{
  "id": "evt_lead_interested_5d1e7a90-2b3c-4d5e-8f60-718293a4b5c6",
  "type": "lead.interested",
  "created_at": "2026-11-25T06:12:51.000Z",
  "data": {
    "person": {
      "id": "3f2a8c1e-6b0d-4c47-9a51-2f1f0c9d7e11",
      "name": "Jane Doe",
      "title": "Head of Sales",
      "company": "Acme",
      "email": "jane@acme.com",
      "linkedin_url": "https://www.linkedin.com/in/example-jane-doe",
      "reason": "Hiring 3 SDRs this month"
    },
    "reply": {
      "id": "5d1e7a90-2b3c-4d5e-8f60-718293a4b5c6",
      "channel": "email",
      "text": "Sounds good, send me some times next week.",
      "received_at": "2026-11-25T06:12:44.000Z"
    },
    "deal_id": "c41f0e88-9d2a-4b7e-a1c3-55e0d6b2f917"
  }
}

#Verify the signature

RevFirst-Signature holds a timestamp t and v1, the hex HMAC-SHA256 of "<t>.<raw body>" keyed with your signing secret. Recompute it over the raw body, compare in constant time, and reject anything older than five minutes.

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

const app = express();
const SECRET = process.env.REVFIRST_WEBHOOK_SECRET; // whsec_…

function fromRevFirst(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries((header ?? "").split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!parts.v1 || !Number.isFinite(t)) return false;
  if (Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false; // too old: maybe a replay
  const want = Buffer.from(createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex"));
  const got = Buffer.from(parts.v1);
  return want.length === got.length && timingSafeEqual(want, got);
}

// Use the raw body: re-serialised JSON won't match the signature.
app.post("/revfirst", express.raw({ type: "application/json" }), (req, res) => {
  const raw = req.body.toString("utf8");
  if (!fromRevFirst(raw, req.get("RevFirst-Signature"), SECRET)) return res.sendStatus(400);
  const event = JSON.parse(raw);
  res.sendStatus(200); // answer fast, then do the work
  handle(event);       // de-duplicate on event.id
});

#Retries and delivery

  • Answer with any 2xx within 10 seconds. Anything else, a timeout or a redirect counts as a failure. Redirects are not followed.
  • Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours: six tries in all.
  • An endpoint that fails 20 times in a row is switched off. Fix it, then add it again in the app.
  • Delivery is at least once: the same event can arrive twice. Events can arrive out of order.
  • Your address is checked to be public again on every delivery.

#Best practices

  • De-duplicate on id. Store handled ids for a few days and skip repeats.
  • Answer first, work later. Return 200, then queue the work, so slow jobs don’t cause retries.
  • Use created_at, not arrival order, when order matters.
  • Fetch for full detail. Call GET /people/{id} with data.person.id when you need more.
  • Keep the secret secret. If it leaks, delete the endpoint and add it again for a new one.
Event ids
evt_reply_received_<reply id>
evt_lead_interested_<reply id>
evt_meeting_booked_<meeting id>
evt_test_<random>          (Send a test)

Last updated 25 November 2026 · Questions? Write to satvik@revfirst.co