---
title: "Get the coach's most recently completed session"
method: GET
path: "/api/coach/sessions/most-recent-completed"
tags: ["Coach Portal"]
---

# Get the coach's most recently completed session

`GET /api/coach/sessions/most-recent-completed`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/coach/sessions/most-recent-completed`
- Auth: HTTP bearer

MED-781: Returns the single most recently completed session for the coach (attendance marked AND `scheduled_end < NOW()`), or `null` if none exists. Drives the "Session Report Ready" Needs Attention card on the coach home dashboard.

Retirement rule lives on the client: the card stays visible until a newer session is completed (which produces a newer `scheduled_end` and supersedes the previous one). Opening the report does NOT retire the card.

## Response `200`

Most recently completed session, or null

- object
  - `id` string, uuid
  - `title` string
  - `session_number` integer, nullable
  - `scheduled_start` string, date-time
  - `scheduled_end` string, date-time
  - `attendance_marked_at` string, date-time, nullable
  - `group_id` string, uuid
  - `group_name` string
  - `cohort_id` string, uuid
  - `cohort_name` string
  - `topic_name` string, nullable: Topic display name (topic_override falls back to topics.name)

## Other responses

- `401`: Unauthorized
- `404`: The `live_session_delivery` feature flag is off (MED-886)

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
