---
title: "Create a classroom"
method: POST
path: "/api/v2/classrooms"
tags: ["Classrooms"]
---

# Create a classroom

`POST /api/v2/classrooms`

> 🔑
>
> Required OAuth scope: `classrooms:write`.

Creates a classroom.

## Headers

- `360-api-version` 'v2.0', required

## Request body

- InputClassroomDTO
  - `groupId` string, ObjectId, required — The unique ID of the creation group of the classroom.
  - `name` string, required — The title of the classroom.
  - `mediaIds` string[] — The list of unique IDs of the medias assigned to this classroom. These attachments will be sent by email to registered learners.
  - `message` string — Complementary information about the classroom. This information will be sent by email to registered learners.
  - `trainingObjective` string — The training objective of the classroom.

## Response `201`

Returns the created classroom.

- ClassroomDTO
  - `groupId` string, ObjectId, required — The unique ID of the creation group of the classroom.
  - `_id` string, ObjectId, required — The unique ID of the classroom.
  - `createdAt` string, date-time — The date at which the classroom was created, in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `name` string, required — The title of the classroom.
  - `mediaIds` string[], required — The list of unique IDs of the medias assigned to this classroom. These attachments will be sent by email to registered learners.
  - `message` string — Complementary information about the classroom. This information will be sent by email to registered learners.
  - `modifiedAt` string, date-time — The date at which the classroom was last modified, in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `trainingObjective` string — The training objective of the classroom.

## Other responses

- `400` — Some of the given medias are not allowed in a classroom. Allowed types are: attachment, excel, flash, image, pdf, slideshow, video, word
- `401` — The given access token is either missing, invalid, has expired, or has been revoked.
- `403` — The given access token does not have the required OAuth scope to execute the request.
- `404` — The server cannot find the requested resource.
- `429` — The client has sent too many requests in a short amount of time.

---

[API](https://skmtc.net/360learning/apis/core-api.md) · [All operations](https://skmtc.net/360learning/apis/core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/360learning/core-api/revisions/94b691b0b72c/schema)
