Skip to main content

On-Call Schedules API

Manage who is on-call for receiving alerts and escalations.

List Schedules

GET /api/v1/on_call_schedules
Query Parameters
ParameterTypeDescription
enabledbooleanFilter by enabled status
Response
{
  "data": [
    {
      "id": "sched_1234567890",
      "name": "Engineering On-Call",
      "schedule_type": "weekly",
      "timezone": "America/New_York",
      "enabled": true,
      "current_on_call": "[email protected]",
      "created_at": "2024-01-01T00:00:00Z"
    }
  ]
}

Get Schedule

GET /api/v1/on_call_schedules/:id
Response
{
  "data": {
    "id": "sched_1234567890",
    "name": "Engineering On-Call",
    "schedule_type": "weekly",
    "timezone": "America/New_York",
    "enabled": true,
    "members": [
      "[email protected]",
      "[email protected]",
      "[email protected]"
    ],
    "weekly_schedule": {
      "monday": { "user": "[email protected]" },
      "tuesday": { "user": "[email protected]" },
      "wednesday": { "user": "[email protected]" },
      "thursday": { "user": "[email protected]" },
      "friday": { "user": "[email protected]" },
      "saturday": { "user": "[email protected]" },
      "sunday": { "user": "[email protected]" }
    },
    "current_on_call": "[email protected]",
    "current_shift_start": "2024-01-15T00:00:00Z",
    "current_shift_end": "2024-01-15T23:59:59Z"
  }
}

Get Current On-Call

GET /api/v1/on_call_schedules/:id/current
Response
{
  "on_call": "[email protected]",
  "shift_start": "2024-01-15T00:00:00Z",
  "shift_end": "2024-01-15T23:59:59Z"
}

Create Schedule

Weekly Schedule

POST /api/v1/on_call_schedules
{
  "name": "Engineering On-Call",
  "schedule_type": "weekly",
  "timezone": "America/New_York",
  "members": [
    "[email protected]",
    "[email protected]",
    "[email protected]"
  ],
  "weekly_schedule": {
    "monday": { "user": "[email protected]" },
    "tuesday": { "user": "[email protected]" },
    "wednesday": { "user": "[email protected]" },
    "thursday": { "user": "[email protected]" },
    "friday": { "user": "[email protected]" },
    "saturday": { "user": "[email protected]" },
    "sunday": { "user": "[email protected]" }
  }
}

Rotation Schedule

{
  "name": "Weekly Rotation",
  "schedule_type": "custom",
  "timezone": "UTC",
  "members": [
    "[email protected]",
    "[email protected]",
    "[email protected]"
  ],
  "rotation_type": "weekly",
  "rotation_start": "2024-01-01T00:00:00Z"
}

Update Schedule

PATCH /api/v1/on_call_schedules/:id
Request
{
  "weekly_schedule": {
    "monday": { "user": "[email protected]" },
    "tuesday": { "user": "[email protected]" }
  }
}

Delete Schedule

DELETE /api/v1/on_call_schedules/:id

Schedule Types

TypeDescription
weeklyFixed assignment per day of week
customRotating schedule (daily or weekly)

Rotation Types

For custom schedule type:
RotationDescription
dailyTeam members rotate daily
weeklyTeam members rotate weekly