---
title: "Who Is On Call"
description: "Returns who is on call right now, one entry per schedule in your organization."
---

`GET /api/im/on-call`

Returns who is on call **right now**: one entry per [schedule](./schedules) in your organization. This is a timestamp lookup against the materialized shifts (`im_schedule_shift`), the same table the escalation engine reads to decide who to page; it does not recompute rotation math on the fly.

## Authentication

Requires the base IM access every endpoint in this API needs (an IM-eligible `admin`, `editor`, or `responder` role, or an organization-wide API token; Incident Management must be enabled for the organization).

## Example (cURL)

```bash
curl -X GET "$BASE_URL/api/im/on-call" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
```

## Response

`200 OK`: an array, one entry per schedule that currently has coverage. A schedule with no one covering right now (a gap) is simply absent from the array. It is not returned as `null` or an error.

```json
[
  {
    "teamId": 3,
    "scheduleId": 7,
    "userId": "u_abc123",
    "userName": "Jane Doe",
    "shiftEndsAt": "2026-07-18T09:00:00.000Z"
  }
]
```

When a schedule has multiple overlapping rotation layers, the highest layer covering right now wins, by the same "higher layer covers lower" rule the escalation engine itself resolves with, so this endpoint never disagrees with who actually gets paged. `shiftEndsAt` is when the current shift (or override) ends, i.e. the next handover for that schedule.

## Common errors

- `401 Unauthorized` when not authenticated
- `403 Forbidden` (`imAccessDenied`) when using a customer-scoped token, or a session without an IM-eligible role
- `403 Forbidden` (`imNotEnabled`) when Incident Management is not enabled for the organization
