Skip to main content

courseGroup Example

This example demonstrates creating a structured course with sections, lessons, and topics.

Basic courseGroup Example

Here's a simple course with one section, one lesson, and one topic:

curl -X POST "https://{your-instance-url}/incoming/v2/content/course/create" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"courseAttributes": [
{
"title": "Introduction to Product Management",
"kind": "courseGroup",
"availableToPublic": true,
"sections": [
{
"title": "Getting Started",
"lessons": [
{
"title": "What is Product Management?",
"openType": "studentsOnly",
"topics": [
{
"title": "Introduction",
"type": "text",
"body": "<h2>Welcome</h2><p>Product management is the practice of strategically driving the development, market launch, and continual support and improvement of a company's products.</p>"
}
]
}
]
}
]
}
]
}'

Response Example

["course-abc123"]

Multi-Section Course

Create a course with multiple sections and lessons:

{
"courseAttributes": [
{
"title": "Complete Web Development Bootcamp",
"kind": "courseGroup",
"sku": "WEB-101",
"availableToPublic": true,
"enrollmentStartDate": "2024-01-01T00:00:00Z",
"enrollmentEndDate": "2024-12-31T23:59:59Z",
"courseStartDate": "2024-01-15T00:00:00Z",
"courseEndDate": "2024-06-15T23:59:59Z",
"sections": [
{
"title": "Frontend Fundamentals",
"lessons": [
{
"title": "HTML Basics",
"openType": "studentsOnly",
"topics": [
{
"title": "HTML Structure",
"type": "text",
"body": "<h1>HTML Introduction</h1><p>Learn about HTML document structure...</p>",
"preTextBlock": "<p>Before you start, make sure you have a text editor installed.</p>"
},
{
"title": "HTML Elements",
"type": "text",
"body": "<h1>Common HTML Elements</h1><p>Learn about tags, attributes, and elements...</p>"
}
]
},
{
"title": "CSS Styling",
"openType": "studentsOnly",
"topics": [
{
"title": "CSS Basics",
"type": "text",
"body": "<h1>CSS Introduction</h1><p>Cascading Style Sheets...</p>"
}
]
}
]
},
{
"title": "Backend Development",
"releaseDate": "2024-02-01T00:00:00Z",
"lessons": [
{
"title": "Node.js Introduction",
"openType": "studentsOnly",
"topics": [
{
"title": "Getting Started with Node",
"type": "text",
"body": "<h1>Node.js Basics</h1><p>Server-side JavaScript...</p>"
}
]
}
]
}
]
}
]
}

Course with Mixed Topic Types

Include different types of content:

{
"courseAttributes": [
{
"title": "Sales Training Course",
"kind": "courseGroup",
"discussionsEnabled": true,
"availableToPublic": false,
"sections": [
{
"title": "Sales Fundamentals",
"lessons": [
{
"title": "Introduction to Sales",
"openType": "studentsOnly",
"topics": [
{
"title": "What is Sales?",
"type": "text",
"body": "<h1>Sales Fundamentals</h1><p>Understanding the sales process...</p>"
}
]
},
{
"title": "Knowledge Check",
"openType": "studentsOnly",
"topics": [
{
"title": "Sales Quiz",
"type": "quiz",
"body": "<p>Test your understanding of sales fundamentals.</p>"
}
]
}
]
}
]
}
]
}

Note: Quiz questions must be configured through the admin UI after creation.

Course with SCORM Topic

Include SCORM content within a course:

{
"courseAttributes": [
{
"title": "Compliance Training 2024",
"kind": "courseGroup",
"availableToPublic": false,
"sections": [
{
"title": "Policy Review",
"lessons": [
{
"title": "Company Policies",
"openType": "studentsOnly",
"topics": [
{
"title": "Interactive Policy Module",
"type": "shareableContentObject",
"scormUrl": "https://cdn.example.com/scorm/policies.zip",
"width": 800,
"height": 600,
"embeddedEnabled": true,
"resetSessionAfterComplete": false
}
]
}
]
}
]
}
]
}

Course with Enrollment Limits

Limit the number of enrollments:

