---
title: "Create a weekly class schedule (up to 26 weeks). Each date is reserved independently; refused dates are listed with reasons"
method: POST
path: "/api/v1/class-schedules"
---

# Create a weekly class schedule (up to 26 weeks). Each date is reserved independently; refused dates are listed with reasons

`POST /api/v1/class-schedules`

## Request

- Base URL: `http://127.0.0.1:4310`
- URL: `http://127.0.0.1:4310/api/v1/class-schedules`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sfb_session`

## Request body

- object
  - `class_type_id` string, uuid, required
  - `weekdays` integer[], required
  - `start_time` string, required: HH:MM local time
  - `starts_on` string, date
  - `ends_on` string, date
  - `weeks` integer
  - `exceptions` string[]
  - `staff_id` string, uuid
  - `location_id` string, uuid
  - `resource_ids` string[]
  - `capacity` integer
  - `idempotency_key` string, required

## Response `201`

OK

- object

## Other responses

- `400`: Validation error
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict or invalid state

---

[API](https://skmtc.dev/scalingfirm/apis/tsf-booking-api.md) · [All operations](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/revisions/81704199cd37?raw)
