---
title: "Delete a cohort"
method: DELETE
path: "/cohorts/{id}"
tags: ["Cohorts"]
---

# Delete a cohort

`DELETE /cohorts/{id}`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{id}`
- Auth: HTTP bearer

Soft delete a cohort. Before flagging the cohort deleted, its AI-derived data (transcripts, airtime, themes, recap drafts, recap draft edits) is purged for all of the cohort's sessions — including soft-deleted ones — reusing the manual B3 purge (MED-1220). The purge is fail-closed: if it fails, the cohort is NOT deleted (it remains until the purge succeeds) and the error is returned. Each purge is recorded to cohort_ai_purge_audit_log.

## Path parameters

- `id` string, uuid, required

## Response `204`

Cohort deleted successfully (AI data purged first)

## Other responses

- `401`: Unauthorized
- `404`: Cohort not found
- `422`: Validation error (id is not a valid UUID)
- `500`: AI-data purge failed; the cohort was NOT deleted (fail-closed). Retry the delete once the underlying issue is resolved — the purge is idempotent.

---

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