---
title: "PUT /timetables"
method: PUT
path: "/timetables"
---

# PUT /timetables

`PUT /timetables`

## Request body

- TimetableParams — From T, pick a set of properties whose keys are in the union K
  - `courses` TimetableCourse[], required
    - `color` string, required — The colour code displayed on the timetable
    - `tutorial` string[] — The selected tutorial section of the course.
    - `lab` string[] — The selected lab section of the course.
    - `lecture` string[] — The selected lecture section of the course.
    - `pid` string, required — The PID of the course.
    - `code` string, required — The code portion of the course.
    - `subject` string, required — Abbreviation of the subject of the course.
  - `term` '202001' | '202005' | '202009' | '202101' | '202105' | '202109' | '202201' | '202205' | '202209' | '202301' | '202305' | '202309' | '202401', required

## Response `201`

Created

- union
  - TimetableReturn
    - `slug` string, required
    - `courses` TimetableCourse[], required
      - `color` string, required — The colour code displayed on the timetable
      - `tutorial` string[] — The selected tutorial section of the course.
      - `lab` string[] — The selected lab section of the course.
      - `lecture` string[] — The selected lecture section of the course.
      - `pid` string, required — The PID of the course.
      - `code` string, required — The code portion of the course.
      - `subject` string, required — Abbreviation of the subject of the course.
    - `term` '202001' | '202005' | '202009' | '202101' | '202105' | '202109' | '202201' | '202205' | '202209' | '202301' | '202305' | '202309' | '202401', required
  - unknown

## Other responses

- `422` — Invalid data

---

[API](https://skmtc.net/vikelabs/apis/functions.md) · [All operations](https://skmtc.net/vikelabs/apis/functions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vikelabs/functions/versions/5043f9148dcf/schema)
