---
title: "MED-876 AC2 / IV3 — replace the In Use prompt selections doc"
method: PATCH
path: "/api/coach/sessions/{sessionId}/prep/ai-selections"
tags: ["Coach Session Prep"]
---

# MED-876 AC2 / IV3 — replace the In Use prompt selections doc

`PATCH /api/coach/sessions/{sessionId}/prep/ai-selections`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/coach/sessions/{sessionId}/prep/ai-selections`
- Auth: none declared

Replaces this coach's `coach_session_prep.ai_prompt_selections` JSONB
document atomically. The document is keyed by agenda segment
`block_key`; each segment carries independent boolean toggles for the
three primary prompt slots (`purpose`, `speaking`, `stall_recovery`)
and an optional `speaking_override` set when the coach picked one of
the two ALTERNATIVE PROMPT rows via "Use This". The AC1 banner count
and the AC4 PDF inclusion both derive from this document. Rejected
(409 `AI_FEATURES_DISABLED`) when the cohort's modality has
`ai_features_enabled=false`.

## Path parameters

- `sessionId` string, uuid, required

## Request body

- object
  - `selections` object, required

## Response `200`

Updated prompt selections

- object
  - `success` boolean
  - `data` object
    - `ai_prompt_selections` object

## Other responses

- `400`: Invalid body
- `401`: Unauthorized
- `403`: Not assigned / not coach-led
- `404`: Session not found
- `409`: AI features disabled
- `410`: Session is live

---

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