DELETE /api/v1/topic/{id}

Permanently delete a topic and all associated lessons. Only admins and lecturers can delete topics. Use with caution as this action cannot be undone.

Path parameters

  • id string Required

    UUID of the topic to delete

Responses

  • 200 application/json

    Topic deleted successfully

  • 400

    Cannot delete topic with existing lessons or materials

  • 403

    Forbidden - Admin or Lecturer role required

  • 404

    Topic not found

DELETE /api/v1/topic/{id}
curl \
 --request DELETE 'http://localhost:3500/api/v1/topic/123e4567-e89b-12d3-a456-426614174000'
Response examples (200)
{
  "message": "Topic deleted successfully",
  "success": true,
  "deletedTopicId": "123e4567-e89b-12d3-a456-426614174000"
}