Skip to content

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.


  • 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 one source.recovered at 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.


You need:

  • an API key with the full scope, created by the workspace owner or an admin. Read and write keys get 403 on these routes;
  • the ID of the key to watch. GET /api-keys lists the workspace’s keys with their id.

Every request below sends the full key in the X-API-Key header.


Klozeo can suggest a gap from the key’s history:

Terminal window
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.


Terminal window
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.

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.

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.


Create a webhook that names both events. "*" never includes them: a webhook receives them only when its events lists them.

Terminal window
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.

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.

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.name is null when the workspace has no name.
  • silent_since is the last lead received before the silence, opened_at when Klozeo saw the gap passed. Times are in UTC.
  • source.recovered has the same fields plus recovered_at, the time of the first lead back. Its incident_id matches the source.silent it ends.
  • Delivery is at least once. Ignore a repeat with the X-Webhook-Event-ID header.

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.


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:

  1. In Klozeo alert, replace the path with a long random string.
  2. In Post to Slack, choose your Slack credential and the channel.
  3. 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.


This scenario posts each alert to a Slack channel, with one route per event.

  1. Webhooks › Custom webhook. Click Create a webhook and name it Klozeo alerts.

  2. In the same dialog, turn on Advanced settings, click Create a data structure, then Generate, and paste the source.recovered body 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 webhook url.

    {
    "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
    }
  3. Add a Router after the webhook, with two routes:

    Route Filter Slack › Send a Message, text
    Stopped event Equal to source.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 event Equal to source.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}}
  4. 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.


You don’t have to wait for a real outage:

  1. 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.
  2. Set an alert on that key with "max_gap_hours": 1 and today, in the workspace’s time zone, among its active_days.
  3. About an hour later, within 15 more minutes, source.silent arrives.
  4. Send another lead with the test key: source.recovered follows within 15 minutes.
  5. 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.