> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# On-call API

> Manage native on-call schedules, members, shifts, calendar feeds, and temporary overrides.

Use the On-call API when an operator, script, or agent needs typed access to responder coverage. The API is project-scoped and derives the owning team from `{project_id}`, so team-wide schedules and project-scoped schedules can both cover a service.

## Operations

| Operation                   | Method and path                                                            | Purpose                                      |
| --------------------------- | -------------------------------------------------------------------------- | -------------------------------------------- |
| `onCall.listSchedules`      | `GET /v1/projects/{project_id}/on-call/schedules`                          | List team-wide and project-scoped schedules. |
| `onCall.createSchedule`     | `POST /v1/projects/{project_id}/on-call/schedules`                         | Create a native weekly rotation.             |
| `onCall.getCurrentEngineer` | `GET /v1/projects/{project_id}/on-call/current`                            | Resolve the current engineer for handoff.    |
| `onCall.listMembers`        | `GET /v1/projects/{project_id}/on-call/schedules/{schedule_id}/members`    | List schedule members in rotation order.     |
| `onCall.listShifts`         | `GET /v1/projects/{project_id}/on-call/schedules/{schedule_id}/shifts`     | List shifts overlapping a bounded window.    |
| `onCall.listShiftsCsv`      | `GET /v1/projects/{project_id}/on-call/schedules/{schedule_id}/shifts.ics` | Return an iCalendar feed for the schedule.   |
| `onCall.setScheduleEnabled` | `PATCH /v1/projects/{project_id}/on-call/schedules/{schedule_id}`          | Enable or disable a schedule.                |
| `onCall.createOverride`     | `POST /v1/projects/{project_id}/on-call/schedules/{schedule_id}/overrides` | Create a temporary shift override.           |

## Create schedule

```json theme={null}
{
  "name": "Primary rotation",
  "timezone": "America/Los_Angeles",
  "handoff_day_of_week": 1,
  "handoff_local_time": "09:00",
  "members": [{ "user_id": "user_123" }, { "user_id": "user_456" }],
  "project_scoped": false,
  "weeks_to_materialize": 12
}
```

`project_scoped` defaults to `false`, which creates a team-wide schedule. Set it to `true` when a service needs its own rotation.

## Shift windows

`onCall.listShifts` accepts:

* `from` - ISO timestamp. Defaults to seven days before now.
* `to` - ISO timestamp. Defaults to 56 days after now.

Use `onCall.listShiftsCsv` when a human wants a calendar subscription. MCP Code Mode should prefer `onCall.listShifts` so agents receive structured JSON.

## Overrides

```json theme={null}
{
  "user_id": "user_789",
  "starts_at": "2026-05-18T16:00:00Z",
  "ends_at": "2026-05-19T16:00:00Z"
}
```

Overrides win during their time window. Ask for explicit confirmation before creating one.

## Auth

Every operation is authenticated and project-scoped. Use `on_call:read` for list/current/member/shift operations and `on_call:write` for create, enable/disable, and override operations. The `*` wildcard and global `write` shortcut also include these scopes.

## CLI and MCP

The CLI exposes the same operation family through `squasher on-call ...`. MCP remains Code Mode only: search for `onCall`, inspect operation schemas, and call exposed operations through `execute`.

Related: [On-call](/features/on-call), [Notifications API](/api-reference/alerts), [Incidents API](/api-reference/incidents).
