Skip to content

Saves the full lesson record — title, status, body and metadata — and reconciles the featured image media.

The payload is nested under lesson, and title, parent_id and a status of draft, published or archived are required. An empty message is honoured, so the body can be cleared deliberately. Removing the featured image detaches the underlying media row. Attached document ids are preserved from the stored metadata rather than taken from the request.

Endpoint

  • Method: PUT

  • Path: /admin/courses/{course_id}/lessons/{lesson_id}

  • Edition: Core

  • Controller: CourseAdminController@updateLesson

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

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

  • Requires the course-creator permission and management access to this course.

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 Lesson

PUT
/admin/courses/{course_id}/lessons/{lesson_id}

Saves the full lesson record — title, status, body and metadata — and reconciles the featured image media.

Controller: CourseAdminController@updateLesson
Route source: fluent-community/Modules/Course/Http/course_api.php:57

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
lesson_id*

Lesson ID extracted from the URL path.

Type
integer
Required

Request Body

application/json
JSON
{
  
"lesson": {
  
  
"meta": {
  
  
},
  
  
"title": "string",
  
  
"status": "string",
  
  
"message": "string",
  
  
"parent_id": "string"
  
}
}

Responses

Successful response

application/json
JSON
{
  
"lesson": {
  
  
"comments_count": 0,
  
  
"content_type": "string",
  
  
"created_at": "string",
  
  
"expired_at": "string",
  
  
"featured_image": "string",
  
  
"id": 0,
  
  
"is_sticky": "string",
  
  
"message": "string",
  
  
"message_rendered": "string",
  
  
"meta": {
  
  
  
"auto_complete_on_video_end": "string",
  
  
  
"document_ids": [
  
  
  
  
{
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"document_lists": [
  
  
  
  
{
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"enable_comments": "string",
  
  
  
"enable_media": "string",
  
  
  
"enable_passing_score": "string",
  
  
  
"enforce_passing_score": "string",
  
  
  
"free_preview_lesson": "string",
  
  
  
"hide_result": "string",
  
  
  
"media": {
  
  
  
  
"provider": "string"
  
  
  
},
  
  
  
"passing_score": 0,
  
  
  
"require_video_completion": "string",
  
  
  
"video_completion_threshold": 0,
  
  
  
"video_length": 0
  
  
},
  
  
"parent_id": "string",
  
  
"priority": "string",
  
  
"privacy": "string",
  
  
"reactions_count": 0,
  
  
"scheduled_at": "string",
  
  
"slug": "string",
  
  
"space_id": "string",
  
  
"status": "string",
  
  
"title": "string",
  
  
"type": "string",
  
  
"updated_at": "string",
  
  
"user_id": "string"
  
},
  
"message": "string"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation