On-call

Create an on-call schedule

The schedule starts empty: nobody is on call until you add a rotation layer. Needs a plan with on-call (403 PLAN_FEATURE_UNAVAILABLE).

post/on-call-schedules

Request

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

Request body

namestring required

Name, up to 255 characters

descriptionstring nullable

What the schedule covers, up to 1000 characters

timezonestring required

IANA time zone the rotations' dates, handoffs and restrictions are in

Example request

{
  "name": "Primary",
  "timezone": "Europe/Amsterdam"
}

Response

The new schedule.

idstring uuid required

Schedule ID

namestring required

Name

descriptionstring nullable required

What the schedule covers

timezonestring required

IANA time zone the rotations' dates, handoffs and restrictions are in

next_handoff_atstring date-time nullable required

When the person on call changes next, within 4 weeks

created_atstring date-time required

When the schedule was created

Example response

{
  "name": "Primary",
  "timezone": "Europe/Amsterdam",
  "current": {
    "member": {
      "name": "Jane Doe",
      "email": "jane@example.com"
    }
  },
  "next": {
    "member": {
      "name": "Jane Doe",
      "email": "jane@example.com"
    }
  },
  "rotations": [
    {
      "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"
        }
      ]
    }
  ],
  "overrides": [
    {
      "member": {
        "name": "Jane Doe",
        "email": "jane@example.com"
      },
      "note": "Covering for Jane's holiday",
      "created_by": {
        "name": "Jane Doe",
        "email": "jane@example.com"
      }
    }
  ],
  "used_by": [
    {
      "name": "On-call engineers"
    }
  ]
}

Changes

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