mp.matchmakingawait mp.matchmaking.list({ search?, limit? })
Browses public lobbies — no player token needed.
await mp.matchmaking.create(playerToken, name, { maxPlayers?, strictFull?, joinByRequests?, hostSwitch?, canLeaveRoom?, realtimeRoom?, password?, rules?, playerData? })
Creates a matchmaking lobby — options map to the wire fields one-to-one.
await mp.matchmaking.join(playerToken, matchmakingId, { password?, joinToken?, playerData? })
Direct-joins a lobby, creating the linked room.
await mp.matchmaking.leave(playerToken)
await mp.matchmaking.players(playerToken)
await mp.matchmaking.heartbeat(playerToken)
await mp.matchmaking.current(playerToken)
Lobby membership lifecycle.
await mp.matchmaking.start(playerToken)
await mp.matchmaking.stop(playerToken)
await mp.matchmaking.remove(playerToken)
await mp.matchmaking.kick(playerToken, playerId)
await mp.matchmaking.password(playerToken, password)
Host controls — start locks the lobby and spawns the room.
await mp.matchmakingRequests.send(playerToken, matchmakingId, { playerData? })
await mp.matchmakingRequests.respond(playerToken, requestId, 'accept'|'decline')
await mp.matchmakingRequests.status(playerToken, requestId)
Join-request flow for joinByRequests lobbies — players send, hosts answer, requesters poll status.
Matchmaking is the discovery layer above rooms. List browses public lobbies — no player token needed, so players can window-shop before signing in. Create opens a lobby with your options mapped one-to-one onto wire fields; join attaches a player and creates the linked room; the host's start locks the lobby and spawns the live room everyone plays in.
Private lobbies use a join-request flow instead of open joins: guests request a seat and the host approves. Heartbeat keeps membership alive for the whole lobby lifetime, while leave and current cover exit and state reads. Host controls — stop, remove, kick, password — mirror the room-level controls.