Enroll users in courses

Enroll users in one or more courses with a start date and a due date.

POST https://cotlet.dev/api/v1/ispring/users/enroll

write Confirm

Runs the Enroll Users wizard: courses, users, then parameters. due_mode is use_course_settings (the Availability tab of the course), by_date (midnight of due_date unless a time is given), for_period (due_period counted from the start) or none. In for_period a month is always 30 days and a year 365. Learners get a notification in the user portal and by email, and the course appears in My Courses. Department Administrators can enroll only users from their departments. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: enroll_users
NameTypeDescription
course_ids string[] required string[] Courses from list_courses.
user_ids string[] required string[] Users from list_users.
start_date datetime datetime When the course opens. Default: now.
due_mode enum enum use_course_settings (default), by_date, for_period or none.
due_date date date Needed for by_date.
due_period string string Needed for for_period: a number and days, weeks, months or years, e.g. "30 days".
restrict_access_after_due boolean boolean With by_date or for_period: learners cannot study after the due date. Default: false.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/ispring/users/enroll \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course_ids":["c_4f2a91"],"user_ids":["u_81c2d4","u_81c2e9"],"start_date":"2026-11-02T09:00","due_mode":"by_date","due_date":"2026-11-30"}'
Python
result = client.call("ispring", "enroll_users", {"course_ids":["c_4f2a91"],"user_ids":["u_81c2d4","u_81c2e9"],"start_date":"2026-11-02T09:00","due_mode":"by_date","due_date":"2026-11-30"})
Node.js
const result = await cotlet.call('ispring', 'enroll_users', {"course_ids":["c_4f2a91"],"user_ids":["u_81c2d4","u_81c2e9"],"start_date":"2026-11-02T09:00","due_mode":"by_date","due_date":"2026-11-30"});
CLI
cotlet call ispring enroll_users --data '{"course_ids":["c_4f2a91"],"user_ids":["u_81c2d4","u_81c2e9"],"start_date":"2026-11-02T09:00","due_mode":"by_date","due_date":"2026-11-30"}'

Example response

JSON

{
  "enrolled": 2,
  "enrollments": [
    {
      "enrollment_id": "e_70a1b3",
      "user": "Ana Lopez",
      "course": "Information Security Basics",
      "start_date": "2026-11-02T09:00:00",
      "due_date": "2026-11-30T00:00:00"
    },
    {
      "enrollment_id": "e_70a1b4",
      "user": "Tom Becker",
      "course": "Information Security Basics",
      "start_date": "2026-11-02T09:00:00",
      "due_date": "2026-11-30T00:00:00"
    }
  ]
}

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.