# List heartbeats in a group

Returns heartbeats belonging to the given heartbeat group. This endpoint [supports pagination](https://betterstack.com/docs/uptime/api/pagination/).

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/heartbeat-groups/{heartbeat_group_id}/heartbeats"
method = "GET"

[[path_param]]
name = "heartbeat_group_id"
description = "The ID of the heartbeat group you want to get heartbeats from."
required = true
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns a paginated list of heartbeats in the specified group.'''
body = '''{
  "data": [
    {
      "id": "12345",
      "type": "heartbeat",
      "attributes": {
        "url": "https://uptime.betterstack.com/api/v1/heartbeat/abcd1234abcd1234abcd1234",
        "name": "Testing heartbeat",
        "period": 10800,
        "grace": 300,
        "call": false,
        "sms": false,
        "email": true,
        "push": true,
        "team_wait": 180,
        "heartbeat_group_id": 9525,
        "team_name": "Test team",
        "sort_index": null,
        "paused_at": null,
        "maintenance_from": "01:02:00",
        "maintenance_to": "03:04:00",
        "maintenance_timezone": "Amsterdam",
        "maintenance_days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"],
        "created_at": "2020-05-05T11:41:49.327Z",
        "updated_at": "2020-12-10T14:40:23.436Z",
        "status": "up"
      }
    }
  ],
  "pagination": {
    "first": "https://uptime.betterstack.com/api/v2/heartbeat-groups/9525/heartbeats?page=1",
    "last": "https://uptime.betterstack.com/api/v2/heartbeat-groups/9525/heartbeats?page=1",
    "prev": null,
    "next": null
  }
}'''
[/responses]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url https://uptime.betterstack.com/api/v2/heartbeat-groups/9525/heartbeats \
  --header "Authorization: Bearer $TOKEN"
```

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all heartbeats API parameters](https://betterstack.com/docs/uptime/api/heartbeats-api-response-params/)
[/info]
