Enrollment
Enroll in course
Enrolls the authenticated user in a published course. If previously dropped, the enrollment is reactivated.
ProductionStagingUAT
POSThttps://ankiren.com/api/courses/{courseId}/enroll
Parameters
Path Parameters
- courseIdintegerpathRequired
Course ID
Responses
200 · Enrollment reactivated
- idinteger
- userIdstring
- courseIdinteger
- status"active" | "completed" | "dropped"
- enrolledAtstring<date-time>
- completedAtstring<date-time>?
application/json
{ "id": 1, "userId": "user_abc123", "courseId": 1, "status": "active", "enrolledAt": "2025-01-01T00:00:00Z", "completedAt": "2026-01-01T00:00:00.000Z" }
Sample Code
Đổi ngôn ngữ ở ô Language trên thanh Documentation.
cURL
curl -X POST 'https://ankiren.com/api/courses/{courseId}/enroll' \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/json'