Skip to content

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: PUT

  • Path: /admin/courses/{course_id}

  • Edition: Core

  • Controller: CourseAdminController@updateCourse

  • Route source: fluent-community/Modules/Course/Http/course_api.php:25

  • Controller source: fluent-community/Modules/Course/Http/Controllers/CourseAdminController.php

  • Requires 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

PUT
/admin/courses/{course_id}

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

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Parameters

Path Parameters

course_id*

Course ID extracted from the URL path.

Type
integer
Required

Request Body

application/json
JSON
{
  
"title": "string",
  
"privacy": "string",
  
"description": "string",
  
"status": "string",
  
"cover_photo": "string",
  
"parent_id": "string",
  
"slug": "string",
  
"created_by": "string",
  
"course_type": "string",
  
"settings": {
  
  
"custom_lock_screen": "string",
  
  
"onboard_redirect_url": "string",
  
  
"emoji": "string",
  
  
"shape_svg": "string",
  
  
"disable_comments": "string",
  
  
"hide_members_count": "string",
  
  
"hide_instructor_view": "string",
  
  
"show_instructor_students_count": "string",
  
  
"show_paywalls": "string",
  
  
"show_welcome_banner": "string",
  
  
"course_layout": "string",
  
  
"course_details": "string",
  
  
"sequential_lesson_order": "string",
  
  
"public_lesson_view": "string"
  
},
  
"category_ids": [
  
  
"string"
  
],
  
"meta_settings": [
  
  
"string"
  
]
}

Responses

Successful response

application/json
JSON
{
  
"course": {
  
  
"cover_photo": "string",
  
  
"created_at": "string",
  
  
"created_by": "string",
  
  
"description": "string",
  
  
"id": 0,
  
  
"logo": "string",
  
  
"parent_id": "string",
  
  
"privacy": "string",
  
  
"serial": "string",
  
  
"settings": {
  
  
  
"can_request_join": "string",
  
  
  
"course_details": "string",
  
  
  
"course_layout": "string",
  
  
  
"course_type": "string",
  
  
  
"custom_lock_screen": "string",
  
  
  
"disable_comments": "string",
  
  
  
"emoji": "string",
  
  
  
"hide_instructor_view": "string",
  
  
  
"hide_members_count": "string",
  
  
  
"layout_style": "string",
  
  
  
"links": [
  
  
  
  
{
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"members_page_status": "string",
  
  
  
"og_image": "string",
  
  
  
"public_lesson_view": "string",
  
  
  
"restricted_post_only": "string",
  
  
  
"sequential_lesson_order": "string",
  
  
  
"shape_svg": "string",
  
  
  
"show_instructor_students_count": "string",
  
  
  
"show_paywalls": "string",
  
  
  
"show_sidebar": "string",
  
  
  
"show_welcome_banner": "string",
  
  
  
"topic_required": "string"
  
  
},
  
  
"slug": "string",
  
  
"status": "string",
  
  
"title": "string",
  
  
"type": "string",
  
  
"updated_at": "string"
  
},
  
"message": "string"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation