Skip to content

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/v1

API 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

http
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
X-Tenant-ID: school_123
X-API-Version: 2024-01-01

Core API Categories

1. Student Management APIs

Student CRUD Operations

http
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 student

Advanced Student Operations

http
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 history

Example Request:

javascript
// 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: '[email protected]',
    parentPhone: '+254712345678'
  })
});

Example Response:

json
{
  "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

http
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 entry

Attendance APIs

http
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  # Analytics

Attendance Marking Example:

javascript
// 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

http
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 results

3. Financial APIs

Fee Management

http
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 report

Payment Processing

http
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 payments

Payment Integration Example:

javascript
// 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

http
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 status

Notifications

http
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 status

5. AI-Powered APIs

AI Analytics

http
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 insights

AI Analysis Example:

javascript
// 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

http
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 reports

7. Integration APIs

Webhook Management

http
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 logs

Webhook Events:

javascript
// 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

http
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 logs

User Management

http
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 permissions

API Features

Pagination

http
GET /api/v1/students?page=2&limit=50&sort=name:asc

Response includes:

json
{
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 50,
    "total": 1250,
    "pages": 25,
    "hasNext": true,
    "hasPrev": true
  }
}

Filtering

http
GET /api/v1/students?grade=8&status=active&gender=female

Field Selection

http
GET /api/v1/students?fields=id,name,grade,attendance

Batch Operations

javascript
// 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

json
{
  "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

CodeHTTP StatusDescription
AUTH_REQUIRED401Authentication required
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid input
RATE_LIMITED429Too many requests
SERVER_ERROR500Internal error

Rate Limiting

Limits by Plan

PlanRequests/MinuteBurstConcurrent
Free60105
Standard60010020
Premium300050050
Enterprise100001000100

Rate Limit Headers

http
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1642248000

Security

Authentication Methods

  1. API Keys: For server-to-server
  2. JWT Tokens: For user sessions
  3. OAuth 2.0: For third-party apps
  4. Webhook Signatures: For webhook security

Best Practices

javascript
// 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
// 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-go

SDK Usage Example

javascript
// 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

Testing Environment

Sandbox URL: https://sandbox.yebolearn.com
Test Credentials: Provided on registration
Reset: Daily at midnight UTC

Webhook Events

Available Events

javascript
// 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.connected

Webhook Payload Example

json
{
  "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

  1. Use field selection to reduce payload
  2. Implement pagination for large datasets
  3. Cache responses when appropriate
  4. Use webhooks instead of polling
  5. Batch multiple operations

Competitive API Comparison

FeatureYeboLearnCompetitor ACompetitor BCompetitor C
Total Endpoints100+15025
Response Time<200ms>1sN/A>500ms
DocumentationInteractivePDFNoneBasic
SDKs5 languagesNoneNone1 (PHP)
WebhooksReal-timeNoneNoneEmail only
Rate Limit10k/min100/minN/A500/min
GraphQL
Batch API

Use Case Examples

Integration with ERP System

javascript
// 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

javascript
// 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

javascript
// Generate weekly reports automatically
const report = await yebolearn.reports.generate({
  type: 'academic_performance',
  period: 'weekly',
  format: 'pdf',
  recipients: ['[email protected]']
});

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:

  1. Complete Coverage: Every feature accessible via API
  2. Developer Experience: Best-in-class documentation and tools
  3. Performance: Sub-200ms responses at scale
  4. Flexibility: REST, GraphQL, and WebSockets
  5. 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.

YeboLearn - Empowering African Education