Skip to content

Create an alert channel

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

Creates a new notification channel. Config is validated against the channel type registry.

Request body

Media typeapplication/json
object
config
object
enabled
boolean
environment_id
integer
info
string
name
string
type
string
Examplegenerated
{
"config": {},
"enabled": true,
"environment_id": 1,
"info": "example",
"name": "example",
"type": "example"
}

Created

Media typeapplication/json
object
config
object
created_at
string
enabled
boolean
environment_id
integer
id
integer
info
string
name
string
type
string
updated_at
string
Examplegenerated
{
"config": {},
"created_at": "example",
"enabled": true,
"environment_id": 1,
"id": 1,
"info": "example",
"name": "example",
"type": "example",
"updated_at": "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"
}

Conflict

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"
}