Skip to main content

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

POST /rooms

Request Body

name
string
required
Human-readable name for the room
password
string
Optional password to protect the room. Will be hashed using argon2id before storage.

Response

Status: 201 Created
room
object
The created room information
hostId
string
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

{
  "error": "Name is required"
}

List Rooms

Retrieve all active rooms with participant counts.
curl http://localhost:3000/rooms

Endpoint

GET /rooms

Response

Status: 200 OK
rooms
array
Array of room objects with participant counts

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.

Build docs developers (and LLMs) love