コンテンツにスキップ

Send one test notification through a channel, now (ADR-192).

POST
/api/v1/notification-channels/{id}/test
curl --request POST \
--url https://example.com/api/v1/notification-channels/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/test \
--header 'Authorization: Bearer <token>'

The template preview’s sample alert, rendered with this channel’s template, with [TEST] at the start of the subject. A webhook or PagerDuty body also carries "test": true; a JSM or email body, which is text, starts with a line saying it is a test. Sent once, with no retry, and recorded in the delivery log like any other delivery. A PagerDuty or JSM channel then closes the incident it opened, so the on-call is notified once and nothing is left open. Works on a disabled channel, so one can be checked before it is switched on.

id
required
string format: uuid

Channel id

The test was attempted; whether the channel accepted it is in the body

Media typeapplication/json

What a test send did (ADR-192). A failure is reported in the 200 response, as the template preview does: the request worked, and what it found out is that the channel does not.

object
closed

Whether the incident the test opened was closed again. null for a channel kind with no incident (webhook, email), and when the delivery itself failed.

boolean | null
delivered
required

Whether the channel accepted the test notification.

boolean
error

The first failure, as the channel reported it. Never contains the channel’s URL.

string | null
Examplegenerated
{
"closed": true,
"delivered": true,
"error": "example"
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks ManageSystem

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No such channel

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

This core has no write side (skeleton mode)

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}