Webhooks
A webhook sends ReplyBash events to your own server as they happen: a new chat, a visitor asking for a person, a form being submitted. Use it to put leads in your CRM, post to an internal tool, or start an automation.
You need a public https address that accepts a POST with a JSON body. Zapier, Make and n8n give you one without writing code.
Add a webhook
- Open your agent and go to Notifications (under Configure).
- Click Send somewhere new, choose Webhook, give it a name and paste your URL.
- Under What it hears about, tick the events you want.
- Save it. The webhook now appears under Where we send.
- Click Edit on the webhook, then Copy signing secret. The secret starts with
whsec_; keep it on your server. - Click Send test to check that your server answers.
Each agent has its own places, so add the webhook to every agent whose events you want.
Events
| type | When |
|---|---|
conversation.started | A visitor sent the first message of a chat. |
conversation.handoff_requested | The agent asked for a person to join the chat. |
form.submitted | A form was sent: data.form, data.answers (by field id) and data.contact. |
conversation.resolved | Your team marked a chat resolved. |
test | Sent by Send test. |
Headers and body
Each event is a POST with these headers and a JSON body:
webhook-id: 3f2c9a8e-… (the same on every retry)
webhook-timestamp: 1795773600 (Unix seconds)
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
x-replybash-event: form.submitted
{
"type": "form.submitted",
"timestamp": "2026-11-27T10:00:00.000Z",
"data": {
"id": "3f2c9a8e-…",
"agent": { "id": "…", "name": "Acme help" },
"form": { "id": "…", "title": "Book a call" },
"answers": { "name": "Priya Shah", "email": "priya@example.com" },
"fields": [{ "id": "name", "label": "Name", "value": "Priya Shah" }],
"contact": { "name": "Priya Shah", "email": "priya@example.com", "phone": null, "id": "…", "new": true },
"lead": { "id": "…" },
"conversation": { "id": "…", "url": "https://replybash.com/app/…" },
"needsHumanAt": null
}
}
Verify the signature
Webhooks follow Standard Webhooks, so its libraries (JavaScript, Python, Go, PHP, Ruby, Java and more) check them for you. Check every request with your signing secret before you trust it:
import { Webhook } from "standardwebhooks" // npm install standardwebhooks
const webhook = new Webhook(process.env.REPLYBASH_WEBHOOK_SECRET)
// Verify the raw body: parsing and re-serializing the JSON changes it.
// Next.js route handler, Hono, Workers (headers are a Headers object):
const event = webhook.verify(await request.text(), Object.fromEntries(request.headers))
// Express, with express.raw({ type: "application/json" }):
// const event = webhook.verify(req.body.toString(), req.headers)
// verify throws if the signature is wrong or the timestamp is more than 5 minutes off.
Without a library: the base64 HMAC-SHA256 of webhook-id.webhook-timestamp.body, keyed with the bytes after whsec_, must equal the value after v1, in the webhook-signature header.
Retries and failures
Answer with any 2xx within 20 seconds. Anything else is retried over about a day (a handoff alert only for a few minutes; Send test isn't retried), with the same webhook-id, so you can skip one you've already seen.
A 404 or 410 stops deliveries to that address until you fix it. The place then shows as paused in Notifications, with the error, and what was waiting is sent once it works again.
Zapier, Make and n8n
Paste their catch-hook address as the webhook URL: Zapier, Make and n8n each start a workflow from it, so you can add leads to Google Sheets, a CRM or your email list without a server of your own.
To be told about the same events by email instead, add an email address as a place on the same page (Notifications).