On-call

Add a rotation layer

New layers go below the existing ones unless position is given. Participants must be members of the team (422).

post/on-call-schedules/{schedule}/rotations

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Path parameters

schedulestring uuid required

Schedule ID.

Request body

namestring required

Name, up to 255 characters

positioninteger

Layer order, 0 for the top. Default: below the existing layers

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_lengthinteger required

Shift length in shift_units: up to 720 hours, 90 days or 12 weeks

start_datestring date required

The first handoff's date in the schedule's time zone; turns are counted from it

handoff_timestring required

Handoff time as HH:MM in the schedule's time zone

participant_idsstring[]

1 to 50 team members taking turns, in order

Example request

{
  "name": "Weekly primary",
  "shift_length": 1,
  "start_date": "2026-11-02",
  "handoff_time": "09:00",
  "restrictions": {
    "start_time": "09:00",
    "end_time": "17:00"
  }
}

Response

The new rotation layer.

idstring uuid required

Rotation ID

namestring required

Name

positioninteger 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_lengthinteger required

Shift length in shift_units

start_datestring date required

The first handoff's date in the schedule's time zone

handoff_timestring required

Handoff time as HH:MM in the schedule's time zone

created_atstring date-time required

When the rotation was created

Example response

{
  "name": "Weekly primary",
  "shift_length": 1,
  "start_date": "2026-11-02",
  "handoff_time": "09:00",
  "restrictions": {
    "start_time": "09:00",
    "end_time": "17:00"
  },
  "participants": [
    {
      "name": "Jane Doe",
      "email": "jane@example.com"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.