curl --request POST \
--url https://api.computeflow.cloud/api/v3/lobbies/{config} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--header 'x-player-id: <x-player-id>' \
--data '
{
"name": "<string>",
"region": "us-east",
"maxPlayers": 2,
"isPrivate": false,
"allowLateJoin": true,
"settings": {},
"state": {},
"forceFresh": true
}
'import requests
url = "https://api.computeflow.cloud/api/v3/lobbies/{config}"
payload = {
"name": "<string>",
"region": "us-east",
"maxPlayers": 2,
"isPrivate": False,
"allowLateJoin": True,
"settings": {},
"state": {},
"forceFresh": True
}
headers = {
"x-player-id": "<x-player-id>",
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-player-id': '<x-player-id>',
'api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
region: 'us-east',
maxPlayers: 2,
isPrivate: false,
allowLateJoin: true,
settings: {},
state: {},
forceFresh: true
})
};
fetch('https://api.computeflow.cloud/api/v3/lobbies/{config}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.computeflow.cloud/api/v3/lobbies/{config}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'region' => 'us-east',
'maxPlayers' => 2,
'isPrivate' => false,
'allowLateJoin' => true,
'settings' => [
],
'state' => [
],
'forceFresh' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>",
"x-player-id: <x-player-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.computeflow.cloud/api/v3/lobbies/{config}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"region\": \"us-east\",\n \"maxPlayers\": 2,\n \"isPrivate\": false,\n \"allowLateJoin\": true,\n \"settings\": {},\n \"state\": {},\n \"forceFresh\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-player-id", "<x-player-id>")
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.computeflow.cloud/api/v3/lobbies/{config}")
.header("x-player-id", "<x-player-id>")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"region\": \"us-east\",\n \"maxPlayers\": 2,\n \"isPrivate\": false,\n \"allowLateJoin\": true,\n \"settings\": {},\n \"state\": {},\n \"forceFresh\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.computeflow.cloud/api/v3/lobbies/{config}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-player-id"] = '<x-player-id>'
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"region\": \"us-east\",\n \"maxPlayers\": 2,\n \"isPrivate\": false,\n \"allowLateJoin\": true,\n \"settings\": {},\n \"state\": {},\n \"forceFresh\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"config": "<string>",
"status": "waiting",
"host": "<string>",
"maxPlayers": 123,
"currentPlayers": 123,
"region": "<string>",
"isPrivate": true,
"allowLateJoin": true,
"settings": {},
"players": [
{
"id": "<string>",
"state": {},
"isHost": true
}
],
"server": {
"instance_id": "<string>",
"name": "<string>",
"status": "launching",
"network_ports": [
{
"name": "<string>",
"internal_port": 123,
"external_port": 123,
"protocol": "udp",
"host": "<string>",
"tls_enabled": true
}
],
"startup_args": "<string>",
"service_type": "match_based",
"compute_size": "<string>",
"region": "<string>",
"version_tag": "<string>",
"version": 123,
"started_at": "2023-11-07T05:31:56Z",
"stopped_at": "2023-11-07T05:31:56Z",
"auto_restart": true,
"custom_data": {},
"ttl": 123,
"is_pool_server": true,
"pool_claimed_at": "2023-11-07T05:31:56Z",
"match_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"matchmaking": {
"mode": "<string>",
"startedAt": "<string>",
"queueStats": {
"playersSearching": 123,
"lobbiesInQueue": 123,
"avgWaitSeconds": 123
},
"confirmation": {
"deadline": "<string>",
"confirmed": true
}
},
"createdAt": "<string>",
"updatedAt": "<string>",
"matchmakingError": "<string>"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}Create a lobby
Creates a new lobby and makes the caller the host. The caller is identified by the x-player-id header.
The lobby starts in waiting status. Other players can join via POST /{config}/join using the lobby ID or invite code (if the lobby is private).
Lobby config: The {config} path parameter maps to a lobby configuration defined in your project settings. Each config controls timeout, server size, matchmaking modes, and custom properties. If no matching config exists, sensible defaults are used.
Player state: Optionally pass state to set initial player state (ready status, team, loadout, MMR, etc.). Other players see this in the players array.
Private lobbies: Set isPrivate: true to hide the lobby from browsing and generate an invite code.
curl --request POST \
--url https://api.computeflow.cloud/api/v3/lobbies/{config} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--header 'x-player-id: <x-player-id>' \
--data '
{
"name": "<string>",
"region": "us-east",
"maxPlayers": 2,
"isPrivate": false,
"allowLateJoin": true,
"settings": {},
"state": {},
"forceFresh": true
}
'import requests
url = "https://api.computeflow.cloud/api/v3/lobbies/{config}"
payload = {
"name": "<string>",
"region": "us-east",
"maxPlayers": 2,
"isPrivate": False,
"allowLateJoin": True,
"settings": {},
"state": {},
"forceFresh": True
}
headers = {
"x-player-id": "<x-player-id>",
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-player-id': '<x-player-id>',
'api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
region: 'us-east',
maxPlayers: 2,
isPrivate: false,
allowLateJoin: true,
settings: {},
state: {},
forceFresh: true
})
};
fetch('https://api.computeflow.cloud/api/v3/lobbies/{config}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.computeflow.cloud/api/v3/lobbies/{config}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'region' => 'us-east',
'maxPlayers' => 2,
'isPrivate' => false,
'allowLateJoin' => true,
'settings' => [
],
'state' => [
],
'forceFresh' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>",
"x-player-id: <x-player-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.computeflow.cloud/api/v3/lobbies/{config}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"region\": \"us-east\",\n \"maxPlayers\": 2,\n \"isPrivate\": false,\n \"allowLateJoin\": true,\n \"settings\": {},\n \"state\": {},\n \"forceFresh\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-player-id", "<x-player-id>")
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.computeflow.cloud/api/v3/lobbies/{config}")
.header("x-player-id", "<x-player-id>")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"region\": \"us-east\",\n \"maxPlayers\": 2,\n \"isPrivate\": false,\n \"allowLateJoin\": true,\n \"settings\": {},\n \"state\": {},\n \"forceFresh\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.computeflow.cloud/api/v3/lobbies/{config}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-player-id"] = '<x-player-id>'
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"region\": \"us-east\",\n \"maxPlayers\": 2,\n \"isPrivate\": false,\n \"allowLateJoin\": true,\n \"settings\": {},\n \"state\": {},\n \"forceFresh\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"config": "<string>",
"status": "waiting",
"host": "<string>",
"maxPlayers": 123,
"currentPlayers": 123,
"region": "<string>",
"isPrivate": true,
"allowLateJoin": true,
"settings": {},
"players": [
{
"id": "<string>",
"state": {},
"isHost": true
}
],
"server": {
"instance_id": "<string>",
"name": "<string>",
"status": "launching",
"network_ports": [
{
"name": "<string>",
"internal_port": 123,
"external_port": 123,
"protocol": "udp",
"host": "<string>",
"tls_enabled": true
}
],
"startup_args": "<string>",
"service_type": "match_based",
"compute_size": "<string>",
"region": "<string>",
"version_tag": "<string>",
"version": 123,
"started_at": "2023-11-07T05:31:56Z",
"stopped_at": "2023-11-07T05:31:56Z",
"auto_restart": true,
"custom_data": {},
"ttl": 123,
"is_pool_server": true,
"pool_claimed_at": "2023-11-07T05:31:56Z",
"match_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"matchmaking": {
"mode": "<string>",
"startedAt": "<string>",
"queueStats": {
"playersSearching": 123,
"lobbiesInQueue": 123,
"avgWaitSeconds": 123
},
"confirmation": {
"deadline": "<string>",
"confirmed": true
}
},
"createdAt": "<string>",
"updatedAt": "<string>",
"matchmakingError": "<string>"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}Path Parameters
Body
Create a new lobby. The caller (x-player-id) becomes the host.
Response
Lobby created. The caller is the host. Share the id or code for others to join.
Full lobby state including players, server, and matchmaking info.