# Get a review session

Source: https://docs.coderhelm.com/api/reference/reviews/get-review-session

`GET /api/reviewer/session`

Returns one review job step by step: the pull request, what asked for the review, its status (live while it runs), when it started and ended, the steps so far, and once it is done the verdict with a link to the review posted on GitHub. The "CoderHelm review" check on a pull request links to the session of its review.

## Authentication

A team API key: `Authorization: Bearer chk_...`. The key needs the `view` scope. See [Authentication](https://docs.coderhelm.com/api/authentication).

## Parameters

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The session's id: the review job's id, from the PR's "CoderHelm review" check (its Details link) or a PR's status. |

## Responses

### 200

The session.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `activity` | array of ActivityGroup | yes | What the reviewer did while it read the pull request, live while it runs: its searches, file views and lookups in groups, the notes it wrote, and the comments it kept. Oldest first. |
| `activity[].ended_at` | string | yes | When its last step happened (RFC 3339, milliseconds). |
| `activity[].items` | array of ActivityItem | yes | Its steps, oldest first. Empty for a note. |
| `activity[].items[].at` | string | yes | When (RFC 3339, milliseconds). |
| `activity[].items[].detail` | string | yes | A comment's title, or the tool's name in words. Empty otherwise. |
| `activity[].items[].failed` | boolean | yes | The call failed or was refused. |
| `activity[].items[].label` | string | yes | What it looked at: a query, `path:10-40`, a comment's `path:line`. Empty for a tool shown by its name only. |
| `activity[].kind` | string | yes | `search`, `view`, `find`, `lookup`, `note` or `comment`. |
| `activity[].started_at` | string | yes | When its first step happened (RFC 3339, milliseconds). |
| `activity[].text` | string | yes | A note's sentences. Empty for other groups. |
| `activity[].title` | string | yes | The group in words, or a note's heading. |
| `activity_dropped` | integer | yes | Steps left out of `activity` because the review passed its cap. |
| `attempt` | integer | yes | Which try this job is, from 0. |
| `check_run_id` | integer or null | no | The GitHub check run that links here, when GitHub allowed one. |
| `findings` | integer or null | no | How many findings the review kept, once there is a verdict. |
| `finished_at` | string | yes | When it ended (RFC 3339); empty while it runs. |
| `head_sha` | string | yes | The commit reviewed. |
| `id` | string | yes | The session's id (the review job's id). |
| `in_flight` | boolean | yes | True while the review is still running. |
| `kind` | string | yes | `review`, or `question` for an answer to a comment. |
| `overview` | ReviewOverview or null | no | The "PR Overview" the review led with on GitHub. |
| `overview.changes` | array of string | yes | What it changes, a few short bullets. |
| `overview.files` | array of OverviewFile | yes | One line per changed file, in the diff's order (at most 100). |
| `overview.files[].description` | string | yes | What the change does in that file, in one short line. |
| `overview.files[].path` | string | yes | The file, as the diff names it. |
| `overview.files_total` | integer | yes | How many files the pull request changed. |
| `overview.summary` | string | yes | What the pull request does, in one sentence. |
| `pr_number` | integer | yes | The pull request number. |
| `pr_title` | string | yes | The pull request's title. |
| `reason` | string | yes | Why it ended without a review, when it did. Empty otherwise. |
| `repo` | string | yes | The repository, `owner/name`. |
| `review_sk` | string or null | no | The review this session wrote (its `sk`, for `/api/reviewer/review`). Null while it runs, when it ended without one, and on older sessions. |
| `review_url` | string | yes | The review posted on GitHub; empty when nothing new was posted. |
| `started_at` | string | yes | When it started (RFC 3339). |
| `status` | string | yes | `reviewing`, `done`, `skipped`, `retrying` (didn't finish and was sent again; the retry has its own session), `failed`, or `stalled` (the job stopped without saying how it ended). |
| `steps` | array of SessionStep | yes | The steps so far, oldest first. |
| `steps[].at` | string | yes | When (RFC 3339). |
| `steps[].detail` | string | yes | More about it, when there is more. Empty otherwise. |
| `steps[].text` | string | yes | What happened, in one line. |
| `trigger` | string | yes | What asked for it, such as `label`, `push`, `rerequest` or `reply`. |
| `verdict` | string | yes | The verdict, `APPROVE` or `REQUEST_CHANGES`; empty until there is one. |

Headers: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`.

### 400

`id` is not a session id.

### 401

The key is missing, malformed, revoked or expired, or the person who made it left the team.

### 403

The key lacks the scope this endpoint needs (`missing_scope`).

### 404

No such session in the team.

### 429

Over the key's rate limit (`rate_limited`), or, for endpoints that start work, over the team's monthly token limit (`token_limit_reached`).

Headers: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `Retry-After`.

### 500

Something failed on CoderHelm's side. Safe to retry reads.

## Example request

cURL:

```bash
curl -X GET 'https://api.coderhelm.com/api/reviewer/session?id=3f2c9a1e-5b7d-4c8e-9a0b-1c2d3e4f5a6b' \
  -H "Authorization: Bearer $CODERHELM_API_KEY"
```

TypeScript:

```ts
const res = await fetch("https://api.coderhelm.com/api/reviewer/session?id=3f2c9a1e-5b7d-4c8e-9a0b-1c2d3e4f5a6b", {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.CODERHELM_API_KEY}`,
  },
});
if (!res.ok) {
  const { error, code } = await res.json();
  throw new Error(`${res.status} ${code}: ${error}`);
}
const data = await res.json();
```

Python:

```python
import os
import requests

headers = {
    "Authorization": f"Bearer {os.environ['CODERHELM_API_KEY']}",
}
res = requests.request("GET", "https://api.coderhelm.com/api/reviewer/session?id=3f2c9a1e-5b7d-4c8e-9a0b-1c2d3e4f5a6b", headers=headers)
if not res.ok:
    raise RuntimeError(f"{res.status_code}: {res.json().get('error')}")
data = res.json()
```

## Example response

```json
{
  "activity": [
    {
      "ended_at": "2026-10-22T14:18:12.020+00:00",
      "items": [
        {
          "at": "2026-10-22T14:18:09.412+00:00",
          "detail": "",
          "failed": false,
          "label": "src/orders/sort.ts:10-48"
        }
      ],
      "kind": "view",
      "started_at": "2026-10-22T14:18:09.412+00:00",
      "text": "",
      "title": "View 2 files"
    }
  ],
  "activity_dropped": 0,
  "attempt": 0,
  "check_run_id": 31337000,
  "findings": 2,
  "finished_at": "2026-10-22T14:20:05+00:00",
  "head_sha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "id": "3f2c9a1e-5b7d-4c8e-9a0b-1c2d3e4f5a6b",
  "in_flight": false,
  "kind": "review",
  "overview": {
    "changes": [
      "Sort runs before the status filter"
    ],
    "files": [
      {
        "description": "Sorts orders before the status filter",
        "path": "src/orders/sort.ts"
      }
    ],
    "files_total": 3,
    "summary": "Sorts the order list before filtering it by status."
  },
  "pr_number": 318,
  "pr_title": "Rate-limit the login form",
  "reason": "",
  "repo": "acme/web",
  "review_sk": "REVIEW#acme/web#000318#2026-10-22T14:20:05+00:00",
  "review_url": "https://github.com/acme/web/pull/318#pullrequestreview-2201",
  "started_at": "2026-10-22T14:18:00+00:00",
  "status": "done",
  "steps": [
    {
      "at": "2026-10-22T14:18:02+00:00",
      "detail": "src/auth/login.ts\nsrc/auth/limits.ts",
      "text": "Read the change: 4 files changed"
    }
  ],
  "trigger": "push",
  "verdict": "REQUEST_CHANGES"
}
```
