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://phpuptime.lunatio.com/api/v1/alert-channels

Request example

curl --location --request GET 'https://phpuptime.lunatio.com/api/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.
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://phpuptime.lunatio.com/api/v1/alert-channels/{id}

Request example

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

API endpoint

POST
https://phpuptime.lunatio.com/api/v1/alert-channels

Request example

curl --location --request POST 'https://phpuptime.lunatio.com/api/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, flock for Flock, telegram for Telegram, mattermost for Mattermost.
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[flock_url]
optional string
Flock webhook URL.
value[teams_url]
optional string
Microsoft Teams webhook URL.
value[mattermost_url]
optional string
Mattermost webhook URL.
value[telegram_token]
optional string
Telegram token.
value[telegram_chat_id]
optional string
Telegram chat ID.
Update

API endpoint

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

Request example

curl --location --request PUT 'https://phpuptime.lunatio.com/api/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, flock for Flock, telegram for Telegram, mattermost for Mattermost.
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[flock_url]
optional string
Flock 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://phpuptime.lunatio.com/api/v1/alert-channels/{id}

Request example

curl --location --request DELETE 'https://phpuptime.lunatio.com/api/v1/alert-channels/{id}' \
--header 'Authorization: Bearer {api_key}'