This guide gets you a working lobby in under 5 minutes. No dashboard setup. No player auth. Just curl. By the end, you’ll have created a lobby, joined it with a second player, updated player state, and torn it all down.Documentation Index
Fetch the complete documentation index at: https://docs.playflowcloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A PlayFlow project (free tier works — sign up here)
- Your Client API Key (from Project Settings → starts with
pfclient_)
1. Create a Lobby
A lobby is created by a “host” player. The host is whoever sends thex-player-id header on the create request.
You just made a lobby. No dashboard config was needed — PlayFlow used defaults. Note the
code field: that’s the invite code your players share.About {config}
The default in the URL is a lobby config name. If no config with that name exists in your dashboard, PlayFlow uses sensible defaults:
maxPlayers: 2timeout: 300sserverSize: small- Build: latest
default
casual, ranked_2v2, etc.) with custom matchmaking rules and server overrides. But you don’t need to yet.
2. Join as a Second Player
Share the invite codeMEOW-42 with your friend. They call:
3. Check Your Current Lobby
Any player can check which lobby they’re in using/me:
404.
4. Update Player State
Ready up, pick a character, set your MMR — anything goes in player state. The server merges your updates into existing state.player2’s updated state:
State updates merge — existing keys are preserved unless overwritten. Setting
ready: true doesn’t wipe out team: blue.5. Start the Game
When ready, the host launches a game server directly:server populated:
server.network_ports[0].host and server.network_ports[0].external_port to connect your game client. The server block is the same shape as GET /v3/servers/{instance_id}. The server transitions from launching → running in ~10-30 seconds (or ~5s with pool servers).
6. Leave (Cleanup)
Every player leaves with:{"status": "lobby_deleted"}.
If the host leaves while others remain, host transfers to the next player automatically.
That’s It
You’ve now exercised the full lobby lifecycle using just 6 API calls. The full API adds matchmaking, host-only actions (kick, settings), invite code joining, lobby browsing, real-time SSE updates, and more — but this is the 80% of what most games need.Lobby Lifecycle
Host-only actions (kick, settings, transfer host), leaving behavior, error handling.
Matchmaking
Skip the manual “start” — let PlayFlow find opponents automatically.
Real-time Events
Stop polling. Subscribe to live events with SSE.
API Reference
Every endpoint with full schemas and try-it-out.