This is V3, PlayFlow’s primary lobby API. It’s a clean, player-centric REST API with SSE for real-time updates. If you’re migrating from the older NestJS lobby system at
api.scale.computeflow.cloud, that system continues to work — V3 is the new recommended path.Core Concepts
Lobbies
A lobby is a virtual room where players gather before a game starts. Every lobby has:- A host — the player who created it (has admin powers: kick, settings, start game)
- A list of players with their individual state (ready, team, loadout, MMR, etc.)
- Settings — game-specific data (map, mode, difficulty) that gets passed to the game server
- A status:
waiting,in_queue,in_game, etc. - Optional invite code for sharing with friends
Lobby Configs
A lobby config is a reusable template for lobbies. You define it once (in the dashboard or via API) and reference it by name in your code:casual— 8 players, quick play, no MMRranked_2v2— 4 players, MMR-based matchmaking, 2 teams of 2monster_hunt— asymmetric, 1 monster vs 5 hunters
Matchmaking
Matchmaking is when players queue up and the system finds them opponents. A matchmaking game is just a group of lobbies grouped together pointing to the same game server. When two (or more) lobbies enter the queue and match:- They all transition from
in_queuetoin_game - One dedicated game server is launched
- All matched lobbies get the same
matchIdand server connection info - Players connect to the server and play
- Traditional teams — 2v2, 5v5, 100-player FFA, 50-duo battle royale
- Asymmetric roles — 1 boss vs 5 hunters, custom team compositions
- Skill-based — MMR difference rules that automatically relax as wait time grows
- Region-aware — weighted voting across player region preferences
- Backfill — new players can join matches already in progress
The Two Core Flows
Most games use one of these patterns. Pick the one that fits your game.- Quick Match
- Invite a Friend
“Just put me in a game.” The player presses a button, gets connected to a server within seconds.
Best for: Ranked ladders, competitive play, quick play modes, Counter-Strike/League of Legends-style matchmaking.
Authentication
Every request has two headers:| Header | Purpose | Example |
|---|---|---|
api-key | Your project’s API key | pfclient_abc123... |
x-player-id | Unique identifier for the player | player_12345 or any string |
Response Shape
Every lobby endpoint returns the same consistent shape:matchmaking populates with { mode, startedAt, queueStats }. When a game server is running, server populates with { instanceId, status, region, ports[] }.
What’s Next
Quickstart
Get a working lobby in 5 minutes with copy-paste curl commands.
Lobby Lifecycle
Create, join, update state, kick, transfer host, start games.
Matchmaking
Configure modes, skill-based rules, asymmetric teams, expanding buckets.
Real-time Events
Subscribe to SSE for live lobby updates and queue stats.
API Reference
Every endpoint with request/response schemas and try-it-out.