Documentation
Comprehensive guides and API documentation for TutorBoard.
Getting Started
Welcome to the TutorBoard API documentation. This guide will help you get started with integrating TutorBoard into your application.
Quick Start
To begin using the TutorBoard API, you'll need an API key. You can generate one from your account settings.
// Install the TutorBoard SDK
npm install @tutorboard/sdk
// Initialize the SDK
import TutorBoard from '@tutorboard/sdk';
const tutorboard = new TutorBoard({
apiKey: 'your-api-key-here'
});
// Create a new session
const session = await tutorboard.sessions.create({
title: 'Math Tutoring Session',
type: 'whiteboard'
});
console.log('Session created:', session.id);
https://api.tutorboard.com/v1
Authentication
The TutorBoard API uses API keys to authenticate requests. Include your API key in the request header.
// Using cURL
curl https://api.tutorboard.com/v1/sessions \
-H "Authorization: Bearer YOUR_API_KEY"
// Using JavaScript
const response = await fetch('https://api.tutorboard.com/v1/sessions', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const sessions = await response.json();
API Reference
Complete reference for all TutorBoard API endpoints.
Sessions
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
title |
string | Yes | Session title |
type |
string | Yes | Session type: "whiteboard", "document", or "worksheet" |
studentIds |
array | No | Array of student user IDs to invite |
// Example request
const response = await fetch('https://api.tutorboard.com/v1/sessions', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Algebra Lesson',
type: 'whiteboard',
studentIds: ['student-123', 'student-456']
})
});
const session = await response.json();
SDKs
Official SDKs are available for popular programming languages to make integration easier.
JavaScript/TypeScript
npm install @tutorboard/sdk
import TutorBoard from '@tutorboard/sdk';
const tutorboard = new TutorBoard('your-api-key');
Python
pip install tutorboard-sdk
from tutorboard import TutorBoard
tutorboard = TutorBoard(api_key='your-api-key')
PHP
composer require tutorboard/tutorboard-php
use TutorBoard\TutorBoard;
$tutorboard = new TutorBoard('your-api-key');
Webhooks
Webhooks allow you to receive real-time notifications about events in your TutorBoard account.
Available Events
session.created- A new session was createdsession.ended- A session has endedstudent.joined- A student joined a sessiondocument.uploaded- A document was uploaded
// Example webhook payload
{
"event": "session.created",
"timestamp": "2025-01-20T10:30:00Z",
"data": {
"sessionId": "session-123",
"title": "Math Tutoring",
"tutorId": "tutor-456"
}
}
Code Examples
Create and Share a Whiteboard Session
// Create a whiteboard session
const session = await tutorboard.sessions.create({
title: 'Geometry Lesson',
type: 'whiteboard'
});
// Invite students
await tutorboard.sessions.invite(session.id, {
studentIds: ['student-1', 'student-2']
});
// Get the session URL
const sessionUrl = `https://tutorboard.com/session/${session.id}`;
console.log('Share this URL:', sessionUrl);
Upload and Share a Document
// Upload a document
const document = await tutorboard.documents.upload({
file: fileBuffer,
filename: 'homework.pdf',
sessionId: 'session-123'
});
// Share with students
await tutorboard.documents.share(document.id, {
studentIds: ['student-1']
});
Integration Guide
Learn how to integrate TutorBoard into your existing application.
Step 1: Get Your API Key
Log in to your TutorBoard account and navigate to Settings > API Keys. Generate a new API key and keep it secure.
Step 2: Install the SDK
Install the TutorBoard SDK for your preferred programming language.
Step 3: Initialize the Client
const tutorboard = new TutorBoard({
apiKey: process.env.TUTORBOARD_API_KEY
});
Step 4: Start Building
You're ready to start creating sessions, inviting students, and managing your tutoring platform!
Best Practices
Error Handling
try {
const session = await tutorboard.sessions.create({
title: 'Math Session',
type: 'whiteboard'
});
} catch (error) {
if (error.statusCode === 401) {
console.error('Authentication failed. Check your API key.');
} else if (error.statusCode === 429) {
console.error('Rate limit exceeded. Please try again later.');
} else {
console.error('An error occurred:', error.message);
}
}
Rate Limiting
The API has rate limits to ensure fair usage. Free tier accounts can make 100 requests per minute. Pro accounts have higher limits.
Security
- Always use HTTPS for API requests
- Store API keys securely (environment variables, secret managers)
- Never expose API keys in client-side code
- Use webhooks with signature verification