---
title: "Get an on-call schedule"
method: GET
path: "/on-call-schedules/{schedule}"
tags: ["On-call"]
---

# Get an on-call schedule

`GET /on-call-schedules/{schedule}`

## Request

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

Returns the schedule with its rotation layers, upcoming overrides, who is on call now and
the escalation paths that page it.

## Path parameters

- `schedule` string, uuid, required

## Response `200`

The schedule.

- OnCallSchedule: An on-call schedule: rotation layers and overrides that decide who gets paged when an escalation path's `notify_on_call` step runs.
  - `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

## 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.
- `404`: `RESOURCE_NOT_FOUND`: there is no such resource in this 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)
