Learning Engine API Documentation
RESTful API for managing courses, modules, lessons and tracking learning metrics.
Course Structure
Courses → Modules → Lessons Hierarchy
{
"course": {
"id": "string",
"title": "string",
"description": "string",
"modules": [
{
"id": "string",
"title": "string",
"lessons": [
{
"id": "string",
"title": "string",
"exercises": [
{
"id": "string",
"type": "speaking|listening|vocabulary|grammar|speak-brave"
}
]
}
]
}
]
}
}
API Endpoints
GET
/api/courses
Retrieve all available courses
// Response
[
{
"id": "course-123",
"title": "Beginner English",
"description": "Basic English for beginners",
"language": "en",
"difficulty": "beginner"
}
]
POST
/api/courses
Create a new course (Admin only)
// Request Body
{
"title": "Advanced English",
"description": "Advanced English course",
"language": "en",
"difficulty": "advanced"
}
// Response
{
"id": "course-456",
"status": "created"
}
Progress Tracking
PATCH
/api/lessons/{lessonId}/progress
Update lesson progress metrics
// Request Body
{
"speaking": {
"score": 75,
"timeSpent": 120,
"attempts": 3
},
"listening": {
"score": 80,
"timeSpent": 90,
"attempts": 2
},
"vocabulary": {
"score": 90,
"timeSpent": 60,
"attempts": 1
},
"grammar": {
"score": 70,
"timeSpent": 150,
"attempts": 4
},
"speakBraveScore": {
"confidence": 85,
"clarity": 80,
"fluency": 75,
"emotionalImpact": 90,
"transcript": "I believe in my ability to speak English confidently...",
"emotions": [
{"emotion": "happy", "score": 0.85},
{"emotion": "neutral", "score": 0.12},
{"emotion": "sad", "score": 0.03}
],
"facialExpressions": [
{"expression": "smile", "intensity": 0.8},
{"expression": "eyeContact", "intensity": 0.7}
]
},
"confidence": 85,
"completionStatus": "completed",
"masteryPercentage": 78.75
}
// Response
{
"lessonId": "lesson-789",
"updated": true,
"report": {
"totalTime": 420,
"totalAttempts": 10,
"weakestArea": "grammar",
"nextSteps": [
"Review past tense exercises",
"Practice with audio drills",
"Complete bonus vocabulary quiz"
]
}
}
VoiceTrack Module
Test the voice analysis API with real-time recording and feedback.
POST
/voice/analyze
Analyze voice recordings for pronunciation and confidence
// Request: Multipart form with audio file
// Response
{
"pronunciation": 85,
"confidence": 78,
"fluency": 82,
"clarity": 80,
"feedback": [
"Work on vowel sounds",
"Good pacing overall",
"Slightly nervous tone detected"
]
}