Skip to content

Webinar API

Overview

The Webinar API provides comprehensive functionality for creating and managing webinar sessions. It covers two main interaction methods:

  • REST APIs: For managing data and long-running operations (create sessions, list recordings, request transcripts)
  • Realtime APIs (WebSocket): For live events during webinars (viewer joins, chat messages, live captions)

Base URL: https://prod.altegon.com

Product Packages

Essential: Everything you need to run a normal webinar & events - Create/join webinars, audio/video streaming, text chatting, co-host & viewer controls, screen sharing, basic recording

Professional: Builds on Essential with AI features - Noise suppression, enhanced chatting, real-time captions, transcripts, summaries, interactive whiteboard, virtual backgrounds, speaker tagging, advanced analytics

Key Concepts

  • Webinar: A container where host and co-host connect and viewers watch them
  • Viewer: A connected user to the webinar who is viewing host & co-host discussions
  • Track: An audio or video stream from a host & co-host
  • SDK/Client: The JavaScript helper library that simplifies talking to REST + real-time APIs

Quick Rules: Use REST for one-off or administrative tasks (create a session, fetch recordings). Use WebSocket for real-time UI updates (participant presence, chat, live captions).

Platform Features

The Webinar platform includes comprehensive functionality:

Core Features: Component initialization, room parameter retrieval, socket connection setup, room creation and joining, device and transport initialization

Media Features: Media production for local audio/video streams, remote media consumption, screen sharing with conflict prevention, individual and host-initiated recording

Interactive Features: Real-time chat with text and file messaging, co-host management with request/approval system, active speaker detection using hark library, live transcription with real-time captions

Advanced Features: Collaborative screen annotation with drawing tools, virtual background & effects using MediaPipe, dynamic video layout management with opentok-layout-js, proper cleanup and exit procedures

REST API Endpoints

Authentication & User Management

Register User - POST /auth/register

Creates a new user account.

Field Type Required Description
email String Yes Valid user email which is not already registered
fName String Yes User's first name
lName String Yes User's last name
phoneNumber String Yes User's contact number
country String Yes User's country where he/she lives
password String Yes Password used for login purpose

Example Request:

{
    "email": "haseeb@altegon.com",
    "fName": "Haseeb",
    "lName": "Asif",
    "phoneNumber": "923085000453",
    "country": "Pakistan",
    "password": "AB1239001"
}

Response (201, 409, 401):

{
    "success": true,
    "message": "User created successfully",
    "data": {
        "user": {
            "fName": "Haseeb",
            "lName": "Asif",
            "email": "haseeb@altegon.com",
            "_id": "68afea5f8ed95fae8f7f6d86"
        }
    }
}

User Login - POST /auth/login

Authenticates a user and returns an access token.

Field Type Required Description
userName String Yes Valid user email
password String Yes Password that was entered on registration

Example Request:

{
    "userName": "haseeb@altegon.com",
    "password": "AB1239001"
}

Response (200, 401):

