Skip to content

Copies a course, its sections, its lessons and their attached documents into a new draft owned by the current user.

The copy takes the original title with a "(Copy)" suffix and a timestamped slug, and is always created as a draft regardless of the source status. Students, enrolments and progress are not copied.

Endpoint

  • Method: POST

  • Path: /admin/courses/{course_id}/duplicate

  • Edition: Core

  • Controller: CourseAdminController@duplicateCourse

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

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

  • Requires the course-creator permission.

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 Duplicate Course

POST
/admin/courses/{course_id}/duplicate

Copies a course, its sections, its lessons and their attached documents into a new draft owned by the current user.

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

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

Responses

Successful response

application/json
JSON
{
  
"course": {
  
  
"cover_photo": "string",
  
  
"created_at": "string",
  
  
"created_by": 0,
  
  
"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_sidebar": "string",
  
  
  
"topic_required": "string"
  
  
},
  
  
"slug": "string",
  
  
"status": "string",
  
  
"title": "string",
  
  
"type": "string",
  
  
"updated_at": "string"
  
},
  
"message": "string"
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation