---
title: "Preview bulk group import"
method: POST
path: "/cohorts/{cohortId}/groups/import/preview"
tags: ["Groups"]
---

# Preview bulk group import

`POST /cohorts/{cohortId}/groups/import/preview`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{cohortId}/groups/import/preview`
- Auth: none declared

Parses CSV data and returns a preview of groups to be created and participants to be assigned

## Path parameters

- `cohortId` string, uuid, required

## Request body

- GroupImportPreviewRequest
  - `csvData` array[], required
    - string[]
  - `emailColumnIndex` integer, required
  - `groupColumnIndex` integer, required

## Response `200`

Import preview

- object
  - `success` boolean
  - `data` GroupImportPreviewResponse
    - `groups` object[]
      - `groupNumber` integer
      - `name` string
      - `participants` object[]
        - `email` string
        - `firstName` string
        - `lastName` string
        - `title` string
        - `matched` boolean
        - `alreadyAssigned` boolean
    - `unassigned` object[]
    - `summary` object
      - `totalGroups` integer
      - `totalMatched` integer
      - `totalUnmatched` integer
      - `totalAlreadyAssigned` integer

## Other responses

- `400`: Invalid input
- `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)
