VideoChatAPI Documentation

Base URL: https://dash.openlagoon.com/api/v1/
Live Testing Available: Use the API Tester to create rooms and test audio functionality in real-time.

VideoChatAPI is a powerful, multi-tenant video conferencing platform that allows businesses to integrate high-quality video calls into their applications. Built on LiveKit's WebRTC infrastructure, it provides enterprise-grade features with simple REST APIs.

Key Features

Participant Control

Set limits on participants per room, control who can join, and manage permissions.

Media Management

Control video/audio capabilities, quality settings, and bandwidth optimization.

Access Control

Password protection, whitelist access, authenticated users, and waiting rooms.

Recording

Cloud recording with automatic upload to your storage provider.

Scheduling

Schedule rooms in advance with recurring meeting support.

Custom Branding

White-label solution with custom logos, colors, and domains.

Authentication

All API requests must include your API key in the X-API-Key header:

curl -H "X-API-Key: your_api_key_here" \
     https://api.openlagoon.com/api/v1/rooms
Keep your API key secure and never expose it in client-side code.

Create Room

POST /rooms

Creates a new video conference room with specified configuration.

Request Body Parameters
Parameter Type Required Description
name string Yes Room name (3-100 characters)
room_type string No Type: temporary, permanent, scheduled (default: temporary)
media_type string No Media allowed: audio (voice only), video (silent video), both (audio+video) - Audio fully working
max_participants integer No Maximum participants (2-1000, default: tenant limit)
access_type string No Access control: public, password, whitelist, authenticated
password string Conditional Required if access_type is "password"
whitelist_emails array Conditional Email addresses allowed if access_type is "whitelist"
start_time datetime Conditional ISO 8601 format, required for scheduled rooms
end_time datetime No ISO 8601 format, optional end time
recurring boolean No Enable recurring meetings (default: false)
recording_enabled boolean No Enable cloud recording (default: false)
screen_sharing_enabled boolean No Allow screen sharing (default: true)
chat_enabled boolean No Enable in-room chat (default: true)
waiting_room_enabled boolean No Require host approval to join (default: false)
video_quality string No Max quality: low, medium, high, hd (default: high)
audio_only_mode boolean No Start with video disabled (default: false)
host_controls object No Host permissions: mute_all, disable_video, kick_participants
custom_logo_url string No Custom logo URL for branding
Example Request
cURL
JavaScript
Python
PHP
curl -X POST "https://dash.openlagoon.com/api/v1/rooms" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Team Meeting",
    "room_type": "scheduled",
    "max_participants": 50,
    "access_type": "password",
    "password": "secure123",
    "start_time": "2025-07-03T14:00:00Z",
    "end_time": "2025-07-03T15:00:00Z",
    "recording_enabled": true,
    "waiting_room_enabled": true,
    "video_quality": "hd",
    "host_controls": {
      "mute_all": true,
      "disable_video": true,
      "kick_participants": true
    }
  }'
Success Response
{
  "id": 42,
  "room_id": "a1B2c3D4e5F6",
  "name": "Sales Team Meeting",
  "room_type": "scheduled",
  "media_type": "both",
  "max_participants": 50,
  "access_type": "password",
  "status": "active",
  "start_time": "2025-07-03T14:00:00Z",
  "end_time": "2025-07-03T15:00:00Z",
  "recording_enabled": true,
  "screen_sharing_enabled": true,
  "chat_enabled": true,
  "waiting_room_enabled": true,
  "video_quality": "hd",
  "join_url": "https://dash.openlagoon.com/room/a1B2c3D4e5F6",
  "host_url": "https://dash.openlagoon.com/room/a1B2c3D4e5F6?host=true",
  "created_at": "2025-07-02T16:30:00Z"
}

List Rooms

GET /rooms

Retrieves a paginated list of rooms for your tenant.

Query Parameters
Parameter Type Description
status string Filter by status: active, completed, scheduled
room_type string Filter by type: temporary, permanent, scheduled
limit integer Results per page (1-100, default: 20)
offset integer Offset for pagination (default: 0)
sort string Sort by: created_at, start_time, name
order string Sort order: asc, desc (default: desc)

