Skip to Content
Uptimeify Docs
Notification channels

Test Notification Channel

Tests a notification channel configuration. Optionally sends a real test message.

POST /api/notification-channels/test

Request Body

FieldTypeRequiredDefaultDescription
typestringYes-webhook, slack, discord, pagerduty, pushover, opsgenie
configobjectYes{}Channel config with secrets
organizationIdnumberNofrom sessionOrganization scope
customerIdnumberNonullCustomer scope
websiteIdnumberNonullWebsite scope
channelIdnumberNo-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.
dryRunbooleanNofalseIf 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 Unauthorized when not authenticated
  • 400 Bad Request when config is invalid for the given type
  • 400 Bad Request when a custom header in config.headers / config.webhookHeaders is not allowed: Host answers webhookHostHeaderForbidden; 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) answer invalidRequestBody with the header in issues[].path. Authorization is allowed.

On this page