Updates a course record and its settings block, firing the course-published hook the first time its status crosses into published.
The same required fields as creation apply, plus status (draft, published or archived). Cover photo and logo are cleared when their fields are empty, so omitting them removes the images. Reassigning created_by is only honoured for community admins. Hooks fire only when something actually changed.
Endpoint
Method:
PUTPath:
/admin/courses/{course_id}Edition: Core
Controller:
CourseAdminController@updateCourseRoute source:
fluent-community/Modules/Course/Http/course_api.php:25Controller 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.
PUT Update Course
Updates a course record and its settings block, firing the course-published hook the first time its status crosses into published.
Controller: CourseAdminController@updateCourse
Route source: fluent-community/Modules/Course/Http/course_api.php:25
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