Course Example
This example demonstrates creating a traditional multi-lesson course.
Basic Course Example
Here's a simple course with multiple lessons:
curl -X POST \
https://{your-instance}.thoughtindustries.com/api/v1/courses \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"title": "Introduction to Product Management",
"description": "Learn the fundamentals of product management",
"format": "course",
"published": true,
"price": 9900,
"currency": "USD",
"duration": 120,
"difficulty": "beginner",
"thumbnail": "https://example.com/images/pm-course.jpg",
"lessons": [
{
"title": "What is Product Management?",
"description": "Understanding the role of a product manager",
"content": "<h2>Introduction</h2><p>Product management is...</p>",
"duration": 15,
"order": 1
},
{
"title": "Product Strategy",
"description": "Developing effective product strategies",
"content": "<h2>Strategy Fundamentals</h2><p>A good product strategy...</p>",
"videoUrl": "https://youtube.com/watch?v=abc123",
"duration": 20,
"order": 2
},
{
"title": "Working with Stakeholders",
"description": "Communication and collaboration techniques",
"content": "<h2>Stakeholder Management</h2><p>Effective communication...</p>",
"duration": 18,
"order": 3
}
],
"certificateEnabled": true,
"passGrade": 70
}'
Response Example
{
"id": "course_abc123",
"title": "Introduction to Product Management",
"slug": "introduction-to-product-management",
"description": "Learn the fundamentals of product management",
"format": "course",
"published": true,
"price": 9900,
"currency": "USD",
"duration": 120,
"difficulty": "beginner",
"thumbnail": "https://example.com/images/pm-course.jpg",
"lessons": [
{
"id": "lesson_xyz789",
"title": "What is Product Management?",
"order": 1
}
],
"certificateEnabled": true,
"passGrade": 70,
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"url": "https://{your-instance}.thoughtindustries.com/courses/introduction-to-product-management"
}
Advanced Course with Modules
Create a structured course with modules and nested lessons:
{
"title": "Complete Web Development Bootcamp",
"description": "From beginner to advanced web developer",
"format": "course",
"published": false,
"price": 19900,
"currency": "USD",
"duration": 600,
"difficulty": "intermediate",
"sequentialLearning": true,
"modules": [
{
"title": "Frontend Fundamentals",
"description": "HTML, CSS, and JavaScript basics",
"order": 1,
"lessons": [
{
"title": "HTML Basics",
"content": "<h1>HTML Introduction</h1>...",
"duration": 30,
"order": 1
},
{
"title": "CSS Styling",
"content": "<h1>CSS Introduction</h1>...",
"duration": 45,
"order": 2
}
]
},
{
"title": "Backend Development",
"description": "Server-side programming with Node.js",
"order": 2,
"lessons": [
{
"title": "Node.js Introduction",
"content": "<h1>Getting Started with Node</h1>...",
"videoUrl": "https://vimeo.com/123456789",
"duration": 40,
"order": 1
}
]
}
],
"certificateEnabled": true,
"certificateTemplate": "template_advanced_cert",
"passGrade": 80,
"tags": ["web development", "programming", "bootcamp"]
}
Course with Quiz Lessons
Include assessment lessons:
{
"title": "Sales Training Course",
"description": "Master sales techniques and strategies",
"format": "course",
"published": true,
"lessons": [
{
"title": "Introduction to Sales",
"content": "<h1>Sales Fundamentals</h1>...",
"duration": 20,
"order": 1
},
{
"title": "Sales Knowledge Check",
"type": "quiz",
"questions": [
{
"question": "What is the first step in the sales process?",
"type": "multiple_choice",
"options": [
"Prospecting",
"Closing",
"Follow-up",
"Presentation"
],
"correctAnswer": 0
}
],
"passingScore": 70,
"order": 2
}
],
"certificateEnabled": true
}
Use Cases
Corporate Training
Perfect for:
- Employee onboarding
- Compliance training
- Professional development
- Skills certification
Educational Institutions
Ideal for:
- Academic courses
- Certificate programs
- Continuing education
- Bootcamps
Customer Education
Great for:
- Product training
- Customer onboarding
- Best practices
- Advanced features
Best Practices
1. Structure Your Content
- Use modules to group related lessons
- Keep lessons focused on single topics
- Maintain logical progression
- Include assessments throughout
2. Set Appropriate Duration
- Be realistic about time estimates
- Include buffer for practice/review
- Consider different learning speeds
- Update based on learner feedback
3. Enable Sequential Learning
When to use sequentialLearning: true:
- Building foundational knowledge
- Skills-based training
- Certification programs
- Compliance courses
When to allow flexible navigation:
- Reference materials
- Mixed experience levels
- Self-paced learning
- Refresh training
4. Leverage Certificates
- Enable for completed courses
- Set appropriate passing grades
- Use custom templates
- Include in marketing materials
Common Errors
Missing Required Lessons
{
"error": "ValidationError",
"message": "Course must have at least one lesson",
"field": "lessons"
}
Solution: Include at least one lesson in your course.
Invalid Module Structure
{
"error": "ValidationError",
"message": "Module lessons must be an array",
"field": "modules[0].lessons"
}
Solution: Ensure each module has a valid lessons array.
Duration Mismatch
{
"error": "ValidationError",
"message": "Total lesson duration exceeds course duration",
"field": "duration"
}
Solution: Ensure course duration equals or exceeds sum of lesson durations.
Next Steps
- Review other format examples:
- Learn about Bulk Create
- Explore Field Reference