All docs
On this page

Create channels in the dashboard under Notifications, or with POST /v1/notifications/channels. Custom channel deliveries are signed.

Channel types

channel_typeConfigure withDelivery format
slackurl at hooks.slack.com/services/…Slack blocks
discordurl at discord.com/api/webhooks/…Embeds
telegramconfig.chat_id and secrets.bot_tokenBot API sendMessage
feishuurl at open.feishu.cn/open-apis/bot/v2/hook/…; optional config.keyword and secrets.sign_secretInteractive card
wecomurl at qyapi.weixin.qq.com/cgi-bin/webhook/send…Markdown
dingtalkurl at oapi.dingtalk.com/robot/send…; optional secrets.sign_secretMarkdown
emailconfig.recipients, limited to team member addressesEmail via Resend
customurl, config.auth_type, and credentialsJSON envelope with an HMAC signature

Preset channel URLs must match both the allowed hostname and path prefix.

Custom channels authenticate with a preset config.auth_type instead of arbitrary headers:

auth_typeRequired secretsSent as
none, the defaultnoneno Authorization header
bearertokenAuthorization: Bearer <token>
basicusername and passwordAuthorization: Basic <base64>

secrets are stored encrypted and never returned by any read endpoint. Each team is limited to 20 channels.

Events

EventFires when
crawl.starteda crawl job is accepted and queued
crawl.completed / crawl.faileda crawl job reaches a terminal state
monitor.pagea monitor check observes new, changed, or removed
monitor.check.completedevery monitor check finishes, including same and error

notification.test is sent only by the Test action or channel_test.

crawl.page is available only on request-level crawl webhooks.

Custom channel signatures

Every delivery carries X-LeanCrawl-Event with the event type and X-LeanCrawl-Delivery with the delivery ID used by the resend endpoint.

X-LeanCrawl-Signature: t=<unix_seconds>,v1=<hmac-sha256-hex>

Sign {t}.{rawBody} with the original request body. Reject timestamps more than 300 seconds old. Do not re-serialize the JSON before verification.

Node.js

import { createHmac, timingSafeEqual } from 'node:crypto';

const parts = Object.fromEntries(sig.split(',').map((p) => p.split('=', 2)));
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) throw new Error('stale');

const expected = createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest();
const received = Buffer.from(parts.v1, 'hex');
if (received.length !== expected.length || !timingSafeEqual(received, expected)) {
  throw new Error('invalid signature');
}

Python

import hashlib, hmac, time

parts = dict(p.split('=', 1) for p in sig.split(','))
signed = f"{parts['t']}.{raw_body}".encode()
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
assert abs(time.time() - int(parts['t'])) <= 300
assert hmac.compare_digest(expected, parts['v1'])

Payload

Custom channels receive the envelope {success, type, id, data, error}. data is event-specific. Preset channels receive their native message format rendered from the same event data. Payloads may include content fragments from the target page. Render them as text, never as HTML.

monitor.page data:

FieldNotes
urlmonitored page URL
statusnew, changed, or removed
check_idfetch the full diff with GET /v1/monitor/{id}/checks/{check_id}/diff
snapshot_id / prev_snapshot_idcompared snapshots; retrieve content with GET /v1/monitor/{id}/snapshots/{snapshotId} before it expires
excerptfirst 500 characters of new content; null for removed
diff_excerptchange summary {a, d, l, tr}; line types a, d, and c mean added, deleted, and context

crawl.* payloads carry the job identity: job_id, url, status, page counts, and credit_cost. A job that ends partial emits crawl.completed with data.truncated_by_credits: true. Its results are incomplete.

Request-level crawl webhooks

POST /v1/crawl accepts webhook: {url, events, secret?} for that job. It supports crawl.page, which managed channels do not. Supply your own secret to verify signatures; an omitted secret is generated but never returned. Request-level deliveries cannot be listed or resent. Use managed channels for persistent notifications. If both target the same URL, it receives both deliveries.

Retries

Failed deliveries retry after 60 seconds, 300 seconds, and 900 seconds. After the last attempt the delivery is marked dead. Resend it from the dashboard or with POST /v1/notifications/channels/{channelId}/deliveries/{deliveryId}/resend. A Retry-After response header is honored. Disabling a channel marks its in-flight deliveries dead, and deleting a channel keeps deliveries for audit.

Managing channels via API

Authenticate with Authorization: Bearer sk-….

RouteNotes
GET /v1/notifications/channelsList channels; secrets are not returned
POST /v1/notifications/channelsCreate a channel; a custom channel's response includes signing_secret once
PATCH /v1/notifications/channels/{id}Update settings; changing url retargets pending deliveries
POST /v1/notifications/channels/{id}/rotateRotate a custom channel's signing secret; returned once
DELETE /v1/notifications/channels/{id}Delete the channel and detach monitors; delivery history remains
GET /v1/notifications/channels/{id}/deliveriesMost recent 50 deliveries, without pagination
POST /v1/notifications/channels/{id}/deliveries/{deliveryId}/resendRetry a failed or dead delivery now
POST /v1/notifications/channels/{id}/testSend a test event, up to 10 per hour per team

PATCH supports name, url, events, status, config, and secrets. Use name: null to clear the name. Secrets merge by key: an empty string preserves the stored value, and an omitted key removes it.

The same surface is available from MCP as channel_list, channel_create, channel_update, channel_rotate, channel_deliveries, channel_resend, channel_delete, and channel_test.

Rotating secrets

POST /v1/notifications/channels/{id}/rotate replaces the signing_secret without changing its ID or monitor attachments.

The old secret stops working immediately. Update your receiver with the new secret before retrying failed deliveries. Retries and resends use the current secret.