Bulk enroll learners
enrollment_bulk_createEnroll up to 100 learners in one course in a single call, under the same rules as enrollment_create (accounts found or created, prerequisites checked unless skipped, no email unless sendInvite:true); use enrollment_create for one learner or to pass redirectTo or externalReference. Learners are processed one at a time: an invalid email or unmet prerequisites fails only that learner, so the call can partly succeed, but an unexpected server error stops the batch with no per-learner results (learners enrolled before it stay enrolled, so re-run the call). Already-enrolled learners keep their enrollment (created:false, status label reset to "completed"), so a retry duplicates nothing, though it re-sends invites when sendInvite is on and replaces earlier sign-in links. Returns "Enrolled N, failed M" and a result per learner (email, ok, created, emailSent, magicLinkUrl, enrollment; or error and missingPrerequisites); if every learner fails, the call errors with those results. Get course ids from course_list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emails | No | Learner emails, 1 to 100. Use this OR learners. | |
| courseId | Yes | Id of a course on this site (required). For a course linked to Open edX this creates only Cubite enrollments, not the learners' Open edX ones. | |
| learners | No | Learners with display names, 1 to 100. Use this OR emails; if both are sent, learners is used. | |
| sendInvite | No | Have Cubite email each learner a one-click sign-in invite (or the plain enrolment email when no link can be issued). Default false; each result carries emailSent. | |
| issueMagicLink | No | Return a single-use 24-hour sign-in link per learner as magicLinkUrl (default true; null for admins, password accounts and people on other Cubite sites). Each one cancels that learner's earlier link. Ignored when sendInvite is true. | |
| skipPrerequisiteCheck | No | Enroll even if the course has unmet prerequisites (default false); otherwise those learners fail with missingPrerequisites. |