---
title: "Add a slot to a classroom"
method: POST
path: "/api/v2/classrooms/{classroomId}/slots"
tags: ["Classrooms"]
---

# Add a slot to a classroom

`POST /api/v2/classrooms/{classroomId}/slots`

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

Adds a slot to a given classroom.

## Path parameters

- `classroomId` string, ObjectId, required

## Headers

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

## Request body

- InputClassroomSlotDTO
  - `startDate` string, date-time, required — The date and time when the classroom slot starts (must be before `endDate`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `endDate` string, date-time, required — The date and time when the classroom slot ends (must be after `startDate`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `reportedDuration` number, required — The reported duration of the slot, in hours.
  - `selfRegistration` union, required — The self registration settings of the classroom slots.
    - DisabledSelfRegistrationDTO
      - `enabled` boolean, required — True if self-registration enabled for this classroom slot, false otherwise.
      - `cutoffDate` string, date-time — The cutoff date for self-registrations (only if `selfRegistration.enabled: true`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
    - EnabledSelfRegistrationDTO
      - `enabled` boolean, required — True if self-registration enabled for this classroom slot, false otherwise.
      - `cutoffDate` string, date-time, required — The cutoff date for self-registrations (only if `selfRegistration.enabled: true`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `virtual` boolean, required — True when the slot is a virtual classroom, false otherwise.
  - `maxCapacity` number — The maximum number of registrations allowed in the slot. Learners won't be able to self-enroll on this slot if this number is reached.
  - `name` string, required — The title of the classroom slot.
  - `context` PathContextDTO, required
    - `_id` string, ObjectId, required — The unique identifier of the entity the classroom slot was created in. For instance the path session ID.
    - `type` 'path', required
  - `location` string, required — The location of the classroom slot, being either a URL or a physical address.
  - `trainerIds` string[] — The list of unique user IDs of trainers in charge of the slot (users must exist in the company).
  - `mediaIds` string[] — The list of medias unique identifiers linked to the classroom slot.
  - `timezone` string — The timezone of the slot in the format `Continent[/Country]/City` defined by [TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

## Response `201`

Returns the created classroom slot.

- PathClassroomSlotDTO
  - `startDate` string, date-time, required — The date and time when the classroom slot starts (must be before `endDate`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `endDate` string, date-time, required — The date and time when the classroom slot ends (must be after `startDate`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `reportedDuration` number, required — The reported duration of the slot, in hours.
  - `selfRegistration` union, required — The self registration settings of the classroom slots.
    - DisabledSelfRegistrationDTO
      - `enabled` boolean, required — True if self-registration enabled for this classroom slot, false otherwise.
      - `cutoffDate` string, date-time — The cutoff date for self-registrations (only if `selfRegistration.enabled: true`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
    - EnabledSelfRegistrationDTO
      - `enabled` boolean, required — True if self-registration enabled for this classroom slot, false otherwise.
      - `cutoffDate` string, date-time, required — The cutoff date for self-registrations (only if `selfRegistration.enabled: true`), in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `virtual` boolean, required — True when the slot is a virtual classroom, false otherwise.
  - `maxCapacity` number — The maximum number of registrations allowed in the slot. Learners won't be able to self-enroll on this slot if this number is reached.
  - `_id` string, ObjectId, required — The unique ID of the classroom slot.
  - `classroomId` string, ObjectId, required — The unique ID of the classroom the slot is linked to.
  - `createdAt` string, date-time — The date and time when the classroom slot has been 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 slot.
  - `location` string, required — The location of the classroom slot, being either a URL or a physical address.
  - `trainerIds` string[], required — The list of unique user IDs of trainers in charge of the slot (users must exist in the company).
  - `mediaIds` string[], required — The list of medias unique identifiers linked to the classroom slot.
  - `modifiedAt` string, date-time — The date and time when the classroom slot has been updated, in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC)).
  - `timezone` string — The timezone of the slot in the format `Continent[/Country]/City` defined by [TZ database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
  - `webinarProvider` string — If the classroom is setup through a webinar integration, contains the name of the integration.
  - `context` PathContextDTO, required
    - `_id` string, ObjectId, required — The unique identifier of the entity the classroom slot was created in. For instance the path session ID.
    - `type` 'path', required

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error.
- `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.dev/360learning/apis/core-api.md) · [All operations](https://skmtc.dev/360learning/apis/core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/360learning/core-api/revisions/94b691b0b72c/schema)
