Unenroll user
Remove one user's enrollment in one course.
POST https://cotlet.dev/api/v1/absorb-lms/courses/{course_id}/users/{user_id}/unenroll
write Confirm
Removes the enrollment through the Un-enroll action of the Course Enrollments report. Read the enrollment with list_user_enrollments first. Completions that already happened stay on the transcript. The learner can no longer open the course. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| user_id string required | string | User ID from list_users. |
| course_id string required | string | Course ID from list_courses. |
Request
curl -X POST https://cotlet.dev/api/v1/absorb-lms/courses/course_8c41d2/users/user_8c41d2/unenroll \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("absorb-lms", "unenroll_user", {"user_id":"user_8c41d2","course_id":"course_8c41d2"}) const result = await cotlet.call('absorb-lms', 'unenroll_user', {"user_id":"user_8c41d2","course_id":"course_8c41d2"}); cotlet call absorb-lms unenroll_user --data '{"user_id":"user_8c41d2","course_id":"course_8c41d2"}' Example response
{
"unenrolled": {
"user_id": "9b7e5d10-2c44-4f0b-8a31-6e2f9c4d7702",
"name": "Omar Haddad",
"course": "Warehouse Safety Basics"
}
}