curl --request POST \
--url https://api.alpha-1edtech.ai/edubridge/enrollments/enroll/{userId}/{courseId}/{schoolId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourcedId": "<string>",
"role": "student",
"beginDate": "2023-11-07T05:31:56Z",
"metadata": {
"goals": {
"dailyXp": 123,
"dailyLessons": 123,
"dailyActiveMinutes": 123,
"dailyAccuracy": 123,
"dailyMasteredUnits": 123
},
"metrics": {
"totalXp": 123,
"totalLessons": 123,
"totalGrades": 123,
"courseType": "<string>",
"isSupplemental": true
}
}
}
'{
"data": {
"id": "123",
"role": "administrator",
"beginDate": "<string>",
"endDate": "<string>",
"course": {
"id": "<string>",
"title": "<string>",
"metadata": {},
"subjects": [
"<string>"
],
"grades": [
"<string>"
],
"primaryApp": {
"id": "<string>",
"name": "<string>",
"domains": [
"<string>"
]
}
},
"school": {
"id": "<string>",
"name": "<string>"
},
"metadata": {
"goals": {
"dailyXp": 123,
"dailyLessons": 123,
"dailyActiveMinutes": 123,
"dailyAccuracy": 123,
"dailyMasteredUnits": 123
},
"metrics": {
"totalXp": 123,
"totalLessons": 123,
"totalGrades": 123,
"courseType": "<string>",
"isSupplemental": true
}
}
}
}Enrolls a user in a course with a single API call.
This endpoint handles all necessary background operations: locating or creating a default class for the course, establishing appropriate academic sessions (school year and term), and creating the enrollment record.
Consumers can simply specify the user, course, and role (default is ‘student’) without needing to understand or manage the underlying academic structure that OneRoster requires.
curl --request POST \
--url https://api.alpha-1edtech.ai/edubridge/enrollments/enroll/{userId}/{courseId}/{schoolId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourcedId": "<string>",
"role": "student",
"beginDate": "2023-11-07T05:31:56Z",
"metadata": {
"goals": {
"dailyXp": 123,
"dailyLessons": 123,
"dailyActiveMinutes": 123,
"dailyAccuracy": 123,
"dailyMasteredUnits": 123
},
"metrics": {
"totalXp": 123,
"totalLessons": 123,
"totalGrades": 123,
"courseType": "<string>",
"isSupplemental": true
}
}
}
'{
"data": {
"id": "123",
"role": "administrator",
"beginDate": "<string>",
"endDate": "<string>",
"course": {
"id": "<string>",
"title": "<string>",
"metadata": {},
"subjects": [
"<string>"
],
"grades": [
"<string>"
],
"primaryApp": {
"id": "<string>",
"name": "<string>",
"domains": [
"<string>"
]
}
},
"school": {
"id": "<string>",
"name": "<string>"
},
"metadata": {
"goals": {
"dailyXp": 123,
"dailyLessons": 123,
"dailyActiveMinutes": 123,
"dailyAccuracy": 123,
"dailyMasteredUnits": 123
},
"metrics": {
"totalXp": 123,
"totalLessons": 123,
"totalGrades": 123,
"courseType": "<string>",
"isSupplemental": true
}
}
}
}The access token received from the authorization server in the OAuth 2.0 flow.
The unique identifier for the user
The unique identifier for the course
The unique identifier for the school
Successful response
Show child attributes