Enroll a student
Path parameters
string
required
UUID of the student to enroll. The student must already be a member of your academy, add them first using POST /api/v1/students if needed.
Body parameters
string
required
UUID of the course to enroll the student in. The course must belong to your academy and be published. Draft courses return a
400 error.Constraints
- The student identified by
studentIdmust be an active member of your academy. A404is returned if they are not found. - The course identified by
course_idmust exist in your academy and have a published status. A404is returned if it does not exist; a400is returned if it exists but is not published.
Response fields
Returns the enrollment record with a201 status code.
object
required
Example request
Example response
Error responses
Revoke an enrollment
Revokes an assigned course: ends the student’s course grant and marks the enrollment record as revoked (the record is preserved). Re-assigning later through POST /api/v1/students/:studentId/enrollments restores access on the same record. Access in Fayne is layered. If the course is free for everyone, was purchased by the student, or is covered by an offer they hold, revoking the assignment does not lock the course. The response tells you whether the student can still open the course after the revoke, so your automation never has to guess.Path parameters
string
required
UUID of the student whose enrollment you are revoking.
string
required
UUID of the enrollment record to revoke. This is the
id returned when the enrollment was created.Response fields
object
required