{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Room Management

Create Room - POST /room/create

Creates a new virtual room for hosting meetings or conferences.

Field Type Required Description
name String Yes Room name
type String Yes Room type (e.g., "meeting", "conference")
maxParticipants Number No Maximum number of participants
isPrivate Boolean No Whether the room is private

Example Request:

{
  "name": "Haseeb Asif",
  "p2p": true,
  "type": "conference"
}

Response

{
  "success": true,
  "data": {
    "id": "68aff60d0d7bbb02c917906d",
    "name": "Haseeb Asif",
    "type": "conference",
    "p2p": true
  },
  "msg": "Room created Successfully!"
}

Meeting Management

Create Meeting - POST /meetings/create

Creates a new meeting with a title, host, and transcript settings.

Field Type Required Description
title String Yes Meeting title
hostId String Yes User ID
transcriptEnabled Boolean Yes Transcript enabled or not

Example Request:

{ 
    "title": "My Meeting", 
    "hostId": "67da6b256a7ab89c58666496", 
    "transcriptEnabled": false 
} 

Response (201, 500):

{ 
"meetingId": "68aff60da51d6c83a24245a2" 
} 

Update Meeting - POST /meetings/update/:meetingId

Updates meeting details such as title, transcript, summary generation, and recording information.

Field Type Required Description
userId String Yes User unqiue ID
roomId String No Room ID of meeting room
recordingId String No Recording ID
title String No Title of meeting
summaryGenerated Boolean No Summary generation enabled
transcriptEnabled Boolean No Transcription enabled

Example Request:

{ 
    "title": "Test Meeting", 
    "transcriptEnabled": false, 
    "summaryGenerated": false, 
    "roomId": "68aff60da51d6c83a24245a2", 
    "recordingId": "1737978989992_59591", 
}

Response (204, 404, 500)

Get Meeting - GET /meetings/list/:userId

Retrieves the list of meetings created by a specific user.

Field Type Required Description
userId String Yes User unqiue ID

Response (200, 500):

{
    "data" : {
        "createdAt" : "2025-10-14T13:08:09.559Z",
        "hostId" : "68de7a9d8f40ff41c940c7fb",
        "recordingIds" : [],
        "summaryGenerated" : false,
        "title" : "dsa",
        "transcriptEnabled" : false,
        "_id": "68ee4b39b22d6134386fc5dc"
    }
}

Recording Controls

Start Recording - POST /recording/start

Initiates recording for a specific room and stream with defined recording details.

Field Name Type Mandatory Description
roomId String Yes Room ID where recording.
userName String Yes Username who requested recording.
streamId String Yes Stream ID.
recordingId String Yes Recording ID.
startTime Date Yes Recording start time.
videoType String Yes Video type.
status String Yes Recording status.

Example Request:

{ 
    "roomId": "68affe24fabc0702c5d30c29", 
    "userName": "Haseeb Asif", 
    "streamId": 755961800257348400, 
    "recordingId": "1756364334628_738386", 
    "startTime": 1756364334634, 
    "videoType": "video", 
    "status": "pending" 
}

Response (201, 500)

Stop Recording - POST /recording/stop

Stops the ongoing recording and saves the recording end time.

Field Name Type Mandatory Description
recordingId String Yes Recording ID to be stopped.
streamId String Yes Stream ID.
endTime Date Yes End time when you ended the recording.

Example Request:

{ 
    " endTime": 1756364334634 
} 

Response (204, 404, 500)

Get Recordings - GET /recordings/list

Retrieves a list of all recorded sessions with their details.

Example Request:

GET /recordings/list

Response (200, 500):

    [
        {
            "_id": "670bc2ab12f5b0e6f7a4e9d4",
            "roomId": "68affe24fabc0702c5d30c29",
            "recordingId": "1756364334628_738386",
            "hostName": "Haseeb Asif",
            "status": true,
            "createdAt": "2025-10-13T10:15:30.000Z",
            "updatedAt": "2025-10-13T10:20:00.000Z"
        }
    ]

File Upload

Upload File - POST /room/:roomId/upload

Uploads a file to a specific meeting room.

Field Name Type Mandatory Description
roomId String Yes Room ID for file upload.

Example Request:

File Data

Response (200, 400):

{ 
    "success": true, 
    "data": { 
        "originalName": "Document_72835505.docx", 
        "filename": "68b01f530d7bbb02c917906f_Document_72835505.docx", 
        "size": 27685, 
        "roomId": "68b01f530d7bbb02c917906f", 
        "path": "documents/68b01f530d7bbb02c917906f/68b01f530d7bbb02c917906f_Document_72835505.docx" 
    }, 
    "msg": "File uploaded successfully!" 
}

Get File - GET /room/:roomId/files/:filename

Retrieves the details of an uploaded file in a specific meeting room.

Field Name Type Mandatory Description
roomId String Yes Room ID for file upload.
filename String Yes File Name of uploaded file.

Response (200, 404, 500):

{ 
    "success": true, 
    "data": { 
        "filename": "68b01f530d7bbb02c917906f_ZekliOpenAPI-for Customers - Instant.docx", 
        "originalName": "ZekliOpenAPI-for Customers - Instant.docx", 
        "size": 27685, 
        "uploadDate": "2025-08-28T09:32:48.745Z", 
        "path": "documents/68b01f530d7bbb02c917906f/68b01f530d7bbb02c917906f_ZekliOpenAPI for Customers - 
        Instant.docx" 
    }, 
    "msg": "File retrieved successfully!" 
}

Delete Files - DELETE /room/:roomId/files

Deletes all files uploaded in a specific meeting room.

Field Name Type Mandatory Description
roomId String Yes Room ID for file upload.

Response (200, 400, 404, 500):

{ 
    "success": true, 
    "msg": " All files for room 68b01f530d7bbb02c917906f deleted successfully" 
}

Transcription

Get Speech Token - GET /api/get-speech-token

Generates speech token for transcripiton using Azure AI foundry model.

Response:

{ 
    "token": 
"eyJhbGciOiJFUzI1NiIsImtpZCI6ImtleTEiLCJ0eXAiOiJKV1QifQ.eyJyZWdpb24iOiJlYXN0dXMyIiwic3Vic2NyaXB0aW9uL
 WlkIjoiZGQzMzZkZTFjN2M4NDk3MTgyZjQ4MTQ1YzZkYzM3MTciLCJwcm9kdWN0LWlkIjoiQUlTZXJ2aWNlcy5TMCIsI
 mNvZ25pdGl2ZS1zZXJ2aWNlcy1lbmRwb2ludCI6Imh0dHBzOi8vYXBpLmNvZ25pdGl2ZS5taWNyb3NvZnQuY29tL2lu
 dGVybmFsL3YxLjAvIiwiYXp1cmUtcmVzb3VyY2UtaWQiOiIvc3Vic2NyaXB0aW9ucy8wYzUxMWU0My0xNWNmLTRj
 ODMtOWE1ZS05MTY3NmE0NjFmMGUvcmVzb3VyY2VHcm91cHMvcmctc2hhaG5hd2F6LTI1NTVfYWkvcHJvdmlkZ
 XJzL01pY3Jvc29mdC5Db2duaXRpdmVTZXJ2aWNlcy9hY2NvdW50cy9haS1zaGFobmF3YXo4NzI5YWk1NTU2NDUw
 OTQ4NzEiLCJzY29wZSI6WyJzcGVlY2hzZXJ2aWNlcyIsInZpc2lvbiIsImh0dHBzOi8vYXBpLm1pY3Jvc29mdHRyYW5zbGF
 0b3IuY29tLyJdLCJhdWQiOlsidXJuOm1zLnNwZWVjaCIsInVybjptcy5zcGVlY2hzZXJ2aWNlcy5lYXN0dXMyIiwidXJuOm1
 zLnZpc2lvbi5lYXN0dXMyIiwidXJuOm1zLm1pY3Jvc29mdHRyYW5zbGF0b3IiXSwiZXhwIjoxNzU4MjgyNjM5LCJpc3Mi
 OiJ1cm46bXMuY29nbml0aXZlc2VydmljZXMifQ.byrrHOyz6gvykiqylXh2A7A79rlmmQBrgpnGZSsJZR9qJjRgLfFO1QzR
 MTyMOz3pwXyAMk0D682SPS3_gdL8PA", 
    "region": "eastus2" 
}

Send Transcript - POST /send-transcript

Stores a transcript message for a specific meeting.

Field Type Required Description
meetingId String Yes ID of the meeting
userName String Yes Name of the user sending the message
message String Yes Transcript message

Example Request:

{
    "meetingId": "68cd413466eab302c9f078cd",
    "userName": "Haseeb Stats",
    "message": "Hello."
}

Response (201, 500)

View Transcript - GET /view-transcript/:meetingId

Retrieves the entire transcript history for a specific meeting.

Parameter Type Required Description
meetingId String Yes ID of the meeting

Response:

{
    "data": [
        {
            "_id": "670b88775cba2f7de6f739d0",
            "meetingId": "68cd413466eab302c9f078cd",
            "userName": "Haseeb Stats",
            "message": "Hello.",
            "createdAt": "2025-10-13T12:20:30.000Z"
        }
    ]
}

Generate Transcript Summary - POST /transcription/generate-summary/:meetingId

Generates a summary of the transcript for a specific meeting.

Parameter Type Required Description
meetingId String Yes ID of the meeting

Response (200, 404, 500):

{
    "msg": "Summary Generated Successfully."
}

Get Transcript Summary - GET /meeting/:meetingId/summary

Retrieves the generated summary of a meeting.

Parameter Type Required Description
meetingId String Yes ID of the meeting

Response (200, 404, 500):

{
    "summary": "The participants discussed the upcoming product release, assigned tasks, and confirmed the timeline for testing."
}

Dashboard Analytics

Get Total Sessions - GET /reporting/total-sessions-for-user

Returns the total number of completed sessions based on filters.

Query Parameter Type Required Description
domain String No Domain name to filter sessions
sessionType String No Type of session
countryCode String No Country code
countryName String No Country name
cityName String No City name
startDateRange Date No Start date for filtering sessions
endDateRange Date No End date for filtering sessions
userID String No User ID of the host

Example Response:

GET /reporting/total-sessions-for-user?startDateRange=2025-10-01T00:00:00.000Z&endDateRange=2025-10-31T23:59:59.999Z&sessionType=&userID=68de7a9d8f40ff41c940c7fb

Response:

{
  "success": true,
  "data": 35
}

Get Total Sessions Aggregation - GET /reporting/total-sessions-aggregation-for-user

Returns total session counts grouped by domain and date.

Query Parameter Type Required Description
domain String No Domain name to filter sessions
sessionType String No Type of session
countryCode String No Country code
countryName String No Country name
cityName String No City name
startDateRange Date No Start date for filtering sessions
endDateRange Date No End date for filtering sessions
userID String No User ID of the host

Example Request:

GET /reporting/total-sessions-aggregation-for-user?sessionType=&userID=68de7a9d8f40ff41c940c7fb&startDateRange=2025-10-12T00%3A00%3A00.000Z&endDateRange=2025-10-18T23%3A59%3A59.999Z

Response:

{
  "success": true,
  "data": [
    {
      "domainCounts": [
        {
          "domain": "altegon.com",
          "count": 5
        }
      ],
      "date": "2025-10-12T00:00:00.000Z",
    }
  ]
}

Get Total Sessions Statistics - GET /reporting/total-sessions-statistics-for-user

Provides total number of sessions and sessions grouped by session type.

Query Parameter Type Required Description
domain String No Domain name to filter sessions
sessionType String No Type of session
countryCode String No Country code
countryName String No Country name
cityName String No City name
startDateRange Date No Start date for filtering sessions
endDateRange Date No End date for filtering sessions
userID String No User ID of the host

Example Request:

GET /reporting/total-sessions-statistics-for-user?startDateRange=2025-10-01T00:00:00.000Z&endDateRange=2025-10-31T23:59:59.999Z&sessionType=&userID=68de7a9d8f40ff41c940c7fb

Response:

{
  "success": true,
  "data": {
    "totalSessions": 35,
    "totalSessionsByType": [
      {
        "sessionType": "live",
        "totalSessions": 15
      }
      {
        "sessionType": "webinar",
        "totalSessions": 20
      },
      {
        "sessionType": "conference",
        "totalSessions": 15
      }
    ]
  }
}

Get Total Sessions By Location - GET /reporting/total-sessions-by-location-for-user

Returns total number of sessions grouped by city, region, and country.

Query Parameter Type Required Description
domain String No Domain name to filter sessions
sessionType String No Type of session
countryCode String No Country code
countryName String No Country name
cityName String No City name
startDateRange Date No Start date for filtering sessions
endDateRange Date No End date for filtering sessions
userID String No User ID of the host

Example Request:

GET /reporting/total-sessions-by-location-for-user?startDateRange=2025-10-01T00:00:00.000Z&endDateRange=2025-10-31T23:59:59.999Z&sessionType=&userID=68de7a9d8f40ff41c940c7fb

Response:

{
  "success": true,
  "data": [
    {
      "_id": {
        "city": "Lahore",
        "region": "Punjab",
        "country": "PK",
        "country_name": "Pakistan"
      },
      "count": 12
    },
    {
      "_id": {
        "city": "Karachi",
        "region": "Sindh",
        "country": "PK",
        "country_name": "Pakistan"
      },
      "count": 8
    }
  ]
}

Get Total Sessions and Participants Count By Location - GET /reporting/total-sessions-and-participants-count-by-location-for-user

Returns total sessions and total participants count grouped by city.

Query Parameter Type Required Description
domain String No Domain name to filter sessions
sessionType String No Type of session
countryCode String No Country code
countryName String No Country name
cityName String No City name
startDateRange Date No Start date for filtering sessions
endDateRange Date No End date for filtering sessions
userID String No User ID of the host

Example Request:

GET /reporting/total-sessions-and-participants-count-by-location-for-user?startDateRange=2025-10-01T00:00:00.000Z&endDateRange=2025-10-31T23:59:59.999Z&sessionType=&userID=68de7a9d8f40ff41c940c7fb

Response:

{
  "success": true,
  "data": [
    {
      "_id": "Lahore",
      "totalSessions": 10,
      "totalParticipants": 125
    },
    {
      "_id": "Karachi",
      "totalSessions": 6,
      "totalParticipants": 89
    }
  ]
}

Authentication & Headers

All API endpoints require authentication using the x-api-key header:

Content-Type: application/json
Authorization: x-api-key

Contact our support team to obtain your API key.

Error Handling

The API uses standard HTTP status codes: - 200 - Success | 201 - Created | 400 - Bad Request | 401 - Unauthorized - 403 - Forbidden | 404 - Not Found | 409 - Conflict | 500 - Internal Server Error

WebSocket Events

Overview

This section describes all the WebSocket events exchanged between Client ↔ Server,and their expected payloads.

SFU (mediasoap) socket:

Base URL: wss://sfu.altegon.com/socket.io

Events

createRoom

Description: Creates a new room with a unique room_id.

Payload:

{
  "room_id": "12345"
}

Response Payload (Callback):

{
    "already exists" // if room already exists
} 
{
  "room_id": "12345" //created successfully
}
join

Description: Joins an existing room with the given room_id.

Request Payload:

{
  "name": "John Doe",
  "room_id": "12345",
  "type": "host",
  "userId": "user-123"
}

Response Payload (Callback):

{
  "room": { /* Room state */ },
  "chatHistory": [
    {
      "room_id": "12345",
      "name": "Jane",
      "message": "Hello",
      "timestamp": 1692401234567
    }
  ]
}
getProducers

Description: Fetches list of active media producers in the room.

Response:

[
  {
    "producer_id": "abcd1234",
    "kind": "video",
    "peerId": "socket123"
  }
]
getRouterRtpCapabilities

Description: Returns mediasoup router RTP capabilities for the room.

Response Payload (Callback):

{
  "codecs": [...],
  "headerExtensions": [...]
}
createWebRtcTransport

Description: Creates a new WebRTC transport for the peer.

Response Payload (Callback):

{
  "id": "transport-id",
  "iceParameters": {},
  "iceCandidates": [],
  "dtlsParameters": {}
}
connectTransport

Description: Connects peer transport with provided DTLS parameters.

Payload:

{
  "transport_id": "transport-id",
  "dtlsParameters": { /* WebRTC DTLS params */ }
}

Response Payload (Callback):

"success"
produce

Description: Starts producing audio/video track.

Request Payload:

{
  "kind": "video",
  "rtpParameters": { /* WebRTC RTP params */ },
  "producerTransportId": "transport-id",
  "appData": { "type": "camera" }
}

Response Payload (Callback):

{
  "producer_id": "producer-uuid"
}
consume

Description: Consumes a producer stream from another peer.

Payload:

{
  "consumerTransportId": "transport-id",
  "producerId": "producer-uuid",
  "rtpCapabilities": { /* local RTP caps */ }
}

Response Payload (Callback):

{
  "id": "consumer-uuid",
  "producerId": "producer-uuid",
  "kind": "video",
  "rtpParameters": {}
}
resume

Description: Resumes a paused consumer stream.

Payload:

{}
getMyRoomInfo

Description: Returns the current room information.

Response Payload (Callback):

{
  "room_id": "12345",
  "peers": [...],
  "transports": [...]
}
sendMessage

Description: Sends a chat message to the room and saves it in Redis.

Payload:

{
  "room_id": "12345",
  "name": "John",
  "message": "Hello World"
}
videoPaused & videoResumed

Description: Notifies participants about video pause/resume state of a peer.

Payload:

{
  "socketId": "socket123",
  "name": "John",
  "producer_id": "producer-uuid",
  "room_id": "12345"
}
screen:shared

Description: Broadcasts that a peer has started sharing their screen.

Payload:

{
  "room_id": "12345",
  "socketId": "socket123",
  "name": "John"
}

Broadcast Payload:

{
  "socketId": "socket123",
  "name": "John"
}
screen:stopped

Description: Broadcasts that a peer has stopped screen sharing.

Payload:

{
  "room_id": "12345"
}
producerClosed

Description: Closes a specific media producer.

Payload:

{
  "producer_id": "producer-uuid"
}
exitRoom

Description: Leaves the room and cleans up transports.

Response Payload (Callback):

"successfully exited room"
cohost:request / respond

Payload: cohost:request (Client → Server → Broadcasters)

{
  "name": "John",
  "room_id": "12345",
  "socketId": "socket123",
  "userId": "user-123"
}

cohost:respond (Client → Server)

{
  "targetSocketId": "socket123",
  "targetUserId": "user-123",
  "status": "accepted" // or "revoked"
}

Broadcast Payload (Server → Target):

{
  "status": "accepted"
}

ART package socket:

Base URL: wss://prod.altegon.com/erizocontroller/socket.io

whiteBoardToggle

Description:
Toggles the whiteboard on or off for a specific room. This is typically emitted when a host enables or disables the whiteboard feature.

Payload:

{
  "type": "whiteBoardToggle",
  "msg": {
    "room_id": "12345",
    "flag": true,
    "socketId": "abc123"
  }
}
whiteBoardStateRequest

Description: A newly joined participant emits this to request the current whiteboard state from the active whiteboard owner.

Payload:

{
  "type": "whiteBoardStateRequest",
  "msg": {
    "room_id": "12345",
    "socketId": "newPeerSocketId"
  }
}
white-board-stage

Description:Sends the entire current canvas state as JSON. Used when a new peer joins and needs the current state. The host explicitly syncs the canvas to everyone.

Payload:

{
  "type": "white-board-stage",
  "msg": {
    "stage": { "attrs": { ... }, "children": [ ... ] },
    "socketId": "abc123",
    "room_id": "12345"
  }
}
sendDrawingData

Description: Handles real-time drawing actions (brush strokes, erasing, cursor movements, etc.) to sync between participants.

Payload:

{
  "type": "sendDrawingData",
  "msg": {
    "drawingType": "mousedown",
    "payload": {
      "pos": { "x": 200, "y": 150 },
      "eraser": false,
      "brushSize": 3,
      "inkColor": "#000000",
      "brushOpacity": 1
    },
    "socketId": "abc123",
    "room_id": "12345"
  }
}
Un-do

Description: Triggered when a user performs an undo action on their whiteboard. All peers remove the most recent stroke.

Payload:

{
  "type": "Un-do",
  "msg": {
    "socketId": "abc123",
    "room_id": "12345"
  }
}
clear-whiteBoard

Description: Triggered when the whiteboard is cleared by the host or a user. All peers remove all strokes.

Payload:

{
  "type": "clear-whiteBoard",
  "msg": {
    "socketId": "abc123",
    "room_id": "12345"
  }
}

Altegon Meet APIs socket:

Base URL: wss://prod.altegon.com/socket.io

Events

room.join

Description: Joins a user to a session room (v1.0 logic).

Payload

{
  "roomId": "abc123",
  "sessionType": "viewer",
  "ip": "192.168.0.100"
}

Recording Server Socket:

Base URL: wss://prod.altegon.com:3304/socket.io

Events

create-file

Description: Starts creating a recording file on server for a specific video track.

Payload

{
  "roomId": "room-1",
  "recordingId": "rec-101",
  "videoId": "cam-1"
}
stream

Description: Streams binary video chunks to the server.

Payload:

{
"data":{Binary video chunk},
"videoId":"VideoId"
}
process-recording

Description: Trigger final recording processing (scale + concat video).

Payload

{
  "roomId": "room-1",
  "recordingId": "rec-101"
}
stop-writing

Description: Stop writing stream for a specific video ID and finalize file.

Payload

{
"cam-1"
}

Support & Contact

For technical implementation assistance, troubleshooting, or additional architecture details, please contact our support team.