POST /api/v1/unit-instance/{unit}/new-online-lesson

Create a new virtual/online lesson (e.g., video conference, webinar) for the unit. Online lessons include meeting links and scheduling information. Only admins and lecturers can create online lessons.

Path parameters

  • unit string Required

    UUID of the unit instance (unit offering)

application/json

Body Required

Online lesson data including title, meeting link, schedule, and platform details

string string

Responses

  • 201 application/json

    Online lesson created successfully

  • 400

    Invalid online lesson data

  • 403

    Forbidden - Admin or Lecturer role required

POST /api/v1/unit-instance/{unit}/new-online-lesson
curl \
 --request POST 'http://localhost:3500/api/v1/unit-instance/123e4567-e89b-12d3-a456-426614174000/new-online-lesson' \
 --header "Content-Type: application/json" \
 --data '{"title":"Live Coding Session - Binary Trees","duration":90,"platform":"ZOOM","meetingUrl":"https://zoom.us/j/1234567890","description":"Interactive coding session on binary tree implementation","scheduledAt":"2025-11-20T14:00:00Z"}'
Request examples
{
  "title": "Live Coding Session - Binary Trees",
  "duration": 90,
  "platform": "ZOOM",
  "meetingUrl": "https://zoom.us/j/1234567890",
  "description": "Interactive coding session on binary tree implementation",
  "scheduledAt": "2025-11-20T14:00:00Z"
}
{
  "title": "Q&A Session - Midterm Review",
  "duration": 60,
  "platform": "TEAMS",
  "meetingUrl": "https://teams.microsoft.com/l/meetup-join/...",
  "description": "Ask questions about midterm topics",
  "scheduledAt": "2025-11-22T16:00:00Z"
}
Response examples (201)
{
  "lesson": {
    "id": "online-lesson-789",
    "title": "Live Coding Session - Binary Trees",
    "status": "SCHEDULED",
    "duration": 90,
    "platform": "ZOOM",
    "meetingUrl": "https://zoom.us/j/1234567890",
    "scheduledAt": "2025-11-20T14:00:00Z",
    "unitOfferingId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "message": "Online lesson created successfully"
}