Skip to main content

Room Status

GET /v1/room/:roomId/status

Get the current status of a room. This is useful for checking whether a class is still active before attempting to join, or for building dashboards that show live room information.

When to Use This​

  • Pre-join checks β€” Verify a room is active before redirecting students
  • Admin dashboards β€” Show which rooms are currently live
  • Monitoring β€” Track participant counts across multiple rooms
  • Recording status β€” Check if a room is being recorded

Request​

Headers​

HeaderRequiredDescription
VF-ORG-IDYesYour organization ID

URL Parameters​

ParameterDescription
roomIdThe room identifier used when creating the class

Example Request​

curl -X GET https://api.verriflo.com/v1/room/math-101/status \
-H "VF-ORG-ID: your-organization-id"

Response​

Success (200)​

{
"success": true,
"message": "Room status retrieved",
"data": {
"exists": true,
"isActive": true,
"roomId": "math-101",
"title": "Calculus I - Morning Session",
"participantCount": 12,
"hasTeacher": true,
"isRecording": true,
"createdAt": "2024-01-15T09:00:00.000Z",
"startedAt": "2024-01-15T09:02:30.000Z"
}
}

Response Fields​

FieldTypeDescription
existsbooleanWhether the room exists in the database
isActivebooleanWhether the room is currently live
roomIdstringThe room identifier
titlestringDisplay title of the classroom
participantCountnumberCurrent number of participants
hasTeacherbooleanWhether a teacher is present
isRecordingbooleanWhether the room is being recorded
createdAtstringWhen the room was first created (ISO date)
startedAtstringWhen the class actually started (ISO date)

Room Doesn't Exist (200)​

If the room hasn't been created yet:

{
"success": true,
"message": "Room not found",
"data": {
"exists": false,
"isActive": false,
"roomId": "math-101"
}
}

This isn't an errorβ€”it just means the room doesn't exist yet. Teachers create rooms when they join.

Examples​

JavaScript: Check Before Join​

async function canStudentJoin(roomId) {
const response = await fetch(
`https://api.verriflo.com/v1/room/${roomId}/status`,
{
headers: { "VF-ORG-ID": process.env.VERRIFLO_ORG_ID },
}
);

const { data } = await response.json();

if (!data.exists || !data.isActive) {
return {
canJoin: false,
reason: "Class hasn't started yet. Please wait for your teacher.",
};
}

if (!data.hasTeacher) {
return {
canJoin: false,
reason: "Teacher is not in the room yet.",
};
}

return { canJoin: true };
}

Python: Dashboard Monitoring​

import requests
import os

def get_active_rooms(room_ids: list[str]) -> list[dict]:
"""Get status for multiple rooms."""
active_rooms = []

for room_id in room_ids:
response = requests.get(
f'https://api.verriflo.com/v1/room/{room_id}/status',
headers={'VF-ORG-ID': os.environ['VERRIFLO_ORG_ID']}
)

data = response.json()['data']

if data.get('isActive'):
active_rooms.append({
'roomId': room_id,
'title': data.get('title'),
'participants': data.get('participantCount'),
'isRecording': data.get('isRecording')
})

return active_rooms

Errors​

StatusMessageDescription
400Missing roomIdroomId parameter is missing
401UnauthorizedInvalid organization ID

Tip: For real-time updates, consider polling every 5-10 seconds. For high-frequency monitoring, contact us about webhook support.