Heartbeat Groups API

Manage your heartbeat groups using a simple HTTP API.

Do you need help with the integration?

Let us know at [email protected].

Obtaining an API token

Please, see Obtaining an API token.

get
Listing all existing heartbeat groups

https://betteruptime.com/api/v2/heartbeat-groups
Returns a list of all your heartbeat groups.
Request
Response
Request
Headers
Authorization
required
string
Bearer YOUR_API_TOKEN
Response
200: OK
Returns list of existing monitor groups
{
"data": [
{
"id": "123456",
"type": "hearbeat_group",
"attributes": {
"name": "Backend services",
"sort_index": 0,
"created_at": "2020-10-03T20:20:43.547Z",
"updated_at": "2020-10-03T20:20:43.547Z",
"paused": false
}
}
],
"pagination": {
"first": "https://betteruptime.com/api/v2/monitor-groups?page=1",
"last": "https://betteruptime.com/api/v2/monitor-groups?page=1",
"prev": null,
"next": null
}
}
Example cURL
Example cURL
curl --request GET \
--url https://betteruptime.com/api/v2/heartbeat-groups \
--header 'Authorization: Bearer YOUR_API_TOKEN'

get
Getting a single heartbeat group

https://betteruptime.com/api/v2/heartbeat-groups/:heartbeat_group_id
Returns an existing heartbeat group.
Request
Response
Request
Path Parameters
heartbeat_group_id
required
string
The ID of your heartbeat group
Headers
Authorization
required
string
Bearer YOUR_API_TOKEN
Response
200: OK
Returns an existing heartbeat group
{
"data": {
"id": "123456",
"type": "heartbeat_group",
"attributes": {
"name": "Backend services",
"sort_index": 0,
"created_at": "2020-09-18T17:20:42.514Z",
"updated_at": "2020-09-18T17:21:27.251Z",
"paused": false
}
}
}
Example cURL
Example cURL
curl --request GET \
--url https://betteruptime.com/api/v2/heartbeat-groups/123456 \
--header 'Authorization: Bearer YOUR_API_TOKEN'

post
Creating a new heartbeat group

https://betteruptime.com/api/v2/heartbeat-groups
Returns a newly created heartbeat group or validation errors.
Request
Response
Request
Headers
Authorization
required
string
Bearer YOUR_API_TOKEN
Content-Type
required
string
application/json
Form Data Parameters
paused
optional
boolean
Set to true to pause monitoring for any existing heartbeats in the group — we won't notify you about downtime. Set to false to resume monitoring for any existing heartbeats in the group.
name
optional
string
A name of the group that you can see in the dashboard.
sort_index
optional
integer
Set sort_index to specify how to sort your heartbeat groups.
Response
201: Created
Returns newly created monitor
{
"data": {
"id": "123456",
"type": "heartbeat_group",
"attributes": {
"name": "Backend services",
"sort_index": 0,
"created_at": "2020-10-03T20:20:43.547Z",
"updated_at": "2020-10-03T20:20:43.547Z",
"paused": false
}
}
}
Example cURL
Example cURL
curl --request POST \
--url https://betteruptime.com/api/v2/heartbeat-groups \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Backend services"
}'

patch
Updating an existing heartbeat group

https://betteruptime.com/api/v2/heartbeat-groups/:heartbeat_group_id
Update the attributes of an existing heartbeat group. Send only parameters you wish to change (eg. name)
Request
Response
Request
Path Parameters
heartbeat_group_id
required
string
The ID of the heartbeat group you want to update
Headers
Authorization
required
string
Bearer YOUR_API_TOKEN
Content-Type
required
string
application/json
Form Data Parameters
paused
optional
boolean
Set to true to pause monitoring for any existing heartbeats in the group — we won't notify you about downtime. Set to false to resume monitoring for any existing heartbeats in the group.
name
optional
string
A name of the group that you can see in the dashboard
sort_index
optional
integer
Set sort_index to specify how to order your heartbeat groups.
Response
200: OK
Returns updated monitor data
{
"data": {
"id": "95251342",
"type": "monitor_group",
"attributes": {
"name": "Backend services 2",
"sort_index": 0,
"created_at": "2020-10-03T20:20:43.547Z",
"updated_at": "2020-10-03T20:20:43.547Z",
"paused": false
}
}
}
Example cURL — Change name only
Example cURL — Change name only
curl --request PATCH \
--url https://betteruptime.com/api/v2/heartbeat-groups/95251342 \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "Backend services 2"
}'

delete
Deleting an existing heartbeat group

https://betteruptime.com/api/v2/heartbeat-groups/:heartbeat_group_id
Permanently deletes an existing heartbeat group.
Request
Response
Request
Path Parameters
heartbeat_group_id
required
string
The ID of the heartbeat group you want to delete All heartbeats in the group will be kept intact
Headers
Authorization
required
string
Bearer YOUR_API_TOKEN
Response
204: No Content
Returns empty body
Example cURL
Example cURL
curl --request DELETE \
--url https://betteruptime.com/api/v2/heartbeat-groups/95251342 \
--header 'Authorization: Bearer YOUR_API_TOKEN'