Alert channels
POST /darkcrawl/v1/channels
Copy page
Create an alert channel: a webhook, a Slack address or an email list.
POST /
Authentication: your key as a bearer token.
Body
| Field | Type | Required | Default |
|---|---|---|---|
kind | string Values: webhook, slack, email | Required | |
name | string | Required | |
digestMinutes | integer | Optional | 0 |
enabled | boolean | Optional | true |
includeText | boolean | Optional | false |
recipients | string[] | null | Optional | |
url | string | null | Optional |
Request
curl -X POST https://api.darkcrawl.dev/darkcrawl/v1/channels \
-H "Authorization: Bearer $DARKCRAWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"webhook","name":"Ops webhook","url":"https://hooks.example.com/darkcrawl"}'import os
import requests
resp = requests.post(
"https://api.darkcrawl.dev/darkcrawl/v1/channels",
headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
json={
"kind": "webhook",
"name": "Ops webhook",
"url": "https://hooks.example.com/darkcrawl",
},
timeout=330,
)
print(resp.json())const resp = await fetch("https://api.darkcrawl.dev/darkcrawl/v1/channels", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"kind": "webhook",
"name": "Ops webhook",
"url": "https://hooks.example.com/darkcrawl"
}),
signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());Response
Status 200.
{
"id": "01K0EXAMPLECHANNEL0000000A",
"name": "Ops webhook",
"kind": "webhook",
"urlHint": "https://hooks.example.com/…rawl",
"secretHint": "whsec_…LE0=",
"recipients": [],
"digestMinutes": 0,
"includeText": false,
"enabled": true,
"createdAt": "2026-11-26T10:00:00.000000+00:00",
"updatedAt": "2026-11-26T10:00:00.000000+00:00",
"lastDeliveryAt": null,
"lastError": null,
"secret": "whsec_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE0="
}Errors
| Code | Status |
|---|---|
BAD_REQUEST | 400 |
SECRETS_UNAVAILABLE | 503 |
BLOCKLIST_UNAVAILABLE | 503 |
What each code means, and what to do about it: Errors.
Notes
- A webhook's reply holds its signing
secret, once. Keep it: it cannot be read again, andPOST /darkcrawl/v1/channels/{channel_id}/secretmakes a new one. The address and the secret are stored sealed. A reply shows onlyurlHintandsecretHint. - The address must be
httpsand public: never an onion, a private or local address, or one with user info. The name takes letters, digits, spaces and. _ -. - An email channel takes
recipients, who must be active members of your company. digestMinutesabove zero batches the events of a window into one message.includeTextisfalseunless you turn it on, and a channel then gets the type, name, address and counts, never page lines.- Without a way to store the address, a webhook or Slack channel is
503 SECRETS_UNAVAILABLE, and nothing is created. Webhooks shows what a webhook channel is sent.