{
"courseAttributes": [
{
"title": "Limited Workshop",
"kind": "courseGroup",
"enrollmentLimit": 50,
"enrollmentStartDate": "2024-01-01T00:00:00Z",
"enrollmentEndDate": "2024-01-31T23:59:59Z",
"sections": [
{
"title": "Workshop Content",
"lessons": [
{
"title": "Session 1",
"openType": "studentsOnly",
"topics": [
{
"title": "Workshop Materials",
"type": "text",
"body": "<p>Workshop content...</p>"
}
]
}
]
}
]
}
]
}

Course with PDF Resources

Include PDF documents for reference materials:

{
"courseAttributes": [
{
"title": "Technical Documentation Course",
"kind": "courseGroup",
"availableToPublic": true,
"sections": [
{
"title": "Getting Started",
"lessons": [
{
"title": "Reference Materials",
"openType": "studentsOnly",
"topics": [
{
"title": "Introduction",
"type": "text",
"body": "<p>Review the PDF documentation below for complete reference.</p>"
},
{
"title": "API Reference",
"type": "pdfViewer",
"pdfUrl": "https://cdn.example.com/api-reference.pdf",
"caption": "Download for offline access",
"searchDisabled": false,
"printDisabled": false,
"fileDownloadDisabled": false
}
]
}
]
}
]
}
]
}

Use Cases

Corporate Training

Perfect for:

  • Employee onboarding
  • Compliance training
  • Professional development
  • Skills certification

Educational Institutions

Ideal for:

  • Academic courses
  • Certificate programs
  • Continuing education
  • Structured curricula

Customer Education

Great for:

  • Product training
  • Customer onboarding
  • Best practices
  • Advanced features

Best Practices

1. Structure Your Content Logically

  • Use sections to group related lessons
  • Keep lessons focused on single topics
  • Maintain logical progression
  • Use clear, descriptive titles

2. Use Appropriate openType

studentsOnly (most common):

  • Standard course content
  • Enrolled students only
  • Default choice for most content

openToAll:

  • Preview content
  • Free introductory material
  • Marketing content

instructorsOnly:

  • Instructor guides
  • Teaching notes
  • Answer keys

3. Set Appropriate Dates

{
"enrollmentStartDate": "2024-01-01T00:00:00Z",
"enrollmentEndDate": "2024-12-31T23:59:59Z",
"courseStartDate": "2024-01-15T00:00:00Z",
"courseEndDate": "2024-12-15T23:59:59Z",
"gracePeriodEndDate": "2025-01-15T23:59:59Z"
}
  • Enrollment dates: When can users sign up?
  • Course dates: When is content accessible?
  • Grace period: Extended access after course ends

4. Use Release Dates for Sections

Control when sections become available:

{
"sections": [
{
"title": "Week 1",
"releaseDate": "2024-01-15T00:00:00Z",
"lessons": [...]
},
{
"title": "Week 2",
"releaseDate": "2024-01-22T00:00:00Z",
"lessons": [...]
}
]
}

5. Include Pre/Post Text

Add context before and after topics:

{
"title": "Important Concept",
"type": "text",
"preTextBlock": "<p><strong>Before you begin:</strong> Review the prerequisites.</p>",
"body": "<p>Main content here...</p>",
"postTextBlock": "<p><strong>Next steps:</strong> Apply what you learned.</p>"
}

Common Errors

Missing Required Structure

{
"error": "Course must have sections, lessons, and topics for proper UI rendering"
}

Solution: Always provide complete sections → lessons → topics structure.

Invalid Date Ranges

{
"error": "Invalid course dates: enrollment start date must be before enrollment end date"
}

Solution: Ensure dates are logically ordered and in ISO 8601 format.

Missing Required Fields

{
"error": "A title or course URL was not provided"
}

Solution: Ensure title and kind are provided.

Topic Types Reference

TypeDescriptionUse Case
textText/HTML contentLessons, explanations
videoVideo contentLectures, demos
quizQuiz/assessmentKnowledge checks
testGraded testFinal exams
assignmentAssignmentsProjects, submissions
shareableContentObjectSCORMInteractive content
articleArticle pageBlog-style content
pdfViewerPDF viewerDocuments
meetingLive meetingWebinars, events

Note: Some topic types require additional configuration through the admin UI.

Next Steps