Skip to content

Test an alert channel

POST
/api/v1/alerts/channels/test
curl --request POST \
--url https://example.com/api/v1/alerts/channels/test \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "config": {}, "id": 1, "type": "example" }'

Delivers a test notification through the posted channel config. Secrets left as “***” are merged from the stored channel named by id.

Request body

Media typeapplication/json
object
config
object
id
integer
type
string
Examplegenerated
{
"config": {},
"id": 1,
"type": "example"
}

OK

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Bad request

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Unauthorized

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Forbidden

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Delivery failed

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}

Alerts disabled

Media typeapplication/json
object
code
string
error
string
Examplegenerated
{
"code": "example",
"error": "example"
}