---
title: "Check whether matching can be started for a cohort (MED-829 / E23-8)"
method: GET
path: "/api/cohorts/{cohortId}/matching-sessions/readiness"
tags: ["MatchingSessions"]
---

# Check whether matching can be started for a cohort (MED-829 / E23-8)

`GET /api/cohorts/{cohortId}/matching-sessions/readiness`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/cohorts/{cohortId}/matching-sessions/readiness`
- Auth: HTTP bearer

Pre-flight readiness probe used by the cohort Groups tab to gate the
Start Matching button. Mirrors the same checks that
`MatchingPayloadBuilder.build()` would throw on, so admins see the
blockers before clicking instead of via a 4xx toast after.

Checks (in priority order):
- Cohort has `intake_form_id` configured.
- At least one active, non-deleted participant has non-empty
  `available_time_slots`.
- The eligible-participant count is greater than or equal to the
  cohort's `matching_min_group_size` (default 4 when NULL).

Always returns 200 with the readiness shape — never returns a 4xx for
"not ready" cases. 404 only if the cohort itself doesn't exist.

## Path parameters

- `cohortId` string, uuid, required

## Response `200`

Readiness result.

- object
  - `success` boolean
  - `data` object
    - `ready` boolean, required
    - `blocking_reasons` object[], required
      - `code` 'COHORT_NO_INTAKE_FORM' | 'NO_ELIGIBLE_PARTICIPANTS' | 'INSUFFICIENT_PARTICIPANTS_FOR_MATCHING', required
      - `message` string, required
    - `meta` object, required
      - `eligible_participant_count` integer
      - `intake_form_id` string, nullable
      - `effective_min_group_size` integer

## Other responses

- `401`: Unauthorized — missing or invalid SGOS admin session.
- `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)
