YeboLearn API: The Platform That Platforms Are Built On
Executive Summary
YeboLearn doesn't just have an API—we ARE an API. With 100+ production endpoints, comprehensive documentation, and enterprise-grade security, we enable schools to build custom solutions, integrate existing systems, and automate everything. While competitors hide behind closed systems, we open the doors to infinite possibilities.
API Overview
Base URLs
Production: https://api.yebolearn.com/v1
Staging: https://staging-api.yebolearn.com/v1
Sandbox: https://sandbox.yebolearn.com/v1API Statistics
- 100+ RESTful endpoints
- <200ms average response time
- 99.98% uptime SLA
- 10,000 requests/minute rate limit
- 5 SDKs (JavaScript, Python, PHP, Java, Go)
Authentication
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
X-Tenant-ID: school_123
X-API-Version: 2024-01-01Core API Categories
1. Student Management APIs
Student CRUD Operations
GET /api/v1/students # List all students
GET /api/v1/students/:id # Get student details
POST /api/v1/students # Create new student
PUT /api/v1/students/:id # Update student
DELETE /api/v1/students/:id # Delete studentAdvanced Student Operations
POST /api/v1/students/bulk # Bulk create students
POST /api/v1/students/import # Import from CSV/Excel
GET /api/v1/students/search # Advanced search
POST /api/v1/students/:id/transfer # Transfer student
GET /api/v1/students/:id/history # Student historyExample Request:
// Create a new student
const response = await fetch('https://api.yebolearn.com/v1/students', {
method: 'POST',
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
dateOfBirth: '2010-05-15',
grade: 8,
classId: 'class_456',
parentEmail: 'parent@email.com',
parentPhone: '+254712345678'
})
});Example Response:
{
"success": true,
"data": {
"id": "std_789",
"studentId": "2024-0001",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z",
"qrCode": "data:image/png;base64,..."
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"version": "1.0"
}
}2. Academic Management APIs
Grade Management
GET /api/v1/grades # List all grades
POST /api/v1/grades # Record grades
PUT /api/v1/grades/:id # Update grade
GET /api/v1/grades/report # Generate report
POST /api/v1/grades/bulk # Bulk grade entryAttendance APIs
POST /api/v1/attendance/mark # Mark attendance
GET /api/v1/attendance/daily # Daily attendance
GET /api/v1/attendance/report # Attendance report
POST /api/v1/attendance/bulk # Bulk attendance
GET /api/v1/attendance/analytics # AnalyticsAttendance Marking Example:
// Mark attendance for a class
const attendance = await fetch('https://api.yebolearn.com/v1/attendance/mark', {
method: 'POST',
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
classId: 'class_456',
date: '2024-01-15',
attendance: [
{ studentId: 'std_001', status: 'present' },
{ studentId: 'std_002', status: 'absent', reason: 'sick' },
{ studentId: 'std_003', status: 'late', time: '09:15' }
]
})
});Assignment & Exam APIs
POST /api/v1/assignments # Create assignment
GET /api/v1/assignments/:id # Get assignment
POST /api/v1/assignments/submit # Submit assignment
GET /api/v1/exams # List exams
POST /api/v1/exams/schedule # Schedule exam
POST /api/v1/exams/:id/results # Record results3. Financial APIs
Fee Management
GET /api/v1/fees/structure # Fee structure
POST /api/v1/fees/invoice # Generate invoice
GET /api/v1/fees/outstanding # Outstanding fees
POST /api/v1/fees/reminder # Send reminder
GET /api/v1/fees/report # Financial reportPayment Processing
POST /api/v1/payments # Process payment
GET /api/v1/payments/:id # Payment status
POST /api/v1/payments/refund # Process refund
GET /api/v1/payments/history # Payment history
POST /api/v1/payments/reconcile # Reconcile paymentsPayment Integration Example:
// Process a payment
const payment = await fetch('https://api.yebolearn.com/v1/payments', {
method: 'POST',
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
studentId: 'std_789',
amount: 50000,
currency: 'KES',
paymentMethod: 'mpesa',
phoneNumber: '+254712345678',
reference: 'TERM1-2024',
items: [
{ type: 'tuition', amount: 45000 },
{ type: 'lunch', amount: 5000 }
]
})
});4. Communication APIs
Messaging
POST /api/v1/messages/send # Send message
POST /api/v1/messages/broadcast # Broadcast message
GET /api/v1/messages/history # Message history
POST /api/v1/messages/template # Use template
GET /api/v1/messages/delivery # Delivery statusNotifications
POST /api/v1/notifications/push # Send push notification
POST /api/v1/notifications/email # Send email
POST /api/v1/notifications/sms # Send SMS
GET /api/v1/notifications/status # Delivery status5. AI-Powered APIs
AI Analytics
POST /api/v1/ai/analyze/student # Analyze student performance
POST /api/v1/ai/predict/dropout # Predict dropout risk
POST /api/v1/ai/generate/report # Generate AI report
POST /api/v1/ai/recommend/intervention # Recommend interventions
GET /api/v1/ai/insights # Get AI insightsAI Analysis Example:
// Get AI insights for a student
const insights = await fetch('https://api.yebolearn.com/v1/ai/analyze/student', {
method: 'POST',
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
studentId: 'std_789',
analysisType: 'comprehensive',
includeRecommendations: true
})
});
// Response
{
"analysis": {
"academicTrend": "improving",
"riskLevel": "low",
"strengths": ["Mathematics", "Science"],
"weaknesses": ["English Writing"],
"attendancePattern": "consistent",
"recommendations": [
"Consider advanced math placement",
"Additional writing support recommended"
],
"predictedGrade": 85,
"confidence": 0.92
}
}6. Reporting APIs
Report Generation
GET /api/v1/reports/academic # Academic reports
GET /api/v1/reports/financial # Financial reports
GET /api/v1/reports/attendance # Attendance reports
POST /api/v1/reports/custom # Custom reports
GET /api/v1/reports/schedule # Scheduled reports7. Integration APIs
Webhook Management
POST /api/v1/webhooks/subscribe # Subscribe to events
GET /api/v1/webhooks/list # List subscriptions
DELETE /api/v1/webhooks/:id # Unsubscribe
POST /api/v1/webhooks/test # Test webhook
GET /api/v1/webhooks/logs # Webhook logsWebhook Events:
// Subscribe to events
const subscription = await fetch('https://api.yebolearn.com/v1/webhooks/subscribe', {
method: 'POST',
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://your-server.com/webhook',
events: [
'student.enrolled',
'payment.received',
'attendance.marked',
'grade.updated'
],
secret: 'your-webhook-secret'
})
});8. Administrative APIs
School Management
GET /api/v1/school/info # School information
PUT /api/v1/school/settings # Update settings
GET /api/v1/school/statistics # School statistics
POST /api/v1/school/backup # Backup data
GET /api/v1/school/audit # Audit logsUser Management
GET /api/v1/users # List users
POST /api/v1/users # Create user
PUT /api/v1/users/:id/role # Update role
POST /api/v1/users/:id/reset # Reset password
GET /api/v1/users/permissions # Get permissionsAPI Features
Pagination
GET /api/v1/students?page=2&limit=50&sort=name:ascResponse includes:
{
"data": [...],
"pagination": {
"page": 2,
"limit": 50,
"total": 1250,
"pages": 25,
"hasNext": true,
"hasPrev": true
}
}Filtering
GET /api/v1/students?grade=8&status=active&gender=femaleField Selection
GET /api/v1/students?fields=id,name,grade,attendanceBatch Operations
// Batch API calls
const batch = await fetch('https://api.yebolearn.com/v1/batch', {
method: 'POST',
headers: {
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requests: [
{ method: 'GET', url: '/students/std_001' },
{ method: 'GET', url: '/grades?studentId=std_001' },
{ method: 'GET', url: '/attendance?studentId=std_001' }
]
})
});Error Handling
Error Response Format
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [
{
"field": "email",
"message": "Invalid email format"
}
],
"requestId": "req_abc123",
"timestamp": "2024-01-15T10:30:00Z"
}
}Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
AUTH_REQUIRED | 401 | Authentication required |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
VALIDATION_ERROR | 400 | Invalid input |
RATE_LIMITED | 429 | Too many requests |
SERVER_ERROR | 500 | Internal error |
Rate Limiting
Limits by Plan
| Plan | Requests/Minute | Burst | Concurrent |
|---|---|---|---|
| Free | 60 | 10 | 5 |
| Standard | 600 | 100 | 20 |
| Premium | 3000 | 500 | 50 |
| Enterprise | 10000 | 1000 | 100 |
Rate Limit Headers
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1642248000Security
Authentication Methods
- API Keys: For server-to-server
- JWT Tokens: For user sessions
- OAuth 2.0: For third-party apps
- Webhook Signatures: For webhook security
Best Practices
// Secure API usage
const apiClient = {
baseURL: process.env.API_URL,
timeout: 5000,
headers: {
'Authorization': `Bearer ${process.env.API_TOKEN}`,
'X-API-Version': '2024-01-01'
},
retry: {
retries: 3,
retryDelay: (retryCount) => retryCount * 1000
}
};SDKs & Tools
Official SDKs
// JavaScript/Node.js
npm install @yebolearn/sdk
// Python
pip install yebolearn-sdk
// PHP
composer require yebolearn/sdk
// Java
<dependency>
<groupId>com.yebolearn</groupId>
<artifactId>sdk</artifactId>
<version>1.0.0</version>
</dependency>
// Go
go get github.com/yebolearn/sdk-goSDK Usage Example
// Using the JavaScript SDK
import { YeboLearnClient } from '@yebolearn/sdk';
const client = new YeboLearnClient({
apiKey: 'your-api-key',
tenantId: 'school_123'
});
// Simple API calls
const students = await client.students.list();
const grade = await client.grades.create({
studentId: 'std_001',
subject: 'Mathematics',
score: 85
});API Documentation Tools
Interactive Explorer
- Swagger UI: https://api.yebolearn.com/docs
- GraphQL Playground: https://api.yebolearn.com/graphql
- Postman Collection: Available for download
Testing Environment
Sandbox URL: https://sandbox.yebolearn.com
Test Credentials: Provided on registration
Reset: Daily at midnight UTCWebhook Events
Available Events
// Student Events
student.enrolled
student.updated
student.transferred
student.graduated
// Academic Events
grade.recorded
attendance.marked
assignment.submitted
exam.completed
// Financial Events
payment.received
payment.failed
invoice.generated
fee.reminder.sent
// System Events
backup.completed
report.generated
integration.connectedWebhook Payload Example
{
"event": "payment.received",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"paymentId": "pay_123",
"studentId": "std_789",
"amount": 50000,
"currency": "KES",
"method": "mpesa",
"reference": "TERM1-2024"
},
"signature": "sha256=abcd..."
}API Performance
Metrics
- Average Response Time: 145ms
- P95 Response Time: 380ms
- P99 Response Time: 750ms
- Uptime: 99.98%
- Error Rate: 0.02%
Optimization Tips
- Use field selection to reduce payload
- Implement pagination for large datasets
- Cache responses when appropriate
- Use webhooks instead of polling
- Batch multiple operations
Competitive API Comparison
| Feature | YeboLearn | Competitor A | Competitor B | Competitor C |
|---|---|---|---|---|
| Total Endpoints | 100+ | 15 | 0 | 25 |
| Response Time | <200ms | >1s | N/A | >500ms |
| Documentation | Interactive | None | Basic | |
| SDKs | 5 languages | None | None | 1 (PHP) |
| Webhooks | Real-time | None | None | Email only |
| Rate Limit | 10k/min | 100/min | N/A | 500/min |
| GraphQL | ✅ | ❌ | ❌ | ❌ |
| Batch API | ✅ | ❌ | ❌ | ❌ |
Use Case Examples
Integration with ERP System
// Sync student data with external ERP
async function syncWithERP() {
const students = await yebolearn.students.list({
updatedAfter: lastSync
});
for (const student of students) {
await erpSystem.updateStudent({
externalId: student.id,
data: student
});
}
}Custom Mobile App
// Build custom mobile app using APIs
const studentDashboard = await Promise.all([
yebolearn.students.get(studentId),
yebolearn.grades.list({ studentId }),
yebolearn.attendance.summary({ studentId }),
yebolearn.fees.balance({ studentId })
]);Automated Reporting
// Generate weekly reports automatically
const report = await yebolearn.reports.generate({
type: 'academic_performance',
period: 'weekly',
format: 'pdf',
recipients: ['principal@school.com']
});API Roadmap
Coming Soon (Q1 2025)
- GraphQL Federation
- WebSocket subscriptions
- gRPC support
- API Gateway v2
- Enhanced analytics
Future (2025-2026)
- AI model API
- Blockchain integration
- IoT device API
- Video streaming API
- AR/VR endpoints
The API Advantage
YeboLearn's API isn't an afterthought—it's the foundation. While competitors offer limited or no API access, we provide:
- Complete Coverage: Every feature accessible via API
- Developer Experience: Best-in-class documentation and tools
- Performance: Sub-200ms responses at scale
- Flexibility: REST, GraphQL, and WebSockets
- Security: Enterprise-grade authentication and encryption
Bottom Line
YeboLearn's API transforms schools from isolated institutions into connected, automated, intelligent operations. With 100+ endpoints, comprehensive documentation, and enterprise reliability, we don't just enable integration—we enable innovation.
Build on YeboLearn. The platform that platforms are built on.