curl --request PATCH \
--url https://api.simpl.gg/v1/queues/{queue_id} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"enabled": false
}
'import requests
url = "https://api.simpl.gg/v1/queues/{queue_id}"
payload = { "enabled": False }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: false})
};
fetch('https://api.simpl.gg/v1/queues/{queue_id}', 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.simpl.gg/v1/queues/{queue_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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.simpl.gg/v1/queues/{queue_id}"
payload := strings.NewReader("{\n \"enabled\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.simpl.gg/v1/queues/{queue_id}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpl.gg/v1/queues/{queue_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"queue_id": "ranked_2v2",
"name": "Ranked 2v2",
"enabled": true,
"max_players": 4,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"timeout": 120,
"heartbeat": false,
"heartbeat_timeout": 30,
"host_leave_behavior": "promote",
"lobby_ttl": 3600,
"invite_code_config": {
"enabled": true,
"length": 6,
"charset": "numeric",
"prefix": "SIMPL-"
},
"server_settings": {
"version_tag": "1.2.3",
"region": "iad",
"tier": "1x-2g",
"network_ports": [
{
"name": "game_udp",
"protocol": "udp",
"internal_port": 7777,
"external_port": 30412,
"host": "37.16.24.10",
"tls_enabled": false
}
],
"startup_args": "-log",
"ttl": 1,
"auto_restart": false,
"custom_data": {
"map": "forest",
"mode": "ctf"
}
},
"matchmaking": {
"teams": 2,
"players_per_team": 2,
"min_players_per_team": 1,
"min_teams": 2,
"team_composition": {
"monsters": {
"boss": 1
},
"hunters": {
"medic": 1,
"assault": 2
}
},
"use_version_from_state": false,
"timeout": 120,
"max_party_size": 4,
"rules": [
{
"type": "difference",
"field": "mmr",
"max_difference": 200
}
]
}
}Update a queue
Partial update. queue_id is immutable. Changes apply to lobbies created
after the update; lobbies already in the queue keep the settings they
entered with.
curl --request PATCH \
--url https://api.simpl.gg/v1/queues/{queue_id} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"enabled": false
}
'import requests
url = "https://api.simpl.gg/v1/queues/{queue_id}"
payload = { "enabled": False }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: false})
};
fetch('https://api.simpl.gg/v1/queues/{queue_id}', 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.simpl.gg/v1/queues/{queue_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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.simpl.gg/v1/queues/{queue_id}"
payload := strings.NewReader("{\n \"enabled\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.simpl.gg/v1/queues/{queue_id}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpl.gg/v1/queues/{queue_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"queue_id": "ranked_2v2",
"name": "Ranked 2v2",
"enabled": true,
"max_players": 4,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"timeout": 120,
"heartbeat": false,
"heartbeat_timeout": 30,
"host_leave_behavior": "promote",
"lobby_ttl": 3600,
"invite_code_config": {
"enabled": true,
"length": 6,
"charset": "numeric",
"prefix": "SIMPL-"
},
"server_settings": {
"version_tag": "1.2.3",
"region": "iad",
"tier": "1x-2g",
"network_ports": [
{
"name": "game_udp",
"protocol": "udp",
"internal_port": 7777,
"external_port": 30412,
"host": "37.16.24.10",
"tls_enabled": false
}
],
"startup_args": "-log",
"ttl": 1,
"auto_restart": false,
"custom_data": {
"map": "forest",
"mode": "ctf"
}
},
"matchmaking": {
"teams": 2,
"players_per_team": 2,
"min_players_per_team": 1,
"min_teams": 2,
"team_composition": {
"monsters": {
"boss": 1
},
"hunters": {
"medic": 1,
"assault": 2
}
},
"use_version_from_state": false,
"timeout": 120,
"max_party_size": 4,
"rules": [
{
"type": "difference",
"field": "mmr",
"max_difference": 200
}
]
}
}Authorizations
Per-project server key, prefixed sk_live_. Full access to every
endpoint. Keep it on your backend: never ship it in a game binary.
Path Parameters
Queue identifier.
"ranked_2v2"
Body
Partial update. Only the supplied fields change. queue_id is immutable.
x >= 1x >= 1promote, delete 1 <= x <= 100x >= 1Controls invite code generation for lobbies in this queue.
length counts the random portion only. The prefix is not included.
| config | output |
|---|---|
length: 6, charset: alphanumeric | K7Q2F1 |
length: 6, charset: alphanumeric, prefix: "SIMPL-" | SIMPL-K7Q2F1 |
length: 4, charset: numeric, prefix: "GAME-" | GAME-4829 |
length: 8, charset: alphabetic | KQZRFWPM |
Show child attributes
Show child attributes
Template used to create the game server when a match is made.
Show child attributes
Show child attributes
How lobbies in this queue are matched against each other. Use either the
symmetric fields (teams, players_per_team) or team_composition, not
both.
Show child attributes
Show child attributes
Response
The updated queue.
A matchmaking queue. Queues are first-class resources in Simpl with their own endpoints, not settings buried inside a project config blob.
"ranked_2v2"
"Ranked 2v2"
Disabled queues reject new lobbies with QUEUE_DISABLED.
Maximum players per lobby in this queue.
1 <= x <= 1004
Seconds a lobby may sit in this queue before being returned to waiting.
x >= 1120
Whether players must heartbeat to stay in the lobby.
Seconds without a heartbeat before a player is dropped.
x >= 130
What happens when the host leaves. promote transfers host to the
longest-present remaining player, delete destroys the lobby.
promote, delete Seconds an idle lobby survives before deletion.
x >= 13600
Controls invite code generation for lobbies in this queue.
length counts the random portion only. The prefix is not included.
| config | output |
|---|---|
length: 6, charset: alphanumeric | K7Q2F1 |
length: 6, charset: alphanumeric, prefix: "SIMPL-" | SIMPL-K7Q2F1 |
length: 4, charset: numeric, prefix: "GAME-" | GAME-4829 |
length: 8, charset: alphabetic | KQZRFWPM |
Show child attributes
Show child attributes
Template used to create the game server when a match is made.
Show child attributes
Show child attributes
How lobbies in this queue are matched against each other. Use either the
symmetric fields (teams, players_per_team) or team_composition, not
both.
Show child attributes
Show child attributes