Enrollments
Enroll students in courses to give them access to content
Overview
Enrollments connect students to courses, controlling what content they can access.
When a student is enrolled in a course, they gain access to all its components (units, lessons) and resources. Before enrolling students, you'll need to create the course.
Choose Environment
Decide on Staging for development or Production for live apps.
Authenticate
Get an access token using your Timeback credentials (see Authentication).
Enroll the Student
Use EduBridge for simplified enrollment, or OneRoster for full control.
Environments
Find the API base URL for your target environment:
| Environment | Base URL |
|---|---|
| Staging | https://api.staging.alpha-1edtech.ai |
| Production | https://api.alpha-1edtech.ai |
EduBridge (Recommended)
EduBridge lets you enroll a user in a course with a single API call.
The endpoint handles all necessary background operations:
- Locating or creating a default class for the course
- Establishing appropriate academic sessions (school year and term)
- Creating the enrollment record
You simply specify the user, course, and school: no need to manage the underlying OneRoster academic structure.
curl -X POST $TIMEBACK_API_URL/edubridge/enrollments/enroll/$USER_ID/$COURSE_ID/$SCHOOL_ID \ -H "Authorization: Bearer $ACCESS_TOKEN"const response = await fetch( `${TIMEBACK_API_URL}/edubridge/enrollments/enroll/${userId}/${courseId}/${schoolId}`, { method: 'POST', headers: { Authorization: `Bearer ${accessToken}`, }, },)| Parameter | Description |
|---|---|
userId | The student's unique identifier |
courseId | The course's sourcedId |
schoolId | The school/organization's identifier |
The default role is student. See the EduBridge API Reference for additional options.
You can also use OneRoster directly if you need full control over the enrollment process.
Query Enrollments
Get All Enrollments for a User
curl "$TIMEBACK_API_URL/edubridge/enrollments/user/$USER_ID" \ -H "Authorization: Bearer $ACCESS_TOKEN"const enrollments = await fetch(`${TIMEBACK_API_URL}/edubridge/enrollments/user/${userId}`, { headers: { Authorization: `Bearer ${accessToken}`, },})curl "$TIMEBACK_API_URL/ims/oneroster/rostering/v1p2/enrollments?filter=user.sourcedId%3D%27$USER_ID%27" \ -H "Authorization: Bearer $ACCESS_TOKEN"const enrollments = await fetch( `${TIMEBACK_API_URL}/ims/oneroster/rostering/v1p2/enrollments?filter=user.sourcedId='${userId}'`, { headers: { Authorization: `Bearer ${accessToken}`, }, },)