Enrols the current user in a course and returns their freshly initialised progress track.
Self-enrolment only works on published, public courses; course admins may enrol themselves in their own unpublished courses. Calling it again on an existing enrolment is not an error — it returns the current track with an already-enrolled message.
Endpoint
Method:
POSTPath:
/courses/{course_id}/enrollEdition: Core
Controller:
CourseController@enrollCourseRoute source:
fluent-community/Modules/Course/Http/course_api.php:14Controller source:
fluent-community/Modules/Course/Http/Controllers/CourseController.phpRequires a signed-in user; private and secret courses must be joined through an admin or a paywall.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
POST Enroll Course
Enrols the current user in a course and returns their freshly initialised progress track.
Controller: CourseController@enrollCourse
Route source: fluent-community/Modules/Course/Http/course_api.php:14
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Path Parameters
Course ID extracted from the URL path.
Responses
Successful response