Create Room
Create a new room with an optional password.
curl -X POST http://localhost:3000/rooms \
-H "Content-Type: application/json" \
-d '{
"name": "My Team Room"
}'
Endpoint
Request Body
Human-readable name for the room
Optional password to protect the room. Will be hashed using argon2id before storage.
Response
Status: 201 Created
The created room information
Internal room ID (nanoid)
6-character uppercase room code for joining
Unix timestamp (milliseconds) when room was created
UUID of the room creator (for convenience)
Example Response
{
"room": {
"id": "V1StGXR8_Z5jdHi6B-myT",
"code": "ABC123",
"name": "My Team Room",
"hostId": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": 1709409600000
},
"hostId": "550e8400-e29b-41d4-a716-446655440000"
}
Error Responses
400 Bad Request - Missing Name
{
"error": "Name is required"
}
List Rooms
Retrieve all active rooms with participant counts.
curl http://localhost:3000/rooms
Endpoint
Response
Status: 200 OK
Array of room objects with participant counts
Creation timestamp (milliseconds)
Number of participants currently in the room
Example Response
{
"rooms": [
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"code": "ABC123",
"name": "My Team Room",
"hostId": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": 1709409600000,
"participantCount": 3
},
{
"id": "3z4s5t6u7v8w9x0y1z2a3b",
"code": "XYZ789",
"name": "Development Team",
"hostId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": 1709413200000,
"participantCount": 5
}
]
}
Notes
The password hash is never returned in API responses to prevent offline brute-force attacks.
Rooms are stored in memory and will be cleared when the hub restarts. Use the hub as a coordination service, not for persistent storage.