Skip to content

Open a room for a game; the active profile hosts it and takes the first seat.

POST
/api/rooms
curl --request POST \
--url https://example.com/api/rooms \
--header 'Content-Type: application/json' \
--data '{ "gameId": "example", "seats": 4, "isPublic": true, "accountOnly": false, "botsFill": true, "botLevel": "example", "botsTakeOver": true, "turnSeconds": 20, "options": "example", "spectators": false }'
Media typeapplication/json
object
gameId
required
string
seats
integer format: int32
default: 4
isPublic
boolean
default: true
accountOnly
boolean
botsFill
boolean
default: true
botLevel
null | string
botsTakeOver
boolean
default: true
turnSeconds
integer format: int32
default: 20
options
spectators
boolean

OK

Media typeapplication/json
object
id
required
string format: uuid
code
required
string
gameId
required
string
gameVersion
required
string
status
required
string
hostProfileId
required
string format: uuid
isPublic
required
boolean
accountOnly
required
boolean
locked
required
boolean
seats
required
integer format: int32
botsFill
required
boolean
botLevel
required
null | string
botsTakeOver
required
boolean
turnSeconds
required
integer format: int32
options
required
seatList
required
Array<object>
object
seat
required
integer format: int32
profileId
required
null | string format: uuid
name
required
null | string
avatar
required
null | string
bot
required
null | string
connected
required
boolean
ready
required
boolean
scores
required
Array<integer>
hand
required
integer format: int32
handSeats
required
Array<integer>
mySeat
required
null | integer format: int32
spectators
required
boolean
watchers
required
Array<string>

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"code": "example",
"gameId": "example",
"gameVersion": "example",
"status": "example",
"hostProfileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"isPublic": true,
"accountOnly": true,
"locked": true,
"seats": 1,
"botsFill": true,
"botLevel": "example",
"botsTakeOver": true,
"turnSeconds": 1,
"options": "example",
"seatList": [
{
"seat": 1,
"profileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"avatar": "example",
"bot": "example",
"connected": true,
"ready": true
}
],
"scores": [
1
],
"hand": 1,
"handSeats": [
1
],
"mySeat": 1,
"spectators": true,
"watchers": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

Bad Request

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
errors
object
key
additional properties
Array<string>

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

Forbidden

Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}