Test Notification Channel
Delivers one sample notification to a single channel, as you send it (saved or not), and reports the synchronous pass/fail inline — the "Send test" button on the alert authoring form. Use it to confirm a webhook / Slack / Discord URL or email address actually receives a notification before arming a rule. The channel is validated with the same rules Create Alert enforces on save, then delivered synchronously.
Delivery reuses the exact payload shapes the alert worker produces, so a passing test exercises the real wire contract: webhooks receive a JSON body (HMAC-SHA256-signed as X-Ngris-Signature: sha256=<hex> when a secret is supplied), Slack receives {"text": ...}, Discord receives {"content": ...}, and email is sent via the deployment's SMTP sender. Webhook / Slack / Discord URLs are POSTed through an SSRF-safe client, so internal, loopback, and link-local addresses are rejected.
Unlike the per-rule Test Alert route (which stamps an async test on an existing rule), this endpoint takes the channel in the request body and returns an immediate result.
Plan-gated: requires the endpoints:write permission (as create does) AND the metric_alerts entitlement (403 without either). Signing with a saved secret (rule_uuid) also needs endpoints:read, as reading the rule does.
Request body
email, webhook, slack, discord. Any other value returns sent: false with an "unsupported channel type" message.email target must contain @; webhook target must be an https:// URL; slack target is a Slack Incoming Webhook URL (https://hooks.slack.com/...); discord target is a Discord webhook URL (https://discord.com/api/webhooks/...). Leading/trailing whitespace is trimmed.X-Ngris-Signature: sha256=<hex> — letting a verifying receiver pass the test exactly as a real fire. Ignored for slack/discord/email. **** — the placeholder reads answer for a saved secret — is not a secret: with a rule_uuid it signs the test with that rule's saved secret (below); without one the test is not sent and the answer is sent: false with an error asking you to re-enter the secret.secret is **** (testing a channel of a rule you are editing). The test is signed with the secret of that rule's channel with the same type and target, else of its channel at channel_index when that one has the same type. With no match, the answer is sent: false with an error asking you to re-enter the secret. A rule that is not in your account answers 404.rule_uuid. The channel's 0-based position in the rule's notify_channels, matched when its URL was edited (no saved channel has the same target).Response (200 OK)
A delivery outcome — both success and a failed delivery return HTTP 200; the transport succeeded, only the delivery may not have. A transport-level failure (e.g. SSRF block, connection error, non-2xx/3xx from the endpoint) is reported as sent: false with the reason in error.
true if the sample notification was delivered successfully (any 2xx/3xx for webhook/slack/discord; SMTP accepted for email).sent is false. Human-readable reason, e.g. a validation message, an SSRF/connection failure, or "endpoint returned HTTP 500: ...".Errors
sent: false, not a 400.)endpoints:write permission (or endpoints:read when rule_uuid is used), or plan doesn't include metric_alerts.secret is **** and rule_uuid names no rule in your account.