# 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

1. A visitor is identified on your website.
2. KnownVisitors sends an HTTPS `POST` request to your URL with that person as JSON, either right away or in an hourly batch.
3. Your server checks the signature, saves the person and answers with a `2xx` status.
4. If your server does not answer, we [try again](https://knownvisitors.com/docs/webhook-retries) for about 8½ hours.

## Quickstart

1. **Create an endpoint**: Add a route on your server that accepts `POST` requests with a JSON body. It must be reachable from the internet over `https://`.
2. **Add the address in KnownVisitors**: In the app, open **Integrations**, choose **Webhook**, then click **New address** and paste your URL.
3. **Pick a template and a schedule**: The template decides which fields each person includes. Then choose **Send each person right away** or **Send one batch every hour**.
4. **Save and copy your signing secret**: We 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](https://knownvisitors.com/docs/webhook-signatures).
5. **Send a test event**: Click **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.

```javascript title="Node.js"
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);
});
```

```python title="Python"
@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.

> **Tip: 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.

## Next steps

**

- [Event payloads](https://knownvisitors.com/docs/webhook-payloads): The exact JSON we send, field by field.

**

- [Verify signatures](https://knownvisitors.com/docs/webhook-signatures): Confirm each request really came from us.

---
Source: https://knownvisitors.com/docs/webhooks · Last updated November 30, 2026
