Webhooks
Receive leads and events in your own systems.
Lead webhooks
Configure a webhook on a chatbot's Leads & handoff tab, or connect the Custom webhook integration for the whole workspace. Every captured lead is POSTed as JSON.
Payload
json
{
"source": "anserra",
"chatbot": { "id": "cm…", "name": "Support Assistant" },
"lead": {
"id": "cm…",
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": null,
"company": "Analytical Engines Ltd",
"message": "Interested in the Business plan",
"createdAt": "2026-09-04T09:31:00.000Z"
},
"transcriptUrl": "https://anserra.onzira.com/conversations/cm…"
}Verifying the request
If you set a shared secret on the Custom webhook integration, it is sent as the X-Anserra-Secret header. Compare it in constant time on your side and reject anything that does not match.
javascript
import { timingSafeEqual } from "node:crypto";
function verify(req) {
const sent = Buffer.from(req.headers["x-anserra-secret"] ?? "");
const expected = Buffer.from(process.env.ANSERRA_WEBHOOK_SECRET);
return sent.length === expected.length && timingSafeEqual(sent, expected);
}Delivery behaviour
- Delivery is fire-and-forget: a failing webhook never loses the lead, which is always saved to your dashboard first.
- Respond with any 2xx status. We do not read the response body.
- Respond promptly — a slow endpoint delays nothing for the visitor, but repeated timeouts are worth investigating.
- Treat deliveries as at-least-once and key on the lead id, so a retry cannot create a duplicate record on your side.
Zapier
Choose Zapier as the destination and paste a Catch Hook URL. The payload shape is identical, so every field is available as a Zap step.