---
title: "Archive a cohort (permanent)"
method: POST
path: "/cohorts/{id}/archive"
tags: ["Cohorts"]
---

# Archive a cohort (permanent)

`POST /cohorts/{id}/archive`

## Request

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

Archives a completed or cancelled cohort. This action cannot be undone.

## Path parameters

- `id` string, uuid, required

## Response `200`

Cohort archived successfully

- object
  - `success` boolean
  - `data` object
    - `cohort` Cohort
      - `id` string, uuid
      - `partner_id` string, uuid
      - `program_id` string, uuid
      - `name` string
      - `short_name` string
      - `code` string
      - `description` string
      - `status` 'setup' | 'ready' | 'live' | 'paused' | 'completed' | 'cancelled'
      - `cohort_type` string
      - `start_date` string, date
      - `end_date` string, date
      - `preferred_days` string[]
      - `preferred_times` string[]
      - `participant_capacity` integer
      - `is_active` boolean
      - `created_at` string, date-time
    - `previousStatus` string
    - `newStatus` 'archived'
    - `action` 'archive'

## Other responses

- `400`: Cohort must be completed or cancelled to archive
- `401`: Unauthorized
- `404`: Cohort not found

---

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