Assign or reassign the session leader (MED-812 / E4.0a)
Designates a peer leader for a single session in a group_coaching cohort with coaching_sub_type = 'peer_led'. Used by the CM portal's Sessions list/card inline edit.
Gating:
- Endpoint returns 404 when the live_session_delivery feature flag is disabled (indistinguishable from a non-existent route).
- The session's modality must be group_coaching + peer_led. Other modalities receive 422 not_peer_led.
Lock cutoff: Reassignment is blocked once now() >= scheduled_start. After that boundary the API returns 422 session_already_started.
Roster validation: The designated user must be a current member of the session's group (group_members row with left_at IS NULL and is_deleted = false). Otherwise 422 participant_not_in_group.
Audit: Each successful designation writes a session_audit_log row with action leader_designated (first assignment, previous was null) or leader_reassigned (subsequent changes). The changes jsonb includes the before/after values of session_leader_id.
Request
- Base URLhttps://api.production.yourmedley.com
- AuthHTTP bearer
Path parameters
Request body
Response
Leader designated; returns the updated session row.
Changes
No recorded changes to this operation across all 1 revision of this API.