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β
| Header | Required | Description |
|---|---|---|
VF-ORG-ID | Yes | Your organization ID |
URL Parametersβ
| Parameter | Description |
|---|---|
roomId | The 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β
| Field | Type | Description |
|---|---|---|
exists | boolean | Whether the room exists in the database |
isActive | boolean | Whether the room is currently live |
roomId | string | The room identifier |
title | string | Display title of the classroom |
participantCount | number | Current number of participants |
hasTeacher | boolean | Whether a teacher is present |
isRecording | boolean | Whether the room is being recorded |
createdAt | string | When the room was first created (ISO date) |
startedAt | string | When 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β
| Status | Message | Description |
|---|---|---|
| 400 | Missing roomId | roomId parameter is missing |
| 401 | Unauthorized | Invalid organization ID |
Tip: For real-time updates, consider polling every 5-10 seconds. For high-frequency monitoring, contact us about webhook support.