Create channel
POST
/alerts/channels
Authentication
Bearer Token (hu_api_key)
Request Body required
application/jsonname
string
REQUIRED
type
string
REQUIRED
Enum:
slack, slack_app, discord, webhook, telegram, email, teams, sms, imessage, phone, pagerduty, opsgenieconfig
object
REQUIRED
is_default
boolean
REQUIRED
Responses
201
Channel created
No response body
curl -X POST 'https://happyuptime.com/api/v1/alerts/channels' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "type": "slack", "config": {}, "is_default": false}'
const response = await fetch('https://happyuptime.com/api/v1/alerts/channels', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "string", "type": "slack", "config": {}, "is_default": false })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://happyuptime.com/api/v1/alerts/channels', headers=headers, json={ "name": "string", "type": "slack", "config": {}, "is_default": false})print(response.json())
API Playground
Try this endpoint
POST
/alerts/channels