Create a course
POST/api/courses
Creates a course (with a generated registration code) and seeds its faculty roster, all in one transaction. System administrators only. A new course is always created unpublished (publishing is a separate action) and requires at least one faculty member. Datetime-local strings are interpreted in the course's timezone before being stored as UTC.
Auth: requires FACULTY / TA
Request
Responses
- 201
- 400
- 403
- 409
- 500
Course created (always unpublished); returns the course with its enrolled roster.
Missing registration window, no faculty, or Zod validation failed.
System administrators only (logged as a security event).
A course with that code and semester already exists.
Server error.