API Documentation
Full Documentation
Everything you need to integrate video conferencing into your application
Quick Start
Your API key is ready to use. Start creating rooms and managing your video conferencing platform.
API Endpoint
All API requests should be made to the base URL below with your API key in the header.
Authentication
All API requests require authentication using your API key. Include your API key in the request header:
X-API-Key: your_api_key_here
Or as a query parameter:
GET /api/v1/rooms?api_key=your_api_key_here
Tenant Management
Register Tenant
POST /api/v1/tenants/register
Content-Type: application/json
{
"name": "Company Name",
"email": "admin@company.com",
"password": "secure_password",
"plan": "pro"
}
Response:
{
"success": true,
"data": {
"tenant_id": 123,
"api_key": "generated_api_key",
"secret_key": "generated_secret_key"
}
}
Get Tenant Profile
GET /api/v1/tenants/profile
X-API-Key: your_api_key
Response:
{
"success": true,
"data": {
"id": 123,
"name": "Company Name",
"email": "admin@company.com",
"plan": "pro",
"active_rooms": 5
}
}
Update Tenant Profile
PUT /api/v1/tenants/profile
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "New Company Name",
"logo_url": "https://example.com/logo.png",
"primary_color": "#007bff",
"secondary_color": "#6c757d",
"custom_css": ".header { background: #000; }"
}
Room Management
Create Room
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Team Meeting",
"room_type": "persistent", // temporary, persistent, scheduled
"media_type": "both", // both, video, audio
"max_participants": 50,
"access_type": "password", // public, password, authenticated, whitelist
"password": "secure123",
"screen_sharing_enabled": true,
"chat_enabled": true,
"waiting_room_enabled": false,
"recording_enabled": false,
// For scheduled rooms
"start_time": "2024-03-01T10:00:00",
"end_time": "2024-03-01T11:00:00",
// For whitelist access
"access_list": [
{"email": "user1@example.com", "access_level": "participant"},
{"email": "admin@example.com", "access_level": "moderator"}
]
}
Response:
{
"success": true,
"data": {
"id": 456,
"room_id": "abc123xyz",
"url": "https://yourdomain.com/room/abc123xyz"
}
}
List Rooms
GET /api/v1/rooms?page=1&limit=20&status=active&room_type=persistent
X-API-Key: your_api_key
Response:
{
"success": true,
"data": {
"rooms": [...],
"pagination": {
"total": 45,
"page": 1,
"limit": 20,
"pages": 3
}
}
}
Generate Room Access Token
POST /api/v1/rooms/{room_id}/token
X-API-Key: your_api_key
Content-Type: application/json
{
"participant_name": "John Doe",
"password": "secure123", // Required for password-protected rooms
"email": "john@example.com", // Required for whitelist rooms
"can_publish": true,
"can_subscribe": true,
"can_publish_data": true
}
Response:
{
"success": true,
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"room_id": "abc123xyz",
"url": "https://yourdomain.com/room/abc123xyz?token=..."
}
}
Update Room
PUT /api/v1/rooms/{room_id}
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Updated Room Name",
"max_participants": 100,
"password": "new_password"
}
Delete Room
DELETE /api/v1/rooms/{room_id}
X-API-Key: your_api_key
Business Features
Advanced features for enterprise and business applications.
Participant Control
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Executive Meeting",
"max_participants": 100, // Limit number of participants
"waiting_room_enabled": true, // Host must approve participants
"host_controls": {
"mute_all": true, // Host can mute all participants
"disable_video": true, // Host can disable all video
"kick_participants": true, // Host can remove participants
"lock_room": true // Host can lock room after start
}
}
Video/Audio Quality Control
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Training Session",
"media_type": "both", // video, audio, or both
"video_quality": "hd", // low, medium, high, hd
"audio_only_mode": false, // Start with video disabled
"bandwidth_limits": {
"video_max_bitrate": 1500000, // 1.5 Mbps max for video
"audio_max_bitrate": 96000 // 96 kbps max for audio
},
"adaptive_streaming": true // Adjust quality based on connection
}
Recording Management
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Compliance Meeting",
"recording_enabled": true,
"recording_options": {
"auto_start": true, // Start recording automatically
"cloud_storage": "s3", // Storage provider: s3, gcs, azure
"retention_days": 90, // Auto-delete after 90 days
"include_shared_screen": true,
"include_chat": true,
"notify_participants": true // Show recording indicator
}
}
// Get recording after meeting
GET /api/v1/rooms/{room_id}/recordings
X-API-Key: your_api_key
Response:
{
"recordings": [{
"id": "rec_123",
"duration": 3600,
"size_mb": 450,
"download_url": "https://...",
"expires_at": "2025-10-01T00:00:00Z"
}]
}
Access Control & Security
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Board Meeting",
"access_type": "whitelist",
"whitelist": [
{
"email": "ceo@company.com",
"role": "host",
"can_record": true,
"can_share_screen": true
},
{
"email": "cfo@company.com",
"role": "moderator",
"can_record": false,
"can_share_screen": true
},
{
"email": "assistant@company.com",
"role": "participant",
"can_record": false,
"can_share_screen": false
}
],
"security_options": {
"end_to_end_encryption": true,
"require_authenticated_users": true,
"disable_guest_access": true,
"watermark_video": true // Add watermark with participant name
}
}
Scheduling & Recurring Meetings
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Weekly Team Standup",
"room_type": "scheduled",
"start_time": "2025-07-03T09:00:00Z",
"end_time": "2025-07-03T09:30:00Z",
"recurring": true,
"recurrence_pattern": {
"frequency": "weekly", // daily, weekly, monthly
"interval": 1, // Every 1 week
"days_of_week": ["MON", "WED", "FRI"],
"end_date": "2025-12-31",
"timezone": "America/New_York"
},
"reminder_options": {
"email_reminder": true,
"minutes_before": [15, 60], // Send reminders 15 and 60 min before
"include_join_link": true
}
}
Custom Branding
POST /api/v1/rooms
X-API-Key: your_api_key
Content-Type: application/json
{
"name": "Client Presentation",
"branding": {
"logo_url": "https://company.com/logo.png",
"background_image": "https://company.com/bg.jpg",
"primary_color": "#003366",
"waiting_room_message": "Welcome! The host will let you in shortly.",
"custom_css": ".header { background: #003366; }"
}
}
// Or set default branding for all rooms
PUT /api/v1/tenants/branding
X-API-Key: your_api_key
Content-Type: application/json
{
"logo_url": "https://company.com/logo.png",
"favicon_url": "https://company.com/favicon.ico",
"primary_color": "#003366",
"secondary_color": "#0066cc"
}
Usage Limits & Quotas
// Get current usage
GET /api/v1/tenants/usage
X-API-Key: your_api_key
Response:
{
"current_month": {
"rooms_created": 156,
"participant_minutes": 45680,
"recording_minutes": 12340,
"storage_gb": 25.4
},
"limits": {
"max_rooms_per_month": 1000,
"max_participant_minutes": 100000,
"max_recording_minutes": 50000,
"max_storage_gb": 100
},
"overage_rates": {
"per_participant_minute": 0.002,
"per_recording_minute": 0.005,
"per_gb_storage": 0.10
}
}
Error Codes
Code |
Description |
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid or missing API key |
403 |
Forbidden - Access denied |
404 |
Not Found - Resource not found |
409 |
Conflict - Resource already exists |
422 |
Validation Error - Invalid input data |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error |
Rate Limiting
API requests are limited to 100 requests per hour per API key. Rate limit information is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1677789600
SDK Examples
JavaScript/Node.js
const VideoChat = require('@videochat/sdk');
const client = new VideoChat({
apiKey: 'your_api_key'
});
// Create a room
const room = await client.rooms.create({
name: 'Team Meeting',
access_type: 'password',
password: 'secure123'
});
// Generate access token
const token = await client.rooms.generateToken(room.room_id, {
participant_name: 'John Doe',
password: 'secure123'
});
PHP
$apiKey = 'your_api_key';
$apiUrl = 'https://api.openlagoon.com/api/v1';
// Create room
$ch = curl_init($apiUrl . '/rooms');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'Team Meeting',
'access_type' => 'password',
'password' => 'secure123'
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$room = json_decode($response, true);