Docs home

Create Section

Creates a section (a chapter or module heading) inside a course module's curriculum. Use it to build a course's structure before adding materials, tests and assignments to each section.

POST/tutor/sections
Create Section
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/tutor/sections' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"course_id":"2083","section_name":"Introduction - 1","description":"Course Introudction","is_prerequisite":1}'
{
  "code": 200,
  "message": "Section Created",
  "section": {
    "course_id": "2083",
    "section_name": "Introduction - 1",
    "description": "Course Introudction",
    "section_id": 6175,
    "in_curriculum": null,
    "resource_type": 1,
    "display_index": 6175
  }
}

Access: Institute admins, admins and tutors, plus custom roles that can edit curriculum. You must be an admin or a tutor of the course.

Request body: form-data with one field, JSONString, containing this JSON:

BodyJSONString
course_idintegerrequired
ID of the course module (the curriculum, not the course bundle) to add the section to.
section_namestringrequired
Section name. Cannot contain < or >. Must be unique within the course module unless allow_duplicate is 1.
Section description.
1 makes learners finish this section before the next ones. Default 0.
1 allows a name that another section in the course module already uses. Default 0.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Section Created
sectionobject
Show child attributesHide child attributes
Example: 2083
Example: Introduction - 1
Example: Course Introudction
The new section
Example: 6175
Always 1, meaning section
Example: 1
Its position; new sections go to the end
Example: 6175

Notes: New sections are published (visible in the curriculum) straight away. Errors: "Invalid Course ID" (missing, unknown or another institute's course module), "Section with same name already exists", and a tutor-only error if you are not a tutor of the course. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI