latestOpenAPI 3.1.02026-08-1182263351.1 KB

f8025de20169

Enrollments

Bulk-enroll students

Enroll up to BATCH_MAX_ITEMS students into one published course.

The hybrid envelope shares published_course_id and expires_at at the top level; data is the per-row item list. Each row is processed independently — a failure on one row does not abort the rest. Response is 200 if every row succeeded, 207 if any row failed, 400 if the request envelope is empty, over the cap, or carries a past expires_at (matches the ticket AC "past timestamps return 400, request-level").

Within-batch duplicate detection is first-wins: subsequent occurrences of an email are pre-marked duplicate_in_batch without reaching the service.

See api_v2/docs/enrollments.md for the per-row failure-code vocabulary, reactivation behavior, retry contract, and demo seed prerequisites.

Required OAuth scope: enrollments:write

post/v2/enrollments/

Request body

published_course_idstring required

Obfuscated id of the target PublishedCourse.

expires_atstring date-time nullable

ISO 8601 timestamp when the enrollments expire. Optional. Must be in the future when provided.

Response

OK