Enrols one existing WordPress user in the course on behalf of an administrator.
user_id is required and must reference a real user; their community profile is created on the fly if missing. Users whose profile is not active are rejected, as is a user who is already enrolled.
Endpoint
Method:
POSTPath:
/admin/courses/{course_id}/studentsEdition: Core
Controller:
CourseAdminController@addStudentRoute source:
fluent-community/Modules/Course/Http/course_api.php:30Controller source:
fluent-community/Modules/Course/Http/Controllers/CourseAdminController.phpRequires a course admin for this course, or a WordPress user with
manage_options.
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 Add Course Student
Enrols one existing WordPress user in the course on behalf of an administrator.
Controller: CourseAdminController@addStudent
Route source: fluent-community/Modules/Course/Http/course_api.php:30
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Path Parameters
Course ID extracted from the URL path.
Request Body
Responses
Successful response