Add a new topic (module/chapter) to organize lessons within a unit instance. Topics help structure course content. Only admins and lecturers can create topics.
POST
/api/v1/unit-instance/{unit}/new-topic
curl \
--request POST 'http://localhost:3500/api/v1/unit-instance/123e4567-e89b-12d3-a456-426614174000/new-topic' \
--header "Content-Type: application/json" \
--data '{"title":"Introduction to Algorithms","orderIndex":1,"description":"Fundamental concepts of algorithmic thinking and problem solving"}'
Request example
{
"title": "Introduction to Algorithms",
"orderIndex": 1,
"description": "Fundamental concepts of algorithmic thinking and problem solving"
}
Response examples (201)
{
"topic": {
"id": "topic-123",
"title": "Introduction to Algorithms",
"createdAt": "2025-11-17T10:00:00Z",
"orderIndex": 1,
"unitOfferingId": "123e4567-e89b-12d3-a456-426614174000"
},
"message": "Topic created successfully"
}