---
title: "Submit Schedule"
method: POST
path: "/submit"
---

# Submit Schedule

`POST /submit`

Create an API generation session for a validated combined configuration.

Args:
    request: Pydantic-validated combined scheduler configuration from the body.

Returns:
    A new session identifier and its base schedule endpoint.

Raises:
    HTTPException: Status 422 when any built-in submission limit is exceeded;
        status 500 if work cannot be submitted; or status 400 for other request
        setup failures.

Behavior:
    Expired sessions and all built-in request limits are checked before work is
    accepted. Scheduler construction is queued on the shared executor with the
    API solver timeout. A UUID-backed session is registered immediately with
    empty results so later requests can await initialization asynchronously.

## Request body

- CombinedConfig — Represents a combined configuration. **Usage:** ```python CombinedConfig(config=..., time_slot_config=..., limit=10) ``` Python type: `CombinedConfig`.
  - `config` SchedulerConfigInput, required — Represents a scheduler configuration. **Usage:** ```python SchedulerConfig( rooms=[RoomConfig(name="Room 101", capacity=40)], labs=[LabConfig(name="Lab 101", capacity=24)], courses=[...], faculty=[...], ) ``` Python type: `SchedulerConfig`.
    - `rooms` RoomConfigInput[], required — List of available room definitions Python type: `list[RoomConfig]`.
      - `name` string, required — Unique, nonblank room name used by references and schedule output Python type: `str`.
      - `capacity` integer, required — Maximum number of students the room can accommodate Python type: `int`.
      - `features` string[] — Facility and equipment feature tags supplied by this room Python type: `set[str]`.
      - `times` object, nullable — Optional weekday room availability windows; null means unrestricted availability Python type: `dict[Day, list[TimeRange]] | None`.
    - `labs` LabConfigInput[], required — List of available lab definitions Python type: `list[LabConfig]`.
      - `name` string, required — Unique, nonblank lab name used by references and schedule output Python type: `str`.
      - `capacity` integer, required — Maximum number of students the lab can accommodate Python type: `int`.
      - `features` string[] — Facility and equipment feature tags supplied by this lab Python type: `set[str]`.
      - `times` object, nullable — Optional weekday lab availability windows; null means unrestricted availability Python type: `dict[Day, list[TimeRange]] | None`.
    - `courses` CourseConfigInput[], required — List of course configurations Python type: `list[CourseConfig]`.
      - `course_id` string, required — Course name Python type: `Course`.
      - `section_id` string, nullable — Optional stable section suffix; null uses the generated zero-padded input-order number Python type: `str | None`.
      - `credits` integer, required — Number of credit hours Python type: `int`.
      - `capacity` integer, required — Expected section enrollment that any assigned rooms and labs must accommodate Python type: `int`.
      - `room` Room[], required — Allowed room names; empty is valid only for compatible patterns that do not occupy a room Python type: `list[Room]`.
      - `lab` Lab[] — Acceptable labs; an empty list means the course has no lab meeting Python type: `list[Lab]`.
      - `conflicts` Course[], required — Base course IDs whose sections cannot overlap; an empty list means no declared conflicts Python type: `list[Course]`.
      - `faculty` Faculty[], nullable, required — Non-empty faculty candidates, or null to derive candidates from faculty course-preference keys Python type: `list[Faculty] | None`.
      - `modality` 'in_person' | 'online' | 'hybrid' — Required mixture of meeting delivery modes for a course section. Python type: `CourseModality`.
      - `required_room_features` string[] — Feature tags every assigned lecture room must provide Python type: `set[str]`.
      - `required_lab_features` string[] — Feature tags every assigned lab must provide Python type: `set[str]`.
      - `reserve_room_during_lab` boolean — Whether the lab meeting also occupies the section's assigned lecture room Python type: `bool`.
    - `faculty` FacultyConfigInput[], required — List of faculty configurations Python type: `list[FacultyConfig]`.
      - `name` string, required — Faculty name Python type: `Faculty`.
      - `maximum_credits` integer, required — Maximum credit hours they can teach Python type: `int`.
      - `maximum_days` integer — Maximum number of days they are willing to teach (0-5, optional) Python type: `int`.
      - `minimum_credits` integer, required — Minimum credit hours they must teach Python type: `int`.
      - `unique_course_limit` integer, required — Maximum number of different courses they can teach Python type: `int`.
      - `times` object, required — Availability ranges keyed by weekday; omitted days and empty lists mean unavailable Python type: `dict[Day, list[TimeRange]]`.
      - `course_preferences` object — Dictionary mapping course IDs to preference scores Python type: `dict[Course, Preference]`.
      - `room_preferences` object — Dictionary mapping room IDs to preference scores Python type: `dict[Room, Preference]`.
      - `lab_preferences` object — Dictionary mapping lab IDs to preference scores Python type: `dict[Lab, Preference]`.
      - `mandatory_days` Day[] — Set of days the faculty must teach on Python type: `set[Day]`.
  - `time_slot_config` TimeSlotConfigInput, required — Represents a time slot configuration. **Usage:** ```python TimeSlotConfig(times={...}, classes=[...]) ``` Python type: `TimeSlotConfig`.
    - `times` object, required — Time blocks keyed by weekday; every Monday-Friday list must be non-empty Python type: `dict[Day, list[TimeBlock]]`.
    - `classes` ClassPattern[], required — Meeting patterns; at least one pattern must be enabled Python type: `list[ClassPattern]`.
      - `credits` integer, required — Number of credit hours Python type: `int`.
      - `meetings` Meeting[], required — List of meeting times Python type: `list[Meeting]`.
        - `day` 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI', required — Day of the week Python type: `Day`.
        - `start_time` string — Time in HH:MM format Python type: `TimeString`.
        - `duration` integer, required — Duration of the meeting in minutes Python type: `int`.
        - `lab` boolean — Whether this is the pattern's single lab meeting Python type: `bool`.
        - `delivery` 'in_person' | 'online' — Delivery mode for one generated meeting. Python type: `DeliveryMode`.
      - `disabled` boolean — Whether the pattern is disabled Python type: `bool`.
      - `start_time` string — Time in HH:MM format Python type: `TimeString`.
    - `max_time_gap` integer — Maximum gap in minutes used to determine whether meetings are adjacent Python type: `int`.
    - `min_time_overlap` integer — Minimum clock-time overlap in minutes between meetings on different pattern days Python type: `int`.
  - `limit` integer — Maximum number of schedules to generate Python type: `int`.
  - `optimizer_flags` OptimizerFlags[] — List of optimizer flags Python type: `list[OptimizerFlags]`.

