---
title: "List on-call schedules"
method: GET
path: "/on-call-schedules"
tags: ["On-call"]
---

# List on-call schedules

`GET /on-call-schedules`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/on-call-schedules`
- Auth: HTTP bearer

Returns the team's schedules, by name, each with who is on call now and the next handoff.

## Query parameters

- `page` integer
- `per_page` integer

## Response `200`

Paginated set of `OnCallSchedule`

- object
  - `current_page` integer, required
  - `data` OnCallSchedule[], required
    - `id` string, uuid, required: Schedule ID
    - `name` string, required: Name
    - `description` string, nullable, required: What the schedule covers
    - `timezone` string, required: IANA time zone the rotations' dates, handoffs and restrictions are in
    - `current` OnCallShift, required: A stretch of time someone is on call.
      - `member` MemberReference, required: A member of the team.
        - `id` string, uuid, required: Member (user) ID
        - `name` string, required: Name
        - `email` string, email, required: Email address
      - `starts_at` string, date-time, required: When the shift starts
      - `ends_at` string, date-time, required: When it ends
      - `source` 'rotation' | 'override', required: Where an on-call shift comes from. | | |---| | `rotation` <br/> A rotation layer's turn. | | `override` <br/> An override someone added. |
      - `rotation_id` string, uuid, nullable, required: The rotation layer, for rotation shifts
      - `override_id` string, uuid, nullable, required: The override, for override shifts
    - `next_handoff_at` string, date-time, nullable, required: When the person on call changes next, within 4 weeks
    - `next` OnCallShift, required: A stretch of time someone is on call.
      - `member` MemberReference, required: A member of the team.
        - `id` string, uuid, required: Member (user) ID
        - `name` string, required: Name
        - `email` string, email, required: Email address
      - `starts_at` string, date-time, required: When the shift starts
      - `ends_at` string, date-time, required: When it ends
      - `source` 'rotation' | 'override', required: Where an on-call shift comes from. | | |---| | `rotation` <br/> A rotation layer's turn. | | `override` <br/> An override someone added. |
      - `rotation_id` string, uuid, nullable, required: The rotation layer, for rotation shifts
      - `override_id` string, uuid, nullable, required: The override, for override shifts
    - `rotations` OnCallRotation[], required: Rotation layers, top first
      - `id` string, uuid, required: Rotation ID
      - `name` string, required: Name
      - `position` integer, required: Layer order; 0 is the top layer and wins where layers overlap
      - `shift_unit` 'hours' | 'days' | 'weeks', required: The unit of a rotation's shift length. | | |---| | `hours` <br/> Absolute hours: shifts keep their length across DST changes. | | `days` <br/> Calendar days in the schedule's time zone: the handoff stays at the same wall-clock time. | | `weeks` <br/> Calendar weeks in the schedule's time zone. |
      - `shift_length` integer, required: Shift length in `shift_unit`s
      - `start_date` string, date, required: The first handoff's date in the schedule's time zone
      - `handoff_time` string, required: Handoff time as `HH:MM` in the schedule's time zone
      - `restrictions` OnCallRestrictions, required: When a rotation layer covers, each week; outside it the layers below take over.
        - `days` integer[], required: ISO weekdays the layer covers, 1 (Monday) to 7 (Sunday)
        - `start_time` string, nullable, required: From when on those days, as `HH:MM` in the schedule's time zone; `null` with `end_time` `null` for the whole day
        - `end_time` string, nullable, required: Until when, as `HH:MM`; before `start_time` runs past midnight
      - `participants` MemberReference[], required: The members taking turns, in order
        - `id` string, uuid, required: Member (user) ID
        - `name` string, required: Name
        - `email` string, email, required: Email address
      - `created_at` string, date-time, required: When the rotation was created
    - `overrides` OnCallOverride[], required: Overrides that haven't ended
      - `id` string, uuid, required: Override ID
      - `member` MemberReference, required: A member of the team.
        - `id` string, uuid, required: Member (user) ID
        - `name` string, required: Name
        - `email` string, email, required: Email address
      - `starts_at` string, date-time, required: From when
      - `ends_at` string, date-time, required: Until when
      - `note` string, nullable, required: Why, for the team
      - `created_by` MemberReference, required: A member of the team.
        - `id` string, uuid, required: Member (user) ID
        - `name` string, required: Name
        - `email` string, email, required: Email address
      - `created_at` string, date-time, required: When it was added
    - `used_by` EscalationPathReference[], required: Escalation paths with a step that pages this schedule
      - `id` string, uuid, required: Escalation path ID
      - `name` string, required: Escalation path name
    - `created_at` string, date-time, required: When the schedule was created
  - `first_page_url` string, nullable, required
  - `from` integer, nullable, required
  - `last_page_url` string, nullable, required
  - `last_page` integer, required
  - `links` object[], required: Generated paginator links.
    - `url` string, nullable, required
    - `label` string, required
    - `active` boolean, required
  - `next_page_url` string, nullable, required
  - `path` string, nullable, required: Base path for paginator generated URLs.
  - `per_page` integer, required: Number of items shown per page.
  - `prev_page_url` string, nullable, required
  - `to` integer, nullable, required: Number of the last item in the slice.
  - `total` integer, required: Total number of items being paginated.

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
