Unenroll users

Remove learners from one course.

POST https://cotlet.dev/api/v1/learnupon/courses/{course_id}/users/unenroll

write Confirm

Unenrolls the users from one course, which removes their access to it. A manager needs the permission to unenroll users, which is off by default. Completed courses stay in the training record when you only unenroll from open ones. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: unenroll_users
NameTypeDescription
course_id string required string Course id from list_courses.
user_ids array required array User ids from list_users.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/learnupon/courses/course_8c41d2/users/unenroll \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_ids":"user ids"}'
Python
result = client.call("learnupon", "unenroll_users", {"course_id":"course_8c41d2","user_ids":"user ids"})
Node.js
const result = await cotlet.call('learnupon', 'unenroll_users', {"course_id":"course_8c41d2","user_ids":"user ids"});
CLI
cotlet call learnupon unenroll_users --data '{"course_id":"course_8c41d2","user_ids":"user ids"}'

Example response

JSON

{
  "course_id": "10233",
  "unenrolled": 2
}

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.