## Response `200`

Successful Response

- SubmitResponse — Response model for schedule submission requests. **Usage:** ```python SubmitResponse(schedule_id="...", endpoint="/schedules/...") ``` **Fields:** - schedule_id: Unique identifier for the generated schedule session - endpoint: URL endpoint to access the schedule
  - `schedule_id` string, required
  - `endpoint` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-20** `f728bfcee693` — 9 breaking, 10 info
  - added the new required request property `config/courses/items/capacity`
  - added the new required request property `config/labs/items/capacity`
  - added the new required request property `config/labs/items/name`
  - added the new required request property `config/rooms/items/capacity`
  - …15 more
- **2026-07-19** `56f0e753f2e4` — 1 info
  - request property `config/courses/items/faculty` list-of-types was widened by adding types `null` to media type `application/json`
- **2026-07-19** `a414b25abf70` — 3 breaking, 2 warning, 1 info
  - the `config/courses/items/faculty` request property's minItems was increased to `1`
  - the `config/courses/items/room` request property's minItems was increased to `1`
  - the `config/rooms` request property's minItems was increased to `1`
  - the `config/courses/items/credits` request property's exclusiveMinimum was set to `0.00`
  - …2 more

[Change history](https://skmtc.dev/mucsci/apis/course-scheduler-api/changes/submit/post.md)

---

[API](https://skmtc.dev/mucsci/apis/course-scheduler-api.md) · [All operations](https://skmtc.dev/mucsci/apis/course-scheduler-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mucsci/course-scheduler-api/revisions/592f7d3013d3/schema)
