Skip to content

Creates a course in draft state, with its type, privacy, layout and lock screen behaviour set from the submitted settings.

title, description, privacy (public, private or secret) and course_type (self_paced, structured or scheduled) are all required. A custom lock screen is only honoured on private courses, and the redirect variant additionally requires a valid settings.onboard_redirect_url. public_lesson_view is only stored for public self-paced courses. A colliding slug gets a timestamp suffix rather than failing.

Endpoint

  • Method: POST

  • Path: /admin/courses

  • Edition: Core

  • Controller: CourseAdminController@createCourse

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

  • 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 Create Course

POST
/admin/courses

Creates a course in draft state, with its type, privacy, layout and lock screen behaviour set from the submitted settings.

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

Authorizations

ApplicationPasswords

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

Type
API Key (header: Authorization)

Request Body

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

Responses

Successful response

application/json
JSON
{
  
"course": {
  
  
"created_at": "string",
  
  
"created_by": 0,
  
  
"description": "string",
  
  
"id": 0,
  
  
"parent_id": "string",
  
  
"privacy": "string",
  
  
"serial": 0,
  
  
"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
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation