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

Parameters: unenroll_user
NameTypeDescription
user_id string required string User ID from list_users.
course_id string required string Course ID from list_courses.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/absorb-lms/courses/course_8c41d2/users/user_8c41d2/unenroll \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("absorb-lms", "unenroll_user", {"user_id":"user_8c41d2","course_id":"course_8c41d2"})
Node.js
const result = await cotlet.call('absorb-lms', 'unenroll_user', {"user_id":"user_8c41d2","course_id":"course_8c41d2"});
CLI
cotlet call absorb-lms unenroll_user --data '{"user_id":"user_8c41d2","course_id":"course_8c41d2"}'

Example response

JSON

{
  "unenrolled": {
    "user_id": "9b7e5d10-2c44-4f0b-8a31-6e2f9c4d7702",
    "name": "Omar Haddad",
    "course": "Warehouse Safety Basics"
  }
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.