---
title: "Record the peer leader's waiting-room presence heartbeat (MED-1126)"
method: POST
path: "/api/participant/sessions/{sessionId}/peer-leader-prep/heartbeat"
tags: ["Peer Leader Session Prep"]
---

# Record the peer leader's waiting-room presence heartbeat (MED-1126)

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

## Request

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

Stamps the peer leader's `session_attendance` presence heartbeat
(`last_seen_at`, and `joined_at` on first contact) so the leader shows
as present in the participant waiting room while prepping. Peer leaders
never enter the waiting room (prep → Start → active), so the prep page
pings this on the same ~4s cadence the waiting room polls. Peer-led
sessions only; caller must be the designated session leader.

## Path parameters

- `sessionId` string, uuid, required

## Response `204`

Presence heartbeat recorded

## Other responses

- `400`: Invalid sessionId format
- `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)
