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

# Execute bulk group import

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

## Request

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

Creates groups and assigns participants based on the provided data

## Path parameters

- `cohortId` string, uuid, required

## Request body

- GroupImportExecuteRequest
  - `groups` object[], required
    - `name` string, required
    - `memberEmails` string[], required

## Response `201`

Groups imported successfully

- object
  - `success` boolean
  - `data` GroupImportResult
    - `groupsCreated` integer
    - `participantsAssigned` integer
    - `groups` object[]
      - `id` string, uuid
      - `name` string
      - `memberCount` integer
    - `unassignedEmails` string[]
  - `message` string

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