Create an alert channel
POST
/api/v1/alerts/channels
const url = 'https://example.com/api/v1/alerts/channels';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"config":{},"enabled":true,"environment_id":1,"info":"example","name":"example","type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “Responses”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"}