Enrollment status transitions
Enrollments move through the following statuses. Direct transitions from
completed back to active are not permitted — re-enrollment creates a new enrollment record instead.The enrollment object
Unique identifier for the enrollment. Format:
enr_<alphanumeric>.The ID of the enrolled user.
The ID of the course the user is enrolled in.
Current enrollment status. One of
active, completed, or dropped.Completion progress from
0 to 100. Automatically updated as the learner completes course modules.ISO 8601 timestamp of when the enrollment was created.
ISO 8601 timestamp of when the enrollment status changed to
completed. null if not yet completed.List enrollments
GET /api/v1/enrollments
Returns a paginated list of enrollments. Admins see all enrollments; learners only see their own.
Query parameters
Filter enrollments by a specific user ID.
Filter enrollments by a specific course ID.
Filter by enrollment status. One of
active, completed, or dropped.Page number to retrieve.
Number of enrollments per page. Maximum 100.
Example
Get an enrollment
GET /api/v1/enrollments/:id
Returns a single enrollment by its ID.
Create an enrollment
POST /api/v1/enrollments
Enrolls a user in a course. Admins can enroll any user. Learners can self-enroll in published courses.
Request body
The ID of the user to enroll.
The ID of the course to enroll the user in. Must be a published course.
Example
Update an enrollment
PUT /api/v1/enrollments/:id
Updates the status of an enrollment. Typically used to drop or reactivate an enrollment.
New status for the enrollment. One of
active or dropped. The completed status is set automatically by the system when progress reaches 100%.Delete an enrollment
DELETE /api/v1/enrollments/:id
Permanently removes an enrollment record. Requires the admin role.
