Skip to content

Alert channels

POST /darkcrawl/v1/channels/{channel_id}/secret

Copy page

Make a new signing secret for a webhook channel.

POST /darkcrawl/v1/channels/{channel_id}/secret

Authentication: your key as a bearer token.

Path parameters

FieldTypeRequiredDefault
channel_idstringRequired

Request

bash
curl -X POST https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID/secret \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY"

Response

Status 200.

Response
{
  "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

CodeStatus
BAD_REQUEST400
NOT_FOUND404
BLOCKLIST_UNAVAILABLE503
SECRETS_UNAVAILABLE503

What each code means, and what to do about it: Errors.

Notes

  • The new secret is 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.