Create a new lobby under a specific lobby configuration
Authorizations
Headers
API key for authentication
Optional client authentication token for player validation
Query Parameters
Name of the lobby configuration (from project settings) to use
Body
The display name of the lobby shown to players. This should be descriptive and help players understand the lobby purpose.
3 - 50
"Casual CTF Tournament - Europe"
Maximum number of players allowed in the lobby. The value must be between 1 and 100.
1 <= x <= 100
8
Whether the lobby is private (invite-only). Private lobbies generate an invite code that must be shared with other players.
false
Whether to generate an invite code for this lobby. If true, an invite code will be created even for public lobbies. Always true for private lobbies.
false
Whether late joining is allowed. When true, players can join after the game has started. When false, the lobby closes to new players once in_game status is set.
true
Geographic region for the lobby server. Affects latency and matchmaking for players.
us-east
, us-west
, eu-north
, eu-west
, ap-south
, sea
, ea
, ap-north
, ap-southeast
, south-africa
, south-america-brazil
, south-america-chile
"us-west"
Custom game settings specific to your game. These settings are passed to the game server when the game starts and can contain any game-specific configuration.
{
"gameMode": "capture-the-flag",
"mapName": "castle",
"teamSize": 4,
"friendlyFire": false,
"scoreLimit": 10,
"timeLimit": 600,
"customRulesets": ["fastFlag", "quickRespawn"],
"weaponRestrictions": ["rocketLauncher"]
}
ID of the player creating the lobby. This player will be set as the host and automatically added to the players list.
"player123"
Response
The lobby has been successfully created
Unique identifier for the lobby
"e495d158-5d18-45e4-81b2-384790a8b830"
Name of the lobby displayed to players
255
"Pro Players Only"
ID of the player who is the current host
255
"player123"
Maximum number of players allowed in the lobby
1 <= x <= 100
8
Current number of players in the lobby
3
Geographic region for the lobby server
"us-west"
Current status of the lobby
waiting
, in_game
, finished
"waiting"
Whether the lobby is private (requires invite code to join)
false
Whether to generate an invite code for this lobby (always true for private lobbies)
false
Invite code for private lobbies or public lobbies with useInviteCode=true
10
"abc123"
Whether players can join after the game has started
true
Custom game settings for this lobby
{
"gameMode": "capture-the-flag",
"timeLimit": 300,
"teamSize": 4,
"mapRotation": ["map1", "map2"]
}
Array of player IDs currently in the lobby
["player123", "player456", "player789"]
Real-time state information for each player, indexed by player ID
{
"player123": {
"position": { "x": 100, "y": 20 },
"health": 80
},
"player456": {
"position": { "x": 200, "y": 30 },
"health": 95
}
}
Game server information returned from PlayFlow API when a game is running. Contains all connection details, server state, and metadata.
{
"instance_id": "srv-a1b2c3d4",
"name": "lobby-1698754321",
"network_ports": [
{
"name": "game",
"internal_port": 7777,
"external_port": 30000,
"protocol": "udp",
"host": "203.0.113.42",
"tls_enabled": false
},
{
"name": "web",
"internal_port": 8080,
"external_port": 30001,
"protocol": "tcp",
"host": "203.0.113.42",
"tls_enabled": true
}
],
"status": "running",
"startup_args": "--mode capture-the-flag --map castle",
"service_type": "match_based",
"compute_size": "small",
"region": "us-west",
"version_tag": "v1.0.2",
"started_at": "2023-10-31T15:30:00Z",
"stopped_at": null,
"custom_data": {
"gameMode": "capture-the-flag",
"mapName": "castle",
"teamSize": 4,
"scoreLimit": 10
},
"ttl": 3600
}
Time in seconds before the lobby auto-closes due to inactivity
60 <= x <= 3600
300
Timestamp when this lobby was created
"2023-08-15T14:30:00.000Z"
Timestamp when this lobby was last updated
"2023-08-15T15:45:00.000Z"