Monitors API
Manage your monitors using simple HTTP API.

Do you need help with the integration?

Let us know at [email protected].

Obtaining an API token

get
https://betteruptime.com
/api/v2/monitors
Listing all existing monitors
Example cURL
Example: Filter by URL
1
curl --request GET \
2
--url https://betteruptime.com/api/v2/monitors \
3
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
1
curl --request GET \
2
--url https://betteruptime.com/api/v2/monitors?url=https://google.com \
3
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
get
https://betteruptime.com
/api/v2/monitors/:monitor_id
Getting a single monitor
Example cURL
1
curl --request GET \
2
--url https://betteruptime.com/api/v2/monitors/123456789 \
3
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
get
https://betteruptime.com
/api/v2/monitors/:monitor_id/response-times
Getting monitor's response times
Example cURL
1
curl --request GET \
2
--url https://betteruptime.com/api/v2/monitors/123456789/response-times \
3
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
get
https://betteruptime.com
/api/v2/monitors/:monitor_id/sla
Getting monitor's availability summary
Example cURL
1
curl --request GET \
2
--url https://betteruptime.com/api/v2/monitors/123456789/sla?from=2021-01-26&to=2021-01-27 \
3
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
post
https://betteruptime.com
/api/v2/monitors
Creating a new monitor
Example cURL
1
curl --request POST \
2
--url https://betteruptime.com/api/v2/monitors \
3
--header 'Authorization: Bearer YOUR_API_TOKEN' \
4
--header 'Content-Type: application/json' \
5
--data '{
6
"monitor_type": "status",
7
"url": "https://facebook.com",
8
"pronounceable_name": "Facebook homepage",
9
"email": true,
10
"sms": true,
11
"call": true,
12
"check_frequency": 30,
13
"request_headers": [
14
{
15
"name": "X-Custom-Header",
16
"value": "custom header value"
17
}
18
]
19
}'
Copied!
patch
https://betteruptime.com
/api/v2/monitors/:monitor_id
Updating an existing monitor
Example cURL — Change check_frequency only
Example cURL - Manage Custom Request Headers
1
curl --request PATCH \
2
--url https://betteruptime.com/api/v2/monitors/225493 \
3
--header 'Authorization: Bearer YOUR_API_TOKEN' \
4
--header 'Content-Type: application/json' \
5
--data '{
6
"check_frequency": 60
7
}'
Copied!
1
curl --request PATCH \
2
--url https://betteruptime.com/api/v2/monitors/225493 \
3
--header 'Authorization: Bearer YOUR_API_TOKEN' \
4
--header 'Content-Type: application/json' \
5
--data '{
6
"request_headers": [
7
{ "name": "X-Create-New-Header", "value": "New Header Value" },
8
{ "id": "123", "name": "X-Update-Existing-Header-Name" },
9
{ "id": "456", "_destroy": true }
10
]
11
}'
Copied!
delete
https://betteruptime.com
/api/v2/monitors/:monitor_id
Deleting an existing monitor
Example cURL
1
curl --request DELETE \
2
--url https://betteruptime.com/api/v2/monitors/225493 \
3
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
Last modified 4d ago