Create a new course.

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

Creates a new course in the academy as a draft. Send courseContent to add chapters and lessons in the same call.

Endpoint

post https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/courses.json

OAuth Scope

TrainerCentral.courseapi.CREATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Request Body

application/json
courseJSON Object(Required)

Details of the course to create.

Hide Sub-Attributes
courseNamestring(Required)

Name of the course.

subTitlestring(Optional)

Subtitle shown below the course name.

descriptionstring(Optional)

Description of the course. Supports rich text.

rawDescriptionstring(Optional)

Plain-text description used for SEO.

typeinteger(Optional)

Type of course. Allowed: 0=Course, 1=Course bundle. Default 0.

kindinteger(Optional)

Visibility. Allowed: 0=Default, 1=Featured, 2=Hidden, 4=Private. Default 0.

courseCategoriesJSON Array(Optional)

Categories to map to the course (1-50 items).

Show Sub-Attributes
JSON Object
Show Sub-Attributes
categoryNamestring(Optional)

Name of a new category to create and map.

categoryIdlong(Optional)

ID of an existing category to map.

courseContentJSON Array(Optional)

Chapters and lessons to create with the course (1-20 chapters).

Show Sub-Attributes
JSON Object
Show Sub-Attributes
titlestring(Required)

Name of the chapter.

lessonsJSON Array(Required)

Lessons in the chapter, in order. Send an empty array for an empty chapter.

Show Sub-Attributes
JSON Object
Show Sub-Attributes
titlestring(Required)

Name of the lesson.

typestring(Optional)

Lesson type. Allowed: ONDEMAND=On-demand, LIVE_SESSION=Live, ASSIGNMENT=Assignment. Default ONDEMAND.

descriptionstring(Optional)

Description of the lesson. Supports rich text.

scheduledTimelong(Optional)

Start time of a LIVE_SESSION lesson in epoch milliseconds. Default now plus 24 hours.

scheduledEndTimelong(Optional)

End time of a LIVE_SESSION lesson in epoch milliseconds. Default scheduledTime plus 1 hour.

assignmentInstructionstring(Optional)

Instructions for an ASSIGNMENT lesson. Supports rich text.

autogenerateLessonMaterialboolean(Optional)

true generates AI lesson material for the on-demand lessons in courseContent. Default false.

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request POST \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/courses.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --header 'tc-orgId: 51517414' \
  --data '{"course":{"courseName":"Introduction to Python","subTitle":"Learn Python from scratch","description":"<p>A beginner course on Python syntax, data types and functions.</p>","rawDescription":"A beginner course on Python syntax, data types and functions."}}'

Body Parameters

Create a basic course.

Create a basic course.

Create a featured course with categories.

Create a course with chapters and lessons.

Copied!
  {
    "course": {
      "courseName": "Introduction to Python",
      "subTitle": "Learn Python from scratch",
      "description": "<p>A beginner course on Python syntax, data types and functions.</p>",
      "rawDescription": "A beginner course on Python syntax, data types and functions."
    }
  }
                
  {
    "course": {
      "courseName": "Data Science Basics",
      "kind": 1,
      "courseCategories": [
        {
          "categoryId": 3000000000011
        },
        {
          "categoryName": "Analytics"
        }
      ]
    }
  }
                
  {
    "course": {
      "courseName": "Advanced Python",
      "description": "<p>Deep dive into Python concepts.</p>",
      "autogenerateLessonMaterial": false,
      "courseContent": [
        {
          "title": "Getting Started",
          "lessons": [
            {
              "title": "Python Refresher",
              "type": "ONDEMAND",
              "description": "<p>Quick recap of the basics.</p>"
            },
            {
              "title": "Live Q and A",
              "type": "LIVE_SESSION",
              "scheduledTime": 1790000000000,
              "scheduledEndTime": 1790003600000
            }
          ]
        },
        {
          "title": "Object-Oriented Python",
          "lessons": [
            {
              "title": "OOP Assignment",
              "type": "ASSIGNMENT",
              "assignmentInstruction": "<p>Create a class hierarchy for a banking system.</p>"
            }
          ]
        }
      ]
    }
  }
                
▼ Show full

Response Parameters

courseJSON Object

The new course, as a draft.

Hide Sub-Attributes
courseIdlong

ID of the course.

idlong

Same as courseId.

courseNamestring

Name of the course.

courseURLstring

Public URL of the course page.

subTitlestring

Subtitle shown below the course name.

descriptionstring

Description of the course. Supports rich text.

typestring

Type of record. Allowed: 0=Course, 1=Course bundle, 2=Group, 3=Instructor-led course.

