# List on-call schedules

List all on-call schedules. This endpoint [supports pagination](https://betterstack.com/docs/uptime/api/pagination/).

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/on-calls"
method = "GET"

[[query_param]]
name = "team_name"
description = "Filter on-call schedules belonging to a specified team when using [global API token](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-a-global-api-token)."
required = false
type = "string"

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

[responses]
[[response]]
status = 200
description = '''Returns the list of existing on-call schedules including their current on-calls'''
body = '''{
  "data": [
    {
      "id": "12345",
      "type": "on_call_calendar",
      "attributes": {
        "name": null,
        "default_calendar": true,
        "team_name": "Production"
      },
      "relationships": {
        "on_call_users": {
          "data": [
            {
              "id": "2345",
              "type": "user",
              "meta": { 
                "email": "tomas@betterstack.com"
              }
            }
          ]
        }
      }
    },
    {
      "id": "12346",
      "type": "on_call_calendar",
      "attributes": {
        "name": "Tier 2",
        "default_calendar": false
      },
      "relationships": {
        "on_call_users": {
          "data": [
            {
              "id": "2345",
              "type": "user",
              "meta": { 
                "email": "tomas@betterstack.com"
              }
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "id": "2345",
      "type": "user",
      "attributes": {
        "first_name": "Tomas",
        "last_name": "Hromada",
        "email": "tomas@betterstack.com",
        "phone_numbers": [
          "+420737123456"
        ]
      }
    }
  ],
  "pagination": {
    "first": "https://uptime.betterstack.com/api/v2/on-calls?page=1",
    "last": "https://uptime.betterstack.com/api/v2/on-calls?page=1",
    "prev": null,
    "next": null
  }
}'''
[/responses]

#### Example cURL 

```shell
[label Example]
curl --request GET \
  --url "https://uptime.betterstack.com/api/v2/on-calls" \
  --header 'authorization: Bearer $TOKEN'
```

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