Rate Limits

API rate limits vary by plan:

Plan Requests/Hour Concurrent Rooms Participants/Room
Free 100 5 10
Starter 1,000 25 50
Pro 10,000 100 100
Enterprise Unlimited Unlimited 1,000

Rate limit headers are included in all responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1625097600

Error Handling

The API uses standard HTTP status codes and returns detailed error messages:

Status Code Error Type Description
400 Bad Request Invalid request parameters
401 Unauthorized Missing or invalid API key
403 Forbidden Access denied to resource
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error
Error Response Format
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "The 'max_participants' must be between 2 and 1000",
    "field": "max_participants",
    "request_id": "req_1234567890"
  }
}

SDKs & Libraries

Official SDKs are available for popular programming languages:

JavaScript/Node.js
npm install @videochat/sdk
Python
pip install videochat-sdk
PHP
composer require videochat/sdk
Ruby
gem install videochat-sdk

Audio Functionality

Fully Working: Audio functionality has been tested and verified to work reliably across browsers and devices.

The VideoChatAPI provides robust audio capabilities built on LiveKit's WebRTC infrastructure. Audio transmission works seamlessly between participants with low latency and high quality.

How Audio Works

Audio Capture
  • Automatic microphone access request
  • Browser permission handling
  • Audio level monitoring
  • Noise suppression (browser-dependent)
Audio Playback
  • Automatic audio element creation
  • Autoplay policy compliance
  • Echo cancellation
  • Real-time audio streaming

Media Types

Supported Media Types

Configure the type of media streams allowed in your rooms:

Media Type Description Use Case Bandwidth
audio Audio-only communication Voice calls, podcasts, conference calls ~50 kbps
video Video-only (no audio) Silent video streaming, presentations ~500-2000 kbps
both Full audio and video Video calls, meetings, webinars ~550-2050 kbps
{
  "name": "Voice Conference Call",
  "media_type": "audio",
  "max_participants": 10,
  "access_type": "public"
}

Audio Testing

Built-in Audio Testing

The VideoChatAPI includes comprehensive audio testing tools to verify functionality:

API Tester with Live Audio Testing

Visit the API Tester to:

  • Create rooms via API
  • Test audio functionality in real-time
  • Connect multiple participants
  • Monitor connection status and audio levels
Debug Tools

Additional testing pages available:

Testing Workflow
  1. Create a room using the API tester
  2. Click "🎤 Connect & Test Audio" in the Live Audio Test section
  3. Allow microphone permissions when prompted
  4. Click "🔗 Open Second Window" to test with multiple participants
  5. Speak into the microphone to verify audio transmission

Audio Troubleshooting

Common Audio Issues & Solutions

Solutions:
  • Ensure both participants have granted microphone permissions
  • Check that the room media_type is set to "audio" or "both"
  • Verify JWT tokens are valid and not expired
  • Try clicking anywhere on the page to trigger audio context

Cause: Modern browsers block audio autoplay without user interaction.
Solutions:
  • Audio context is automatically initialized on button clicks
  • Users must interact with the page before audio plays
  • Use the "Connect & Test Audio" button which handles this automatically

Common Errors:
  • "401 Unauthorized": Invalid or expired JWT token
  • "WebSocket closed": Network connectivity issues
  • "No permissions to access room": JWT missing required permissions
Solutions:
  • Regenerate JWT tokens with correct permissions
  • Check network firewalls allow WebSocket connections
  • Verify LiveKit server is running and accessible

Cause: Local audio tracks being played back.
Solution: Local participant audio is automatically muted to prevent echo.
  • Only remote participants' audio is played
  • Local audio tracks are muted by default
  • Use headphones if echo persists
Audio Quality Factors
  • Network: Stable internet connection (min 100kbps for audio)
  • Browser: Chrome, Firefox, Safari, Edge (latest versions)
  • Hardware: Good quality microphone and speakers/headphones
  • Environment: Quiet room with minimal background noise

Need Help?

Check out our resources: