Skip to content

Add an alert channel

POST
/api/v1/alerts
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.

Media typeapplication/json
object
type
required

The kind of channel. Professional plans can use email, slack and telegram; Business and Enterprise plans can also use discord, pagerduty, pushover and webhook.

string
Allowed values: email slack telegram discord pagerduty pushover webhook

Example

email
settings
required

Where the channel sends alerts. Send the one field that matches type.

object
email

The email address to send alerts to. Required when type is email.

string
slack_webhook_url

A Slack incoming webhook URL on hooks.slack.com. Required when type is slack.

string

Example

null
telegram_chat_id

The Telegram chat ID to send alerts to. Required when type is telegram.

string

Example

null
discord_webhook_url

A Discord webhook URL on discord.com. Required when type is discord.

string

Example

null
pagerduty_routing_key

The integration (routing) key of a PagerDuty Events API v2 integration. Required when type is pagerduty.

string

Example

null
pushover_user_key

Your Pushover user key. Required when type is pushover.

string

Example

null
webhook_url

The public HTTPS URL HostRepute posts alerts to. Required when type is webhook.

string

Example

null
webhook_secret

The secret HostRepute signs webhook alerts with, 32 to 255 characters. Required when type is webhook.

string

Example

null

Example

{
"email": "[email protected]"
}
frequency
required

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.

string
Allowed values: once_on_listed_delisted once_per_check_while_listed

Example

once_on_listed_delisted
is_active

Whether the channel sends alerts. Defaults to true.

boolean

Example

true
alert_group_uuids

The UUIDs of the delivery hours this channel follows. List them with GET /api/v1/alert-groups.

Array<string>

Example

[
"01a178db-d7b4-730d-82fa-5fb952d888e4"
]
Media typeapplication/json
object
data
object
uuid
string
type
string
frequency
string
is_active
boolean
last_sent_at
string
nullable
alert_groups
Array<object>
object
uuid
string
name
string
slug
string
timezone
string
schedule
object
mon
object
enabled
boolean
start
string
end
string
tue
object
enabled
boolean
start
string
end
string
wed
object
enabled
boolean
start
string
end
string
thu
object
enabled
boolean
start
string
end
string
fri
object
enabled
boolean
start
string
end
string
sat
object
enabled
boolean
start
string
end
string
sun
object
enabled
boolean
start
string
end
string
is_default
boolean
created_at
string
updated_at
string
created_at
string
updated_at
string

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

Media typeapplication/json
object
message
string
errors
object
type
Array<string>

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