uniqueKeystring

URL slug of the course, unique in the academy.

kindstring

Visibility. Allowed: 0=Default, 1=Featured, 2=Hidden, 4=Private, 5=Private and featured, 6=Private and hidden.

publishStatusstring

Publish status. Allowed: 0=Draft, 1=Published, 2=Suspended.

orgIdstring

ID of the academy (orgId).

isFeaturedCoursestring

true when the course is featured.

isHiddenCoursestring

true when the course is hidden from the course list; it stays reachable by direct link.

isPrivateCoursestring

true when only invited or approved learners can enroll.

enableReviewstring

true when learners can review the course.

enrolledCountstring

Number of enrolled learners.

scheduleTypestring

Publish schedule. Allowed: 0=Instant, 1=Scheduled at scheduledTime.

scheduledTimestring

Scheduled publish time in epoch milliseconds.

materialCompletionEnabledstring

true when learners must finish a set percentage of the material to complete a lesson.

recordingCompletionEnabledstring

true when learners must watch a set percentage of the recording to complete a lesson.

testCompletionEnabledstring

true when learners must pass the lesson tests to complete a lesson.

estimatedDurationEnabledstring

true when the estimated duration is shown to learners.

isPaidActiveTicketAvailablestring

true when the course has an active paid ticket.

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.

timestring

Creation time in epoch milliseconds.

mandateLessonOrderstring

true when learners must complete lessons in order.

materialCompletionPercentagestring

Percentage (0-100) of lesson material to finish.

recordingCompletionPercentagestring

Percentage (0-100) of the recording to watch.

excludeLiveLessonsInCompletionstring

true when live lessons do not count toward completion.

excludeLiveLessonsInMandationstring

true when live lessons are skipped by the lesson order.

includeAllRecurringTalkInMandationstring

true when every occurrence of a recurring live lesson counts in the lesson order.

disableAutoApproveReEnrollstring

true when an unenrolled learner needs approval to re-enroll.

durationValuestring

Estimated duration, in durationType units.

durationTypestring

Unit of durationValue. Allowed: 0=Minutes, 1=Hours, 2=Days, 3=Weeks.

thumbnailMaterialIdstring

Material ID of the thumbnail image.

thumbnailImageUrlstring

URL of the thumbnail image.

avgRatingstring

Average learner rating (1-5).

totalRatingstring

Number of ratings.

totalRevenuestring

Total revenue in the academy base currency.

formattedTotalRevenuestring

totalRevenue with the currency symbol.

defaultTicketAmountstring

Formatted price of the default paid ticket.

customRegistrationFormIdstring

ID of the registration form used at enrollment.

deletedTimestring

Deletion time in epoch milliseconds.

courseMembersJSON Array

Members created with the course: the caller as course admin.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
courseMembersIdstring

ID of the course member (courseMemberId).

idstring

Same as courseMembersId.

courseIdstring

ID of the course or group.

coursestring

Same as courseId.

userIdstring

User ID (zuid) of the member.

orgMemberIdstring

Academy member ID.

orgIdstring

ID of the academy (orgId).

rolestring

Role in the course. Allowed: 0=Course admin, 1=Trainer, 3=Learner, 4=Previewer.

statusstring

Membership status. Allowed: 0=None, 1=Access requested, 2=Approved, 3=Rejected, 10=Invited, 11=Prospect, 50=Enrolled, 51=Blocked.

currentStatusstring

Learner progress status. Allowed: 1=Invited, 2=Access requested, 3=Access rejected, 4=Access approved, 5=Free preview, 6=Prospect, 7=Enrolled, 8=Accessed, 9=Access revoked, 10=Blocked, 11=Preview user, 12=Deleted.

namestring

Full name of the member.

emailstring

Email of the member; * when hidden from trainers.

imageUrlstring

Profile image URL.

completionPercentagestring

Course completion percentage (0-100).

completionTypestring

How the course was completed. Allowed: 0=By the learner, 1=Marked by a trainer.

completedLessonstring

Number of lessons completed.

totalLessonstring

Total number of lessons in the course.

timestring

Last membership change in epoch milliseconds.

invitedTimestring

Invite time in epoch milliseconds.

enrolledTimestring

First enrollment time in epoch milliseconds.

completedTimestring

Completion time in epoch milliseconds.

accessedTimestring

Last time the learner opened the course, in epoch milliseconds.

lastLoginstring

Last sign-in time in epoch milliseconds.

ipAddressstring

IP address of the last sign-in.

countrystring

Country of the last sign-in.

