Update the settings of a course lesson.
Turns free preview, file download and the discussion on or off for a course lesson. Only the keys you send in sessionSetting are changed.
Endpoint
put https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/sessionSettings/{sessionId}.json
OAuth Scope
Headers
ID of the academy (orgId).
Path Parameters
ID of the course lesson (sessionId).
Request Body
application/jsonLesson settings to change; send only the keys to change.
Hide Sub-Attributes
true lets enrolled learners download the lesson files.
true lets visitors who are not enrolled preview the lesson.
true turns on the lesson discussion; false turns it off.
curl --request PUT \
--url https://trainercentral.zoho.com/tc/api/v1/trainer/sessionSettings/{sessionId}.json \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/json' \
--header 'tc-orgId: 51517414' \
--data '{"sessionSetting":{"allowFreePreview":true,"makeDownloadable":true}}' {
"sessionSetting": {
"allowFreePreview": true,
"makeDownloadable": true
}
}
{
"sessionSetting": {
"enableDiscussion": true
}
}
Response Parameters
Settings of the lesson after the update.
Hide Sub-Attributes
ID of the lesson (sessionId).
ID of the lesson (sessionId).
true when visitors who are not enrolled can preview the lesson.
true when enrolled learners can download the files of the lesson.
true when the lesson discussion is turned on.
Error details.
Hide Sub-Attributes
Deprecated numeric error code (for example ST_202). Prefer codeStr; omitted from doc samples.
Error code name (ShowtimeErrorCode / err_code_str), for example MISSING_PARAMETER.
Error message.
Possible Error Codes
| HTTP Code | Error Code | Description |
|---|---|---|
| 500 | ST_79 | INVALID_SESSION - The sessionId does not match a session in this academy. Pass a valid sessionId. Do not retry unchanged. |
| ST_401 | SESSION_DELETED - The session was deleted. Use a session that is not deleted. Do not retry unchanged. | |
| ST_102 | UNAUTHORISED_ACCESS - The user is not an academy owner or admin or a course admin or trainer, or the plan does not include session settings. Use one of these roles or upgrade the plan; do not retry unchanged. | |
| ST_406 | FEATURE_NOT_AVAILABLE - A setting sent (such as enableDiscussion) is not on the academy plan. Upgrade the plan or leave the key out. Do not retry unchanged. | |
| ST_591 | PERMISSION_DENIED_FOR_THE_SHOWTIME_MODULE - The discussion group for the lesson could not be created. Retry later. | |
| ST_65 | ERROR_WHILE_CREATING_SETTINGS_FOR_TALK - The settings could not be saved, for example enableDiscussion was sent for a session that is not a course lesson. Pass a course lesson; if it still fails, retry later. |
{
"sessionSetting": {
"id": "3000000000040",
"sessionId": "3000000000040",
"allowFreePreview": "true",
"makeDownloadable": "true",
"enableDiscussion": "false"
}
}
{
"error": {
"code": "string",
"codeStr": "string",
"message": "string"
}
}
500 Request failed; see the error code.© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.