Skip to content

Records that the current user has watched enough of a gated lesson video to be allowed to mark the lesson complete.

Send watched_percent; it must reach the lesson threshold or the call is rejected with the required figure. A lesson that is not video-gated returns is_gated: false and records nothing.

Endpoint

  • Method: POST

  • Path: /courses/{course_id}/lessons/{lesson_id}/video-watched

  • Edition: Core

  • Controller: CourseController@markLessonVideoWatched

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

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

  • Requires a signed-in user who is enrolled in the 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.

POST Post Mark Lesson Video Watched

POST
/courses/{course_id}/lessons/{lesson_id}/video-watched

Records that the current user has watched enough of a gated lesson video to be allowed to mark the lesson complete.

Controller: CourseController@markLessonVideoWatched
Route source: fluent-community/Modules/Course/Http/course_api.php:16

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
{
  
"watched_percent": "string"
}

Responses

Successful response

application/json
JSON
{
  
"is_gated": true,
  
"message": "string",
  
"watched": true
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation