Create a lesson in a course chapter.
Creates an on-demand (deliveryMode 4), live session (3) or assignment (7) lesson in a chapter of a course. New lessons are drafts until published with Update Course Lesson.
Endpoint
post https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/sessions.json
OAuth Scope
Headers
ID of the academy (orgId).
Request Body
application/jsonThe lesson to create.
Hide Sub-Attributes
Name of the lesson. Max 255 characters.
Description of the lesson. Supports rich text.
Live lessons only. Start time in epoch milliseconds, within 2 years. Default: now.
Live lessons only. End time in epoch milliseconds.
Live lessons only. Length in milliseconds, for example 3600000 for 1 hour.
Live lessons only. IANA time zone of the schedule, for example Asia/Kolkata.
Settings of a live lesson.
Show Sub-Attributes
true makes learners register before they can join the live lesson.
Schedule pattern. Must be 0 (One-time).
true lets only signed-in users join the live lesson.
ID of the course.
ID of the chapter (section) to add the lesson to.
Zero-based position of the lesson in the chapter. Default 0.
Lesson type. Allowed: 3=Live session, 4=On-demand lesson, 7=Assignment.
curl --request POST \
--url https://trainercentral.zoho.com/tc/api/v1/trainer/sessions.json \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/json' \
--header 'tc-orgId: 51517414' \
--data '{"session":{"name":"Python Basics - Variables","courseId":3000000000022,"sectionId":3000000000026,"sessionIndex":0,"deliveryMode":4}}' {
"session": {
"name": "Python Basics - Variables",
"courseId": 3000000000022,
"sectionId": 3000000000026,
"sessionIndex": 0,
"deliveryMode": 4
}
}
{
"session": {
"name": "Live Doubt Clearing",
"courseId": 3000000000022,
"sectionId": 3000000000026,
"sessionIndex": 1,
"deliveryMode": 3,
"scheduledTime": 1800419400000,
"scheduledEndTime": 1800423000000,
"durationTime": 3600000,
"timezone": "Asia/Kolkata",
"sessionSettings": {
"recurringType": 0,
"enableClientLogin": true,
"registrationRequired": false
}
}
}
{
"session": {
"name": "Assignment - Loops",
"courseId": 3000000000022,
"sectionId": 3000000000026,
"sessionIndex": 2,
"deliveryMode": 7
}
}
Response Parameters
The new lesson, created as a draft.
Hide Sub-Attributes
ID of the lesson (sessionId).
Same as sessionId.
Name of the lesson.
Description of the lesson. Supports rich text.
Lesson type. Allowed: 3=Live session, 4=On-demand lesson, 7=Assignment.
Zero-based position of the lesson in its chapter.
ID of the chapter (section) that holds the lesson.
ID of the course the lesson belongs to.
ID of the academy (orgId).
true when the lesson is a draft, hidden from learners.
true when learners must complete this lesson before later lessons.
Publish status of the lesson. Allowed: 0=Unpublished, 1=Published.
Live lessons only. Start time in epoch milliseconds.
Live lessons only. End time in epoch milliseconds.
Live lessons only. IANA time zone, for example Asia/Kolkata.
Schedule type. Allowed: 0=One-time, 1=Recurring. Always 0 for lessons.
Visibility. Allowed: 0=Default, 1=Featured.
User ID of the trainer who created the lesson.
Same as courseId.
Creation time in epoch milliseconds.
Trainers of the lesson; the creator is the primary trainer (role 1).
Hide Sub-Attributes
Show Sub-Attributes
ID of the session member (registration).
Email address of the member.
Name of the member.
User ID of the member.
ID of the session.
ID of the academy (orgId).
Role in the session. Allowed: 1=Trainer, 2=Co-trainer, 3=Learner, 4=Guest presenter.
Same as sessionMemberId.
Registration status. Allowed: 1=Registered, 0=Invited, -1=Waiting for approval, -2=Denied, -3=Cancelled by learner, -4=Invitation cancelled.
true when the learner has registered.
How the member was added. Allowed: 1=Invited, 2=Self registration, 3=CRM, 4=Zapier invite, 5=Zapier registration, 6=Zoho Flow invite, 7=Zoho Flow registration.
Allowed: 0=Yet to pay, 1=Paid, 2=Failed, 3=Cancelled, 4=Refunded, 5=Unpaid (inactive), 6=Unpaid, -2=Pending.
Academy member ID.
Added time in epoch milliseconds.
Last updated time in epoch milliseconds.
Invite mail status. Allowed: 0=Not sent, 1=Sent, 2=Failed.
Occurrence record of the lesson; for a live lesson, talkId is the occurrence.
Hide Sub-Attributes
Show Sub-Attributes
ID of the occurrence (talkId).
Name of the occurrence.
ID of the live session.
ID of the academy (orgId).
Status of the occurrence. Allowed: 0=Yet to start, 1=Scheduled, 2=Projected, 3=Started, 4=Suspended, 5=Completed, 6=Orphaned, 7=Cancelled.
Number of registered learners.
Start time in epoch milliseconds.
End time in epoch milliseconds.
Delivery mode. Allowed: 3=Live session, 4=On-demand, 7=Assignment.
Same as talkId.
User ID of the trainer who owns the occurrence.
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_94 | INVALID_COURSE - The courseId does not match a course in this academy. Pass a valid courseId. Do not retry unchanged. |
| ST_406 | FEATURE_NOT_AVAILABLE - Live lessons (3) or assignments (7) are not on the academy plan. Upgrade the plan or send deliveryMode 4. Do not retry unchanged. | |
| ST_100 | SESSION_DATE_LIMIT_EXCEED - scheduledTime is more than 2 years from now. Send a date within 2 years. 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 course lets only its admins schedule sessions. Call with a permitted user; do not retry unchanged. | |
| ST_76 | SCHEDULE_SESSION_FAILED - The lesson could not be created, for example name or deliveryMode is missing or a value has the wrong type. Fix the body and send it again. |
{
"session": {
"sessionId": "3000000000040",
"id": "3000000000040",
"name": "Python Basics - Variables",
"deliveryMode": "4",
"scheduleType": "0",
"sessionIndex": "0",
"publishStatus": "0",
"kind": "0",
"orgId": "51517414",
"scheduledBy": "51456901",
"createdTime": "1782727568966",
"courseId": "3000000000022",
"course": "3000000000022"
},
"sessionMembers": [
{
"sessionMemberId": "3000000000060",
"id": "3000000000060",
"sessionId": "3000000000040",
"userId": "51456901",
"name": "Priya Raman",
"emailId": "priya.raman@example.com",
"role": "1",
"status": "1",
"source": "1",
"orgId": "51517414"
}
],
"talks": [
{
"talkId": "3000000000042",
"id": "3000000000042",
"sessionId": "3000000000040",
"name": "Python Basics - Variables",
"deliveryMode": "4",
"orgId": "51517414"
}
],
"sessionCategories": []
}
{
"error": {
"code": "string",
"codeStr": "string",
"message": "string"
}
}
500 Request failed; see the error code.© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.