curl --request POST \
--url https://api.example.com/rooms/:code/join \
--header 'Content-Type: application/json' \
--data '
{
"guestName": "<string>"
}
'{
"400": {},
"403": {},
"404": {},
"id": "<string>",
"roomId": "<string>",
"userId": "<string>",
"guestName": "<string>",
"isActive": true,
"isHost": true,
"joinedAt": "<string>",
"leftAt": "<string>"
}curl --request POST \
--url https://api.example.com/rooms/:code/join \
--header 'Content-Type: application/json' \
--data '
{
"guestName": "<string>"
}
'{
"400": {},
"403": {},
"404": {},
"id": "<string>",
"roomId": "<string>",
"userId": "<string>",
"guestName": "<string>",
"isActive": true,
"isHost": true,
"joinedAt": "<string>",
"leftAt": "<string>"
}addParticipant service method.
addParticipant method validates room access and creates a participant record.userIdguestName// WebSocket event
socket.emit('join-room', {
code: 'abc-def-ghi'
});
// Response
{
"id": "clx3a4b5c6d7e8f9g0h1i2j",
"roomId": "clx1a2b3c4d5e6f7g8h9i0j",
"userId": "clx0a1b2c3d4e5f6g7h8i9j",
"guestName": null,
"isActive": true,
"isHost": false,
"joinedAt": "2026-03-03T10:35:00.000Z",
"leftAt": null
}
// WebSocket event
socket.emit('join-room', {
code: 'abc-def-ghi',
guestName: 'Jane Smith'
});
// Response
{
"id": "clx4a5b6c7d8e9f0g1h2i3j",
"roomId": "clx1a2b3c4d5e6f7g8h9i0j",
"userId": null,
"guestName": "Jane Smith",
"isActive": true,
"isHost": false,
"joinedAt": "2026-03-03T10:36:00.000Z",
"leftAt": null
}
room.isActive is false, returns 400 errorroom.isLocked is true, returns 403 errormaxParticipants, returns 400 erroruserIdguestNameuserId matches room.hostId{
"statusCode": 400,
"message": "Room is no longer active"
}
{
"statusCode": 400,
"message": "Room is full"
}
{
"statusCode": 403,
"message": "Room is locked"
}
{
"statusCode": 404,
"message": "Room not found"
}