Skip to content

Adds a published section to the end of a course outline.

title is required. The new section takes the next free priority, so it always appears last.

Endpoint

  • Method: POST

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

  • Edition: Core

  • Controller: CourseAdminController@createSection

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

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

POST Create Course Section

POST
/admin/courses/{course_id}/sections

Adds a published section to the end of a course outline.

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

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"
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"section": {
  
  
"created_at": "string",
  
  
"id": 0,
  
  
"lessons": [
  
  
  
{
  
  
  
  
"additionalProperties": "string"
  
  
  
}
  
  
],
  
  
"meta": {
  
  
  
"preview_data": "string"
  
  
},
  
  
"priority": 0,
  
  
"slug": "string",
  
  
"space_id": "string",
  
  
"status": "string",
  
  
"title": "string",
  
  
"type": "string",
  
  
"updated_at": "string",
  
  
"user_id": 0
  
}
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation