---
title: "Create a new Group"
method: POST
path: "/group"
tags: ["Group"]
---

# Create a new Group

`POST /group`

Create a new Group

## Request body

- object
  - `external` ExternalRequest — ExternalRequest is the External-object used on Update and Create operations, since it should only be allowed to set SourceID, the Source-field is not included.
    - `sourceID` string, required — The ID of the external source
  - `schoolID` string, uuid, required — The ID of the school the group belongs to
  - `category` 'Education' | 'Other' — The category of the group
  - `title` string, required — The title of the group, must be unique within the school.
  - `types` GroupType[] — The types of the group. A group can have multiple types simultaneously. For preschools (FS), Class and Childcare types are automatically paired - adding Class will automatically include Childcare, and vice versa. Integration note for Mentor type - when importing groups from external systems, it can be difficult to determine whether a group should have the Mentor type. One recommended approach is to not include the Mentor type when creating or updating groups via the API, allowing school administrators to manually configure the Mentor type in Meitner as needed. When updating a group, you can preserve existing types by reading the current group state first and only modifying the specific types your integration manages (e.g., Class, Childcare). This ensures the Mentor type remains under administrator control.
  - `moderatorIDs` string[] — The IDs of the moderators of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Moderators have to be employees of the school.
  - `memberIDs` string[] — The IDs of the members of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Members have to be students of the school.

## Response `201`

Response for Group Create operation - returns the created Group

- Group — Group holds the information about a group of students.
  - `id` string, uuid, required — Unique identifier for the Group
  - `meta` Meta — Meta contains information about the creation and modification of a resource for auditing purposes
    - `createdAt` string, date-time, required — Timestamp when the resource was created
    - `createdBy` string, uuid, nullable — User who created the resource
    - `updatedAt` string, date-time, nullable — Timestamp when the resource was last updated
    - `updatedBy` string, uuid, nullable — User who last updated the resource
  - `external` External — External is a reusable object that can be used to store external information from another system, used for third-party integration tracking.
    - `sourceID` string, nullable — The ID of the external source
    - `source` string, nullable — The source of the external information
  - `schoolID` string, uuid, required — The ID of the school the group belongs to
  - `category` 'Education' | 'Other' — The category of the group
  - `title` string, required — The title of the group, must be unique within the school.
  - `types` GroupType[] — The types of the group. A group can have multiple types simultaneously. For preschools (FS), Class and Childcare types are automatically paired - adding Class will automatically include Childcare, and vice versa. Integration note for Mentor type - when importing groups from external systems, it can be difficult to determine whether a group should have the Mentor type. One recommended approach is to not include the Mentor type when creating or updating groups via the API, allowing school administrators to manually configure the Mentor type in Meitner as needed. When updating a group, you can preserve existing types by reading the current group state first and only modifying the specific types your integration manages (e.g., Class, Childcare). This ensures the Mentor type remains under administrator control.
  - `moderatorIDs` string[] — The IDs of the moderators of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Moderators have to be employees of the school.
  - `memberIDs` string[] — The IDs of the members of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Members have to be students of the school.

## Other responses

- `400` — Bad Request - The request was malformed or contained invalid parameters
- `401` — Unauthorized - The request is missing valid authentication credentials
- `403` — Forbidden - Request is authenticated, but the user is not allowed to perform the operation
- `404` — Not Found - The requested resource does not exist
- `409` — Conflict - The request could not be completed due to a conflict
- `422` — Validation error for Group Create operation - request data failed validation
- `429` — Too Many Requests - When the rate limit has been exceeded
- `500` — Internal Server Error - An unexpected server error occurred

---

[API](https://skmtc.net/meitner/apis/directory-api.md) · [All operations](https://skmtc.net/meitner/apis/directory-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/meitner/directory-api/revisions/014348a7bc35/schema)
