---
title: "Mark attendance + engagement for the session (AC4/5, IV2)"
method: PUT
path: "/api/participant/sessions/{sessionId}/post-session/attendance"
tags: ["Peer Leader Post-Session"]
---

# Mark attendance + engagement for the session (AC4/5, IV2)

`PUT /api/participant/sessions/{sessionId}/post-session/attendance`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/participant/sessions/{sessionId}/post-session/attendance`
- Auth: none declared

Writes through the existing `MarkAttendanceRequest` backend — the same
`session_attendance` + `participant_engagement_ratings` tables a coach
writes (IV2). The peer leader's own "You" row is just another entry in
`attendance`. Status is one of attended/partial/absent; absent_reason is
required for absent rows. Engagement ratings (1-5) are keyed by
participant_id and apply to attended/partial participants.

## Path parameters

- `sessionId` string, uuid, required

## Request body

- object
  - `attendance` object[], required
    - `user_id` string, uuid, required
    - `status` 'attended' | 'partial' | 'absent', required
    - `absent_reason` 'business_conflict' | 'personal_conflict' | 'no_notice', nullable
    - `coach_notes` string, nullable
  - `send_surveys` boolean
  - `engagement_ratings` object[]
    - `participant_id` string, uuid, required
    - `rating` integer, required

## Response `200`

Attendance + engagement persisted

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Caller is not the peer leader for this session
- `404`: Session not found
- `500`: Server error

---

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