isCertificateIssuedstring

true when a certificate has been issued.

isBadgeIssuedstring

true when a badge has been issued.

totalRevenuestring

Amount the learner paid, in the academy base currency.

formattedTotalRevenuestring

totalRevenue with the currency symbol.

expiryTimestring

Access expiry time in epoch milliseconds.

courseCategoriesJSON Array

Category mappings of the course.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

ID of the mapping.

categorystring

categoryId of the category.

coursestring

courseId of the course.

categoryJSON Array

Categories newly created from categoryName.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

categoryId of the new category.

categoryNamestring

Name of the new category.

portalstring

orgId of the academy.

ticketJSON Object

Default free ticket of the course.

Hide Sub-Attributes
ticketIdstring

ID of the ticket (price option).

namestring

Name of the ticket.

typestring

Pricing type. Allowed: 0=Free, 1=One-time payment, 2=Subscription, 3=Payment plan, 4=Part payment, 7=External.

paymentTypestring

Payment type. Allowed: 0=Free, 1=Paid.

amountstring

Price of the ticket.

statusstring

Status of the ticket. Allowed: 0=Inactive, 1=Active.

orgIdstring

ID of the academy (orgId).

sectionsJSON Array

Chapters created from courseContent.

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.

sessionsarray

Lessons created from courseContent.

talksarray

Occurrences (talkId) created for the lessons, one array per lesson.

sessionMembersarray

Lesson trainer records, one array per lesson.

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_811

COURSE_LIMIT_EXCEEDED - Course limit of the plan reached. Delete unused courses or upgrade the plan.

TC_1704

INVALID_PARAMS - Unsupported course.type. Send 0 or 1, or leave it out. Do not retry unchanged.

ST_816

COURSE_BUNDLE_UNAVAILABLE - The plan does not include course bundles. Upgrade the plan or send type 0.

ST_102

UNAUTHORISED_ACCESS - The user is not an academy admin or trainer. Do not retry with the same token.

ST_1003

TICKET_CREATION_FAILED - The course was saved but its default ticket was not created. Check List Courses before retrying to avoid a duplicate.

Response Example

Course created.

Course created.

Course created with chapters and lessons (trimmed).

200
200
400
500
Copied!
  {
    "course": {
      "courseId": "3000000000022",
      "id": "3000000000022",
      "courseName": "Introduction to Python",
      "subTitle": "Learn Python from scratch",
      "description": "<p>A beginner course on Python syntax, data types and functions.</p>",
      "type": "0",
      "kind": "0",
      "publishStatus": "0",
      "uniqueKey": "introduction-to-python",
      "courseURL": "https://academy.example.com/course/introduction-to-python",
      "enableReview": "true",
      "orgId": "51517414",
      "createdBy": "51456901",
      "lastUpdatedBy": "51456901",
      "time": "1782727568966",
      "lastUpdatedTime": "1782727568966"
    },
    "courseMembers": [
      {
        "courseMembersId": "3000000000025",
        "id": "3000000000025",
        "courseId": "3000000000022",
        "userId": "51456901",
        "role": "0",
        "status": "0"
      }
    ],
    "courseCategories": [],
    "ticket": {
      "ticketId": "3000000000023",
      "name": "Introduction to Python",
      "type": "0",
      "amount": "0.0",
      "status": "1"
    }
  }
                
  {
    "course": {
      "courseId": "3000000000040",
      "id": "3000000000040",
      "courseName": "Advanced Python",
      "type": "0",
      "kind": "0",
      "publishStatus": "0",
      "uniqueKey": "advanced-python",
      "courseURL": "https://academy.example.com/course/advanced-python",
      "orgId": "51517414"
    },
    "courseMembers": [
      {
        "courseMembersId": "3000000000043",
        "courseId": "3000000000040",
        "userId": "51456901",
        "role": "0"
      }
    ],
    "courseCategories": [],
    "ticket": {
      "ticketId": "3000000000041",
      "type": "0",
      "status": "1"
    },
    "sections": [
      {
        "sectionId": "3000000000050",
        "id": "3000000000050",
        "name": "Getting Started",
        "sectionIndex": "0",
        "courseId": "3000000000040"
      },
      {
        "sectionId": "3000000000060",
        "id": "3000000000060",
        "name": "Object-Oriented Python",
        "sectionIndex": "1",
        "courseId": "3000000000040"
      }
    ],
    "sessions": [
      {
        "sessionId": "3000000000051",
        "name": "Python Refresher",
        "sectionId": "3000000000050",
        "courseId": "3000000000040"
      }
    ]
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full