Notification channels
Test Notification Channel
Tests a notification channel configuration. Optionally sends a real test message.
POST /api/notification-channels/test
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | Yes | - | webhook, slack, discord, pagerduty, pushover, opsgenie |
config | object | Yes | {} | Channel config with secrets |
organizationId | number | No | from session | Organization scope |
customerId | number | No | null | Customer scope |
websiteId | number | No | null | Website scope |
channelId | number | No | - | Existing channel being tested. A header in config with value null or "" then uses that channel's stored value (needs edit access to the channel). Without it such a header is left out. |
dryRun | boolean | No | false | If true, validates only (no actual send) |
Example (cURL)
curl -X POST "$BASE_URL/api/notification-channels/test" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "webhook",
"config": {
"url": "https://deinkunde.com/webhook",
"method": "POST",
"timeout": 15
},
"dryRun": false
}'Response
{
"success": true,
"mode": "send",
"message": "Webhook delivered successfully",
"validation": { "ok": true, "errors": [], "warnings": [] },
"request": { "url": "https://deinkunde.com/webhook", "method": "POST", "timeoutSeconds": 15, "headers": {}, "bodyPreview": "...", "bodySize": 256 },
"response": { "reachable": true, "ok": true, "statusCode": 200, "statusText": "OK", "durationMs": 150, "headers": {}, "bodyPreview": null, "bodySize": null }
}HTTP 429 responses are treated as "reachable but rate-limited" (success: true).
Common errors
401 Unauthorizedwhen not authenticated400 Bad Requestwhen config is invalid for the given type400 Bad Requestwhen a custom header inconfig.headers/config.webhookHeadersis not allowed:HostanswerswebhookHostHeaderForbidden; a name that is not a valid HTTP header name, a value with a line break or another control character, and the headers the sender sets itself (Content-Length,Transfer-Encoding,Connection,Keep-Alive,Upgrade,TE,Trailer,Expect,Proxy-Connection) answerinvalidRequestBodywith the header inissues[].path.Authorizationis allowed.