POST
/
api
/
v1
/
rooms
Create a room
curl --request POST \
  --url http://localhost:8787/api/v1/rooms \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "<string>",
  "hostId": "<string>",
  "maxPlayers": 123,
  "numQuestions": 123,
  "timeLimit": 123,
  "language": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "code": "<string>",
  "host_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "max_players": 123,
  "num_questions": 123,
  "time_limit": 123,
  "created_at": "2023-11-07T05:31:56Z"
}

Body

application/json
code
string
required
Minimum length: 4
hostId
string
required
maxPlayers
number
required
numQuestions
number
required
timeLimit
number
required
language
string
required

Response

Room created

id
string<uuid>
required
code
string
required
host_id
string<uuid>
required
max_players
integer
required
Required range: x > 0
num_questions
integer
required
Required range: x > 0
time_limit
integer
required
Required range: x > 0
created_at
string<date-time>
required