Alert channels
POST /darkcrawl/v1/channels/{channel_id}/secret
Copy page
Make a new signing secret for a webhook channel.
POST /
Authentication: your key as a bearer token.
Path parameters
| Field | Type | Required | Default |
|---|---|---|---|
channel_id | string | Required |
Request
curl -X POST https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID/secret \
-H "Authorization: Bearer $DARKCRAWL_API_KEY"import os
import requests
resp = requests.post(
"https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID/secret",
headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
timeout=330,
)
print(resp.json())const resp = await fetch("https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID/secret", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
},
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-26T11:00:00.000000+00:00",
"lastDeliveryAt": null,
"lastError": null,
"secret": "whsec_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE0="
}Errors
| Code | Status |
|---|---|
BAD_REQUEST | 400 |
NOT_FOUND | 404 |
BLOCKLIST_UNAVAILABLE | 503 |
SECRETS_UNAVAILABLE | 503 |
What each code means, and what to do about it: Errors.
Notes
- The new
secretis in the reply, once, and the old one stops working at once. Give the new one to your receiver first. - Only a webhook channel has a signing secret, else
400 BAD_REQUEST. - An unknown id, and another company's channel, answer
404 NOT_FOUND.