Cohorts

Update modality settings (coaching sub-type, AI features, commitment tracking)

MED-848 — Non-destructive update of a single modality's coaching sub-type, AI features toggle, Live Session Delivery gate, and (MED-1069) Commitment Tracking toggle. Used by the Edit Cohort flow.

Editability rules:

  • ai_features_enabled is editable any time post-creation (AC8)
  • coaching_sub_type is editable only until the modality is locked by either of the following independent conditions (returns 400 once locked):
    1. MED-848 AC9 — invites_sent=true (session prep / announcement emails have already gone out for this modality).
    2. MED-955 AC1/3/5 — any session in the cohort has a designated session_leader_id (Coach Led / Peer Led leader has been assigned). Reported as: "Modality type cannot be changed after session leaders have been assigned."
  • coaching_sub_type is only valid for modality_type='group_coaching'. Returns 400 otherwise.

Gated by the live_session_delivery feature flag (MED-886). When the flag is off the endpoint returns 404.

patch/cohorts/{id}/modalities/{modalityId}/settings

Request

  • Base URL
    https://api.production.yourmedley.com
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Cohort ID

modalityIdstring uuid required

Modality ID

Request body

coaching_sub_type'coach_led' | 'peer_led' nullable

Group coaching sub-type. Only valid when the modality is group_coaching. Locked once invites_sent=true (MED-848 AC9) OR once any session in the cohort has a designated session_leader_id (MED-955 AC1/3/5).

ai_features_enabledboolean

Whether AI-powered facilitation features are enabled for this modality.

live_session_delivery_enabledboolean

MED-948 (E1.10a) — per-modality Live Session Delivery in SGOS gate. When set to false, ai_features_enabled is reset to false server-side (AC8) so no stale "enabled-but-hidden" state persists. Distinct from the system-level live_session_delivery feature flag (MED-886).

commitment_tracking_enabledboolean

MED-1069 (E1.10c) — per-modality Commitment Tracking toggle (group_coaching only). Enables the participant "Reflect on Prior Commitments" step and per-session commitment field for the cohort's group sessions. INDEPENDENT of live_session_delivery_enabled — it is NOT reset when that gate is turned off (unlike ai_features_enabled).

Response

Modality settings updated

Changes

No recorded changes to this operation across all 1 revision of this API.