---
title: "Get cohorts grouped by partner"
method: GET
path: "/api/data-library/cohorts"
tags: ["DataLibrary"]
---

# Get cohorts grouped by partner

`GET /api/data-library/cohorts`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/data-library/cohorts`
- Auth: HTTP bearer

Returns all active cohorts grouped by partner organization for the Data Library sidebar.

## Response `200`

Cohort groups retrieved successfully

- object
  - `success` boolean
  - `data` DataLibraryCohortGroup[]
    - `partner_id` string
    - `partner_name` string
    - `program_name` string
    - `cohorts` object[]
      - `id` string, uuid
      - `name` string
      - `status` string
      - `participant_count` integer

## Other responses

- `401`: Unauthorized
- `500`: Internal server error

---

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