PATCH /api/v1/topic/{id}

Update information for a specific topic within a unit. Topics are used to organize lessons and learning materials. Only admins and lecturers can update topics.

Path parameters

  • id string Required

    UUID of the topic to update

application/json

Body Required

Topic data to update (title, description, order, etc.)

  • title string
  • description string
  • order number Required

Responses

  • 200 application/json

    Topic updated successfully

  • 400

    Invalid topic data provided

  • 403

    Forbidden - Admin or Lecturer role required

  • 404

    Topic not found

PATCH /api/v1/topic/{id}
curl \
 --request PATCH 'https://api.echoplain.social/api/v1/topic/123e4567-e89b-12d3-a456-426614174000' \
 --header "Content-Type: application/json" \
 --data '{"title":"Introduction to Data Structures","description":"Fundamental concepts of data organization and manipulation"}'
Request examples
{
  "title": "Introduction to Data Structures",
  "description": "Fundamental concepts of data organization and manipulation"
}
{
  "orderIndex": 2
}
Response examples (200)
{
  "topic": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "title": "Introduction to Data Structures",
    "orderIndex": 2,
    "description": "Fundamental concepts of data organization and manipulation"
  },
  "message": "Topic updated successfully",
  "success": true
}