Get user
One user with groups, enrollments, user type and whether login is enabled.
GET https://cotlet.dev/api/v1/learnupon/users/{user_id}
read
Returns the profile of one user: name, email, user type, Login enabled, expiry date, the groups the user belongs to and every enrollment with its status. Use it before unenrolling or disabling someone, to see what will change. A pending user has no enrollments until they accept, unless you enrolled them by email.
Parameters
| Name | Type | Description |
|---|---|---|
| user_id string required | string | User id from list_users. |
Request
curl https://cotlet.dev/api/v1/learnupon/users/user_8c41d2 \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("learnupon", "get_user", {"user_id":"user_8c41d2"}) const result = await cotlet.call('learnupon', 'get_user', {"user_id":"user_8c41d2"}); cotlet call learnupon get_user --data '{"user_id":"user_8c41d2"}' Example response
{
"user_id": "51872",
"name": "Maria Nowak",
"email": "maria.nowak@example.com",
"user_type": "learner",
"login_enabled": true,
"expires": null,
"groups": [
{
"group_id": "4821",
"name": "Onboarding"
}
],
"enrollments": [
{
"enrollment_id": "90417",
"course": "Data privacy basics",
"status": "In Progress"
},
{
"enrollment_id": "90102",
"course": "Welcome and Tools basics",
"status": "Completed"
}
]
}