Skip to content

Alert channels

PATCH /darkcrawl/v1/channels/{channel_id}

Copy page

Change a channel. Only the fields you send change.

PATCH /darkcrawl/v1/channels/{channel_id}

Authentication: your key as a bearer token.

Path parameters

FieldTypeRequiredDefault
channel_idstringRequired

Body

FieldTypeRequiredDefault
digestMinutesinteger | nullOptional
enabledboolean | nullOptional
includeTextboolean | nullOptional
namestring | nullOptional
recipientsstring[] | nullOptional
urlstring | nullOptional

Request

bash
curl -X PATCH https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false,"digestMinutes":15}'

Response

Status 200.

Response
{
  "id": "01K0EXAMPLECHANNEL0000000A",
  "name": "Ops webhook",
  "kind": "webhook",
  "urlHint": "https://hooks.example.com/…rawl",
  "secretHint": "whsec_…LE0=",
  "recipients": [],
  "digestMinutes": 15,
  "includeText": false,
  "enabled": false,
  "createdAt": "2026-11-26T10:00:00.000000+00:00",
  "updatedAt": "2026-11-26T10:00:00.000000+00:00",
  "lastDeliveryAt": null,
  "lastError": null
}

Errors

CodeStatus
BAD_REQUEST400
NOT_FOUND404
BLOCKLIST_UNAVAILABLE503
SECRETS_UNAVAILABLE503

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

Notes

  • An email channel has no url, and only an email channel has recipients: sending the wrong one is 400 BAD_REQUEST.
  • A disabled channel's deliveries wait and age. Turn it on again, or send a new url, and the waiting ones go.
  • An unknown id, and another company's channel, answer 404 NOT_FOUND.