---
title: "Get the peer leader prep composite payload (AC1/3/4/6/9/11/12)"
method: GET
path: "/api/participant/sessions/{sessionId}/peer-leader-prep"
tags: ["Peer Leader Session Prep"]
---

# Get the peer leader prep composite payload (AC1/3/4/6/9/11/12)

`GET /api/participant/sessions/{sessionId}/peer-leader-prep`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/participant/sessions/{sessionId}/peer-leader-prep`
- Auth: HTTP bearer

Returns the full payload backing the prep page: session header info,
prep gating (unlocked/locked/live/declined), RSVP status, authored
agenda content, persisted step markers, first-time flag, and CM name.

Authorization: the authenticated user MUST be `sessions.session_leader_id`
and the session's modality must be peer_led. Otherwise 403.

AC1 — when the leader's RSVP status is `declined`, the response still
returns 200 but with `prep_status='declined'` so the FE can redirect
the user back to the standard participant portal. The page short-circuits
on this signal rather than rendering the prep UI.

AC4 — when the session is `in_progress` or `completed`, returns
`prep_status='live'` so the FE shows the closed-out alert.

## Path parameters

- `sessionId` string, uuid, required

## Response `200`

Composite payload

- object
  - `success` boolean
  - `data` PeerLeaderPrepPayload
    - `session` object
      - `id` string, uuid
      - `title` string, nullable
      - `session_number` integer, nullable
      - `scheduled_start` string, date-time, nullable
      - `scheduled_end` string, date-time, nullable
      - `duration_minutes` integer, nullable
      - `timezone` string, nullable
      - `cohort_id` string, uuid
      - `cohort_name` string, nullable
      - `program_name` string, nullable
      - `organization_name` string, nullable
      - `group_id` string, uuid, nullable
      - `group_name` string, nullable
      - `status` string
      - `ai_features_enabled` boolean: MED-816/MED-909 — cohort modality AI gate. When false all AI prep surfaces are absent.
      - `ai_listening_enabled` boolean: MED-909 AC4 — current AI Listening state for this session (read-only to the peer leader).
      - `ai_listening_locked` boolean: MED-909 AC4 — true once within 15 min of scheduled_start; the listening value is frozen.
    - `prep_status` 'unlocked' | 'locked' | 'live' | 'declined': `unlocked` happy path · `locked` preceding session not complete (AC3) · `live` session already launched (AC4) · `declined` leader declined RSVP (AC1).
    - `prep_locked_reason` string, nullable
    - `rsvp_status` 'unconfirmed' | 'confirmed' | 'declined'
    - `agenda` object, nullable: AuthoredAgendaForCoach payload from MED-976. Same shape coach prep uses.
    - `reflection_status` object, nullable: Reserved — currently always null; the FE derives Step 1 status from the existing reflection endpoint instead.
    - `prep_state` object
      - `marked_completed_at` string, date-time, nullable
      - `step2_reviewed_at` string, date-time, nullable
      - `step3_visited_at` string, date-time, nullable
      - `ai_prompt_selections` object: MED-909 AC1-AC2 — peer leader's In Use prompt selections JSONB, keyed by agenda block_key. Drives the AI suggestions banner count and per-step In Use badges. Empty object when none selected yet.
    - `is_first_time_leader` boolean
    - `cm_name` string, nullable

## Other responses

- `401`: Unauthenticated
- `403`: Caller is not the assigned session leader OR cohort is not peer-led
- `404`: Session not found

---

[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)
