POST /api/v1/unit-instance/{unit}/new-topic

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.

Path parameters

  • unit string Required

    UUID of the unit instance (unit offering)

application/json

Body Required

Topic data including title, description, and order

  • title string Required
  • description string Required

Responses

  • 201 application/json

    Topic created successfully

  • 400

    Invalid topic data

  • 403

    Forbidden - Admin or Lecturer role required

POST /api/v1/unit-instance/{unit}/new-topic
curl \
 --request POST 'https://api.echoplain.social/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"
}