Add an alert channel
const url = 'https://app.hostrepute.com/api/v1/alerts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"email","settings":{"email":"[email protected]"},"frequency":"once_on_listed_delisted","is_active":true,"alert_group_uuids":["01a178db-d7b4-730d-82fa-5fb952d888e4"]}'};
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://app.hostrepute.com/api/v1/alerts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "email", "settings": { "email": "[email protected]" }, "frequency": "once_on_listed_delisted", "is_active": true, "alert_group_uuids": [ "01a178db-d7b4-730d-82fa-5fb952d888e4" ] }'Add an alert channel for your team. Send the one settings field that matches type. Your plan decides which channel types you can use and how many channels a team can have.
Needs the alert:create ability.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The kind of channel. Professional plans can use email, slack and telegram; Business and Enterprise plans can also use discord, pagerduty, pushover and webhook.
Example
emailWhere the channel sends alerts. Send the one field that matches type.
object
A Slack incoming webhook URL on hooks.slack.com. Required when type is slack.
Example
nullThe Telegram chat ID to send alerts to. Required when type is telegram.
Example
nullA Discord webhook URL on discord.com. Required when type is discord.
Example
nullThe integration (routing) key of a PagerDuty Events API v2 integration. Required when type is pagerduty.
Example
nullYour Pushover user key. Required when type is pushover.
Example
nullThe public HTTPS URL HostRepute posts alerts to. Required when type is webhook.
Example
nullThe secret HostRepute signs webhook alerts with, 32 to 255 characters. Required when type is webhook.
Example
nullExample
{}Which blocklist alerts the channel gets: once_on_listed_delisted when a domain or IP is listed and again when it is removed, or once_per_check_while_listed only when it is listed. Other alerts aren’t affected.
Example
once_on_listed_delistedWhether the channel sends alerts. Defaults to true.
Example
trueThe UUIDs of the delivery hours this channel follows. List them with GET /api/v1/alert-groups.
Example
[ "01a178db-d7b4-730d-82fa-5fb952d888e4"]Responses
Section titled “Responses”object
object
object
object
object
object
object
object
object
object
object
Example
{ "data": { "uuid": "01a178db-d7f0-74b9-a3c6-8e1d5f2b9c40", "type": "email", "frequency": "once_on_listed_delisted", "is_active": true, "last_sent_at": null, "alert_groups": [ { "uuid": "01a178db-d7b4-730d-82fa-5fb952d888e4", "name": "Business hours", "slug": "business-hours", "timezone": "America/New_York", "schedule": { "mon": { "enabled": true, "start": "08:00", "end": "18:00" }, "tue": { "enabled": true, "start": "08:00", "end": "18:00" }, "wed": { "enabled": true, "start": "08:00", "end": "18:00" }, "thu": { "enabled": true, "start": "08:00", "end": "18:00" }, "fri": { "enabled": true, "start": "08:00", "end": "18:00" }, "sat": { "enabled": false, "start": "08:00", "end": "18:00" }, "sun": { "enabled": false, "start": "08:00", "end": "18:00" } }, "is_default": false, "created_at": "2026-07-15T13:02:19.000000Z", "updated_at": "2026-07-15T13:02:19.000000Z" } ], "created_at": "2026-10-26T15:37:16.000000Z", "updated_at": "2026-10-26T15:37:16.000000Z" }}Invalid input or plan limit reached
object
object
Example
{ "message": "You've reached your plan's alert destination limit. Upgrade to add more.", "errors": { "type": [ "You've reached your plan's alert destination limit. Upgrade to add more." ] }}
