Webhooks
Send each lead as a signed JSON POST to your own server, CRM, or an automation tool. This is also the bridge to anything without a built-in connector.
Set up
- In the dashboard open Websites, choose a website, then Notifications → Add notification.
- Choose Webhook (HMAC signed) and paste your endpoint URL. Leave the signing secret empty to generate one.
- Copy the signing secret from the dialog. It is only shown in full once.
- Press Test to send a sample lead.
Payload
{
"event": "lead.created",
"id": "ld_0mwxx7gu614nwazem",
"site_id": "site_demo",
"form": "enquiry",
"created_at": "2026-11-26T19:03:24.414Z",
"email": "priya@acmecorp.in",
"name": "Priya Menon",
"score": 93,
"tier": "hot",
"summary": "Corporate offsite for 45 people in February, needs 20 rooms.",
"data": { "name": "Priya Menon", "email": "priya@acmecorp.in", "guests": "45", "message": "…" },
"meta": { "page_url": "https://…", "referrer": "https://www.google.com/", "utm": { "utm_source": "google" }, "country": "IN" }
}summary is null when only rule-based scoring ran.
Headers
| Header | Value |
|---|---|
X-Leadvane-Signature | sha256= followed by the hex HMAC-SHA256 of timestamp + "." + raw body, keyed with your signing secret. |
X-Leadvane-Timestamp | Unix time in seconds when the request was signed. |
X-Leadvane-Lead-Id | The lead ID. Use it to ignore repeats. |
User-Agent | leadvane/1 |
For one more release every request also carries X-Coweb-Signature, X-Coweb-Timestamp and X-Coweb-Lead-Id with the same values, so receivers written before the rename keep working. Switch them to the X-Leadvane-* names.
Other events
A webhook can also receive these, signed the same way. Check event before reading fields.
| Event | When | Fields |
|---|---|---|
lead.created | Each new lead (the payload above) | id, email, tier, data… |
digest.daily | 09:00 in the business timezone, when the notification is in Daily digest mode | date, counts (hot, warm, cold, spam), leads[] |
monitor.down / monitor.up | A website monitor goes down or recovers | monitor, incident. See Uptime |
Verify the signature
Always compute the HMAC over the raw request body, before any JSON parsing, and reject requests older than five minutes.
Node.js (Express)
import express from 'express';
import crypto from 'node:crypto';
const app = express();
app.post('/hooks/leads', express.raw({ type: 'application/json' }), (req, res) => {
const ts = req.get('X-Leadvane-Timestamp') || '';
const sig = req.get('X-Leadvane-Signature') || '';
const expected = 'sha256=' + crypto.createHmac('sha256', process.env.LEADVANE_SECRET)
.update(`${ts}.${req.body}`).digest('hex');
const valid = sig.length === expected.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
if (!valid || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(401);
const lead = JSON.parse(req.body);
// Store lead.id; a retry can deliver the same lead again.
res.sendStatus(200);
});Python (Flask)
import hashlib, hmac, os, time
from flask import Flask, abort, request
app = Flask(__name__)
SECRET = os.environ["LEADVANE_SECRET"].encode()
@app.post("/hooks/leads")
def leads():
ts = request.headers.get("X-Leadvane-Timestamp", "0")
body = request.get_data()
expected = "sha256=" + hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, request.headers.get("X-Leadvane-Signature", "")):
abort(401)
if abs(time.time() - int(ts)) > 300:
abort(401)
lead = request.get_json()
return "", 200PHP
<?php
$secret = getenv('LEADVANE_SECRET');
$body = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_LEADVANE_TIMESTAMP'] ?? '0';
$expected = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_LEADVANE_SIGNATURE'] ?? '') || abs(time() - (int) $ts) > 300) {
http_response_code(401);
exit;
}
$lead = json_decode($body, true);
http_response_code(200);Responses and retries
| Your response | What happens |
|---|---|
| Any 2xx | Marked Delivered. |
| 5xx, 408, 429 or a network error | Retried after 1, 5, 15, 60 and 360 minutes (6 attempts in total), then marked Failed. |
| Any other 4xx | Marked Failed immediately. Fix your endpoint, then use Retry failed on the lead. |
Return 200 as soon as the signature checks out, then process the lead in the background. Treat X-Leadvane-Lead-Id as an idempotency key.