Webhooks
A webhook sends each person KnownVisitors identifies straight to a URL you choose, so they land in your CRM, your own server or a tool like Zapier without anyone exporting a file.
How it works
- A visitor is identified on your website.
- KnownVisitors sends an HTTPS
POSTrequest to your URL with that person as JSON, either right away or in an hourly batch. - Your server checks the signature, saves the person and answers with a
2xxstatus. - If your server does not answer, we try again for about 8½ hours.
Quickstart
- Create an endpointAdd a route on your server that accepts
POSTrequests with a JSON body. It must be reachable from the internet overhttps://. - Add the address in KnownVisitorsIn the app, open Integrations, choose Webhook, then click New address and paste your URL.
- Pick a template and a scheduleThe template decides which fields each person includes. Then choose Send each person right away or Send one batch every hour.
- Save and copy your signing secretWe show the secret once, right after you save. Store it on your server, for example as an environment variable. You will use it to verify signatures.
- Send a test eventClick Send test event to send an example person to your URL, then check Recent deliveries to see what your server answered.
A minimal endpoint looks like this. It answers quickly and leaves the slow work for later.
app.post("/knownvisitors", express.raw({ type: "application/json" }), (req, res) => {
// 1. Verify the signature (see Verify signatures)
// 2. Save the event
const event = JSON.parse(req.body.toString("utf8"));
queue.add(event);
// 3. Answer within 10 seconds
res.sendStatus(200);
});
@app.post("/knownvisitors")
def knownvisitors():
# 1. Verify the signature (see Verify signatures)
# 2. Save the event
event = request.get_json()
queue.add(event)
# 3. Answer within 10 seconds
return "", 200
Delivery options
| Option | What you receive |
|---|---|
| Send each person right away | One request per person, usually within a minute or two of them being identified. Event type visitor.identified. |
| Send one batch every hour | One request at the top of each hour with everyone identified since the last one, up to 500 people per request. Event type visitors.identified. If nobody was identified, nothing is sent. |
Limits
- Up to 3 addresses per account. Each has its own template, schedule and signing secret.
- Addresses must use
https://and must answer directly. We do not follow redirects. - Only Admins on your account can see or change webhook addresses.
Using Zapier, Make or n8n? In Zapier, add Webhooks by Zapier and pick Catch Hook. In Make, add a Custom webhook. In n8n, add a Webhook node set to POST. Paste the URL it gives you as your address, then click Send test event so the tool learns the exact fields it will receive.