Get Enrolled Courses
User API
Get Enrolled Courses
Retrieve list of courses the authenticated user is enrolled in with course details and user ratings
GET
Get Enrolled Courses
Authentication
This endpoint requires authentication via Clerk. TheuserId is automatically extracted from the authentication token.
Response
Indicates whether the request was successful
Array of enrolled course objects
Error message if success is false
Response Examples
Error Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | User not found |
| 500 | Internal server error |
Notes
- The
enrolledStudentsfield is excluded from course data in the response - User ratings are retrieved from the
courseRatingsarray within each course - Courses are populated with full course details using MongoDB populate