Skip to main content
POST
Enroll user in a course

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

userId
string
required

The unique identifier for the user

courseId
string
required

The unique identifier for the course

schoolId
string

The unique identifier for the school

Body

application/json
sourcedId
string

Optional client-provided ID for the enrollment

role
enum<string>
default:student
Available options:
administrator,
proctor,
student,
teacher
beginDate
string<date-time>

The date the user is enrolled in the course, defaults to today

ensureExactCourseEnrollment
boolean
default:false

Atomically reuse an existing enrollment for this exact course across schools, preserving future schedules and reactivating an expired row

activateScheduledExactCourseEnrollment
boolean
default:false

With exact-course ensure, explicitly extend a later scheduled exact enrollment to the requested begin date

replaceCourseSourcedId
string

Optional source course to retire in the same transaction, and only after the exact target provides current coverage

replaceEnrollmentSourcedId
string

Optional exact source enrollment cycle to retire; requires replaceCourseSourcedId and prevents a later enrollment in the same source course from being replaced

metadata
object

Response

Existing enrollment response

data
object
required
meta
object
required