Set a webhook
Creates or updates the group’s webhook. The first create returns `201` with `signingSecret` — the secret is shown only in this response, store it. An update returns `200` and keeps the secret; omitted fields stay unchanged.
PUT/v1/webhooks/{groupId}PUTSet a webhookcurl -X PUT "https://api.darkradar.com/api/public/v1/webhooks/64b1f0c2a9e4d21f8c3b9a10" \
-H "x-api-key: $DARKRADAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://darkradar.com/darkradar-webhook","events":["leak.created","scan.failed"],"severities":["critical","high"]}'Response
{
"success": true,
"message": "OK",
"data": {
"webhook": {
"groupId": "64b1f0c2a9e4d21f8c3b9a10",
"url": "•••• https://darkradar.com/…hook",
"events": [
"leak.created",
"scan.finished",
"scan.failed"
],
"severities": [
"critical",
"high"
],
"isActive": true,
"lastDelivery": {
"at": "2026-09-19T15:33:20.772Z",
"ok": true,
"type": "scan.finished",
"reason": null
},
"createdAt": "2026-09-19T15:33:20.631Z",
"updatedAt": "2026-09-19T15:33:20.673Z"
}
}
}Path parameters
| Fields | Values |
|---|---|
groupId · string · required | Protection resource group id (24 hex chars) · Example: 64b1f0c2a9e4d21f8c3b9a10 |
Request body
| Fields | Values |
|---|---|
url · string · optional | Delivery address: https and publicly reachable (private networks, localhost and cloud metadata addresses are rejected). Required when creating. |
events · string[] · optional | Events to subscribe to. Defaults to leak.created on create; unchanged on update if omitted. · Values: leak.created, scan.finished, scan.failed, hunter.finding.created |
severities · string[] · optional | Severity filter for leak events. All severities on create if omitted; unchanged on update. · Values: critical, high, medium, low, info, unknown |
isActive · boolean · optional | Whether delivery is on (no events are sent while off). |
Responses
200Success201Created400Address not accepted (not https, private network / localhost / cloud metadata) or unknown event/severity401Key missing, invalid, expired or revoked403Insufficient scope, no API access in plan, or product not enabled404Record not found or not owned by this key’s firm408The request exceeded its maximum response time429Rate limit exceeded; retry after a minuteResponse limits
Rate limit500 requests per 15 min · per IP