Get alerted when leads stop arriving
A Make scenario or an n8n workflow can keep running while it sends nothing: an expired token, a changed form, an empty source. Klozeo sees the leads that actually arrive. Set an alert on the API key a scenario uses, and Klozeo tells you when no lead has come through it for longer than you expect, then again when leads are back.
For now these alerts are webhook events, which you can point at Slack, n8n or Make. Alert emails will come in a later release.
How it works
Section titled “How it works”- One API key per scenario. The alert watches one key. If several scenarios share a key, one of them can stop without the alert noticing. Give each scenario its own key.
- A lead received is a lead created or merged through the key. Updates, notes and reads don’t count.
- The maximum gap is a whole number of hours, from 1 to 720. It counts only on the key’s active days, in the workspace’s time zone: with Monday to Friday, a weekend without leads raises nothing.
- The owner or an admin can change the workspace’s time zone. After a change, the next check counts the whole current silence in the new zone.
- Klozeo checks every 15 minutes. An alert reaches you up to about 15 minutes after the gap is passed.
- A key that has never received a lead never alerts. The silence starts at the key’s last lead received, or when you set the alert if that’s later.
- One alert per silence. You receive one
source.silent, then onesource.recoveredat the first lead back, never a reminder in between.
Inbound sources: when you rotate a source’s address, its alert settings and any open incident move to the new address, and silence keeps counting from the source’s last lead. The old address is no longer monitored.
Before you start
Section titled “Before you start”You need:
- an API key with the full scope, created by the workspace owner or an admin. Read and write keys get
403on these routes; - the ID of the key to watch.
GET /api-keyslists the workspace’s keys with theirid.
Every request below sends the full key in the X-API-Key header.
1. Choose the maximum gap
Section titled “1. Choose the maximum gap”Klozeo can suggest a gap from the key’s history:
curl https://api.klozeo.com/api/v1/api-keys/KEY_ID/alert \ -H "X-API-Key: sk_live_..."{ "api_key_id": "KEY_ID", "time_zone": "Europe/Paris", "settings": { "mode": "off", "max_gap_hours": null, "active_days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "snoozed_until": null }, "suggestion": { "state": "ready", "max_gap_hours": 6, "sessions": 41, "history_days": 30, "window_days": 14 }}time_zone is the workspace’s time zone, the one active_days is counted in. It is read-only: you don’t send it with PUT.
The suggestion is ready once the key has received leads for at least 14 days, in at least 8 sessions (leads less than 10 minutes apart are one session). Before that, state is insufficient_history. Klozeo never applies it for you.
2. Set the alert
Section titled “2. Set the alert”curl -X PUT https://api.klozeo.com/api/v1/api-keys/KEY_ID/alert \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "mode": "manual", "max_gap_hours": 6, "active_days": ["mon", "tue", "wed", "thu", "fri"], "snoozed_until": null }'| Field | Value |
|---|---|
mode |
manual to alert, off to stop. Turning it off ends an open silence without an event. |
max_gap_hours |
Required with manual: 1 to 720. |
active_days |
The days the silence counts, in the workspace’s time zone. Omitted: every day. |
snoozed_until |
Optional pause, at most 7 days ahead. Omitted or null: no pause. |
PUT replaces all the settings: send every field each time, or the ones you leave out go back to their default.
Pause the alert
Section titled “Pause the alert”During planned downtime, send the same settings with a pause:
{ "mode": "manual", "max_gap_hours": 6, "active_days": ["mon", "tue", "wed", "thu", "fri"], "snoozed_until": "2026-11-20T08:00:00Z" }Nothing is sent during the pause. If leads still don’t arrive when it ends, one source.silent follows. Send "snoozed_until": null to end the pause early.
Check your keys
Section titled “Check your keys”GET /api-keys/health shows each key’s state (ok, silent, snoozed, no_lead_received, unmonitored or disabled) and its last lead received. GET /api-keys/incidents lists the silences still open. Add ?state=all to include the closed ones from the last 13 months.
3. Choose where the alerts go
Section titled “3. Choose where the alerts go”Create a webhook that names both events. "*" never includes them: a webhook receives them only when its events lists them.
curl -X POST https://api.klozeo.com/api/v1/webhooks \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "url": "YOUR_URL", "events": ["source.silent", "source.recovered"] }'One webhook covers every key of the workspace. Use the key’s name in the message to tell them apart.
Slack, directly
Section titled “Slack, directly”Create an incoming webhook in Slack for the channel you want, then use its URL (https://hooks.slack.com/services/...) as url. Klozeo posts a short message:
Klozeo: leads stopped arriving API key: Make: website form Workspace: Acme Silent since: 16 Nov 2026, 08:12 UTC
source.recovered posts « Klozeo: leads are arriving again » with Back at, the time of the first lead back. Times are in UTC. Discord webhook URLs get the same message.
n8n or Make
Section titled “n8n or Make”Use n8n or Make when you want your own wording, another channel (Teams, email, SMS) or more steps. They receive this body:
{ "event": "source.silent", "payload": { "incident_id": "6f1c2a4e-0d8b-4c1e-9a57-3b2f6c1d9e10", "api_key": { "id": "KEY_ID", "name": "Make: website form" }, "workspace": { "id": "WORKSPACE_ID", "name": "Acme" }, "silent_since": "2026-11-16T08:12:00Z", "opened_at": "2026-11-16T14:15:00Z", "max_gap_hours": 6 }, "time": 1794838500}workspace.nameisnullwhen the workspace has no name.silent_sinceis the last lead received before the silence,opened_atwhen Klozeo saw the gap passed. Times are in UTC.source.recoveredhas the same fields plusrecovered_at, the time of the first lead back. Itsincident_idmatches thesource.silentit ends.- Delivery is at least once. Ignore a repeat with the
X-Webhook-Event-IDheader.
The URLs n8n and Make give you are the only secret: anyone who has one can post to it, so keep it private. A secret on the webhook signs each request (see Verifying signatures), for a server of your own that checks it.
n8n example
Section titled “n8n example”This workflow posts each alert to a Slack channel with your own text. In n8n, open a new workflow, paste the JSON below onto the canvas, then:
- In Klozeo alert, replace the path with a long random string.
- In Post to Slack, choose your Slack credential and the channel.
- Publish the workflow (Activate before n8n 2.0), then use the webhook’s Production URL as the Klozeo webhook
url.
{ "name": "Klozeo lead-flow alerts", "nodes": [ { "parameters": { "httpMethod": "POST", "path": "klozeo-alerts-replace-with-a-long-random-string", "options": {} }, "name": "Klozeo alert", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [0, 0] }, { "parameters": { "select": "channel", "channelId": { "__rl": true, "value": "", "mode": "list" }, "text": "={{ $json.body.event === 'source.silent' ? ':red_circle: No lead received through *' + $json.body.payload.api_key.name + '* since ' + DateTime.fromISO($json.body.payload.silent_since).setZone('Europe/Paris').toFormat('dd/MM/yyyy HH:mm') : ':large_green_circle: Leads are arriving again through *' + $json.body.payload.api_key.name + '* since ' + DateTime.fromISO($json.body.payload.recovered_at).setZone('Europe/Paris').toFormat('dd/MM/yyyy HH:mm') }}{{ $json.body.payload.workspace.name ? ' · ' + $json.body.payload.workspace.name : '' }}", "otherOptions": {} }, "name": "Post to Slack", "type": "n8n-nodes-base.slack", "typeVersion": 2.2, "position": [260, 0] } ], "connections": { "Klozeo alert": { "main": [[{ "node": "Post to Slack", "type": "main", "index": 0 }]] } }}The body is under $json.body. Replace Post to Slack with any node: Microsoft Teams, Gmail, Twilio. The body’s times are in UTC, and the message shows them in Europe/Paris: replace Europe/Paris with the time zone you want, such as your workspace’s.
Make example
Section titled “Make example”This scenario posts each alert to a Slack channel, with one route per event.
-
Webhooks › Custom webhook. Click Create a webhook and name it
Klozeo alerts. -
In the same dialog, turn on Advanced settings, click Create a data structure, then Generate, and paste the
source.recoveredbody below. Click Generate, then Save in both dialogs. Make then knows every field without waiting for a first alert. Copy the webhook’s address (https://hook.eu1.make.com/...): it’s the Klozeo webhookurl.{"event": "source.recovered","payload": {"incident_id": "6f1c2a4e-0d8b-4c1e-9a57-3b2f6c1d9e10","api_key": { "id": "KEY_ID", "name": "Make: website form" },"workspace": { "id": "WORKSPACE_ID", "name": "Acme" },"silent_since": "2026-11-16T08:12:00Z","opened_at": "2026-11-16T14:15:00Z","recovered_at": "2026-11-16T16:40:00Z","max_gap_hours": 6},"time": 1794847200} -
Add a Router after the webhook, with two routes:
Route Filter Slack › Send a Message, text Stopped eventEqual tosource.silent:red_circle: No lead received through *{{1.payload.api_key.name}}* since {{formatDate(1.payload.silent_since; "DD/MM/YYYY HH:mm"; "Europe/Paris")}}{{if(1.payload.workspace.name; " · "; "")}}{{1.payload.workspace.name}}Back eventEqual tosource.recovered:large_green_circle: Leads are arriving again through *{{1.payload.api_key.name}}* since {{formatDate(1.payload.recovered_at; "DD/MM/YYYY HH:mm"; "Europe/Paris")}}{{if(1.payload.workspace.name; " · "; "")}}{{1.payload.workspace.name}} -
Turn the scenario on, scheduled Immediately as data arrives.
1. is the webhook module’s number. Map the fields from the panel rather than typing them if yours differs. The texts show times in Europe/Paris: replace "Europe/Paris" with the time zone you want, such as your workspace’s.
Test it
Section titled “Test it”You don’t have to wait for a real outage:
- Create a test key with the write scope and send one lead with it (
POST /leads). This key only sends leads: the requests below still use your full key. - Set an alert on that key with
"max_gap_hours": 1and today, in the workspace’s time zone, among itsactive_days. - About an hour later, within 15 more minutes,
source.silentarrives. - Send another lead with the test key:
source.recoveredfollows within 15 minutes. - Delete the test lead and revoke the test key. Revoking a key ends its silence without an event.
GET /webhooks/deliveries shows each delivery and the response your URL returned.