Rename or move a chapter.

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Renames a chapter (section), moves it to another position, or both. When sectionIndex changes, the chapters in between shift by one.

Endpoint

put https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/course/{courseId}/sections/{sectionId}.json

OAuth Scope

TrainerCentral.sectionapi.UPDATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

courseIdstring(Required)

ID of the course.

sectionIdstring(Required)

ID of the chapter (sectionId).

Request Body

application/json
sectionJSON Object(Required)

Chapter changes. Send name, sectionIndex or both.

Hide Sub-Attributes
namestring(Optional)

New name of the chapter (min 3 characters).

sectionIndexinteger(Optional)

New position of the chapter, starting at 0; chapters in between shift by one.

statusinteger(Optional)

Status of the chapter. Allowed: 0=Default (visible), 1=Draft.

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request PUT \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/course/{courseId}/sections/{sectionId}.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --header 'tc-orgId: 51517414' \
  --data '{"section":{"name":"Python Fundamentals"}}'

Body Parameters

Rename a chapter.

Rename a chapter.

Move a chapter to the first position.

Copied!
  {
    "section": {
      "name": "Python Fundamentals"
    }
  }
                
  {
    "section": {
      "sectionIndex": 0
    }
  }
                
▼ Show full

Response Parameters

sectionsJSON Array

Chapters of the course, ordered by sectionIndex.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
sectionIdstring

ID of the chapter (sectionId).

idstring

Same as sectionId.

namestring

Name of the chapter.

sectionNamestring

Name of the chapter (returned by Create Course Chapter).

sectionIndexstring

Position of the chapter, starting at 0.

statusstring

Status of the chapter. Allowed: 0=Default (visible), 1=Draft.

courseIdstring

ID of the course.

coursestring

Same as courseId.

sessionsCountstring

Number of lessons in the chapter.

createdBystring

User ID of the creator.

createdTimestring

Creation time in epoch milliseconds.

lastUpdatedBystring

User ID of the last editor.

lastUpdatedTimestring

Last update time in epoch milliseconds.

errorJSON Object

Error details.

Hide Sub-Attributes
codestring

Deprecated numeric error code (for example ST_202). Prefer codeStr; omitted from doc samples.

codeStrstring

Error code name (ShowtimeErrorCode / err_code_str), for example MISSING_PARAMETER.

messagestring

Error message.

Possible Error Codes

HTTP CodeError CodeDescription
500ST_94

INVALID_COURSE - Course not found or deleted. Pass a valid courseId. Do not retry unchanged.

ST_99

INVALID_COURSE_SECTION - Chapter not found in this course, or deleted. Pass a valid sectionId. Do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - The user is not an academy owner, admin or trainer of this course. Do not retry with the same token.

Response Example

Chapter moved.

Chapter moved.

Chapter renamed; sections comes back empty.

200
200
400
500
Copied!
  {
    "sections": [
      {
        "sectionId": "3000000000060",
        "id": "3000000000060",
        "name": "Object-Oriented Python",
        "sectionIndex": "0",
        "status": "0",
        "courseId": "3000000000022",
        "lastUpdatedBy": "51456901",
        "lastUpdatedTime": "1782727715513"
      },
      {
        "sectionId": "3000000000050",
        "id": "3000000000050",
        "name": "Getting Started",
        "sectionIndex": "1",
        "status": "0",
        "courseId": "3000000000022",
        "lastUpdatedBy": "51456901",
        "lastUpdatedTime": "1782727715513"
      }
    ]
  }
                
  {
    "sections": []
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full