Alert channels

Authentication
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint

GET
https://api.monitoraweb.com/v1/alert-channels

Request example

curl --location --request GET 'https://api.monitoraweb.com/v1/alert-channels' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'

Parameters

Name
Type
Description
search
optional string
Search query.
search_by
optional string
Search by. Possible values are: name for Name. Defaults to: name.
type
optional string
Type. Possible values are: email, sms, phone_call, webhook, slack, teams, discord, flock, telegram, mattermost, googlechat, pushover, pagerduty, whatsapp, web_push, mobile_push.
sort_by
optional string
Sort by. Possible values are: id for Date created, name for Name. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Descending. Defaults to: desc.
per_page
optional integer
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show

API endpoint

GET
https://api.monitoraweb.com/v1/alert-channels/{id}

Request example

curl --location --request GET 'https://api.monitoraweb.com/v1/alert-channels/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint

POST
https://api.monitoraweb.com/v1/alert-channels

Request example

curl --location --request POST 'https://api.monitoraweb.com/v1/alert-channels' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'type={type}' \
--data-urlencode 'value={value}'

Parameters

Name
Type
Description
name
required string
Name.
type
required string
Type. Possible values are: email for Email, sms for SMS, phone_call for Phone call, webhook for Webhook, slack for Slack, teams for Microsoft Teams, discord for Discord, telegram for Telegram, whatsapp for WhatsApp, mobile_push for Mobile app.
value[email]
optional string
Email.
value[phone]
optional string
Phone.
value[webhook_url]
optional string
Webhook URL.
value[slack_url]
optional string
Slack webhook URL.
value[discord_url]
optional string
Discord webhook URL.
value[teams_url]
optional string
Microsoft Teams webhook URL.
value[telegram_token]
optional string
Telegram token.
value[telegram_chat_id]
optional string
Telegram chat ID.
Update

API endpoint

PUT PATCH
https://api.monitoraweb.com/v1/alert-channels/{id}

Request example

curl --location --request PUT 'https://api.monitoraweb.com/v1/alert-channels/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'

Parameters

Name
Type
Description
name
optional string
Name.
type
optional string
Type. Possible values are: email for Email, sms for SMS, phone_call for Phone call, webhook for Webhook, slack for Slack, teams for Microsoft Teams, discord for Discord, telegram for Telegram, whatsapp for WhatsApp, mobile_push for Mobile app.
value[email]
optional string
Email.
value[phone]
optional string
Phone.
value[webhook_url]
optional string
Webhook URL.
value[slack_url]
optional string
Slack webhook URL.
value[discord_url]
optional string
Discord webhook URL.
value[teams_url]
optional string
Microsoft Teams webhook URL.
value[telegram_token]
optional string
Telegram token.
value[telegram_chat_id]
optional string
Telegram chat ID.
Delete

API endpoint

DELETE
https://api.monitoraweb.com/v1/alert-channels/{id}

Request example

curl --location --request DELETE 'https://api.monitoraweb.com/v1/alert-channels/{id}' \
--header 'Authorization: Bearer {api_key}'
Verifying webhook alerts

Every alert we send to a webhook channel is signed. The receiving endpoint is public, so anyone who sees it in a log or a screenshot could post a fake outage to it. Checking the signature tells you the alert came from us, that nobody changed it on the way, and that it is not an old one being replayed.

Headers we send

X-MonitoraWeb-Timestamp: 1758402000
X-MonitoraWeb-Signature: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08

How the signature is built

signature = HMAC_SHA256(signing_secret, timestamp + "." + raw_request_body)

Your signing secret is on the alert channel screen, and in the signing_secret field of this API. Sign the raw body exactly as it arrived: re-encoding the JSON changes the bytes and the signature will not match.

Example in PHP

$cuerpo    = file_get_contents('php://input');
$instante  = $_SERVER['HTTP_X_MONITORAWEB_TIMESTAMP'] ?? '';
$firma     = $_SERVER['HTTP_X_MONITORAWEB_SIGNATURE'] ?? '';
$secreto   = '{signing_secret}';

// Un aviso viejo reenviado no vale, aunque la firma cuadre.
if (abs(time() - (int) $instante) > 300) {
    http_response_code(400);
    exit;
}

$esperada = hash_hmac('sha256', $instante . '.' . $cuerpo, $secreto);

if (! hash_equals($esperada, $firma)) {
    http_response_code(401);
    exit;
}

We sign again on every attempt, so a retry that arrives an hour later still passes the freshness check. Rotating the secret takes effect immediately: alerts already queued go out with the secret they were queued with.