---
title: "Create a new time slot"
method: POST
path: "/cohorts/{cohortId}/time-slots"
tags: ["TimeSlots"]
---

# Create a new time slot

`POST /cohorts/{cohortId}/time-slots`

## Request

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

Creates a new time slot with auto-generated identifier

## Path parameters

- `cohortId` string, uuid, required

## Request body

- CreateTimeSlotRequest
  - `day_of_week` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday', required
  - `time` string, required: Time in HH:MM or HH:MM:SS format
  - `timezone` string, required: IANA timezone (e.g., America/New_York)

## Response `201`

Time slot created

- object
  - `success` boolean
  - `data` TimeSlot
    - `id` string, uuid
    - `cohort_id` string, uuid
    - `identifier` string: Auto-generated identifier (e.g., BCAP08-TS1)
    - `slot_number` integer: Sequential slot number (1, 2, 3...)
    - `day_of_week` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday'
    - `time` string: Time in HH:MM:SS format
    - `timezone` string: IANA timezone (e.g., America/New_York)
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `message` string

## Other responses

- `400`: Invalid input or cohort has no code
- `401`: Unauthorized
- `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)
