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

## 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

---

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