Registers your close-lobby callback URL.
Registers the https URL BluMint calls to tell you to close a lobby you created that BluMint no longer needs: the host decided the match, started it themselves or took it over to run it manually, a reset cleared it, or the match was deleted. Registration is optional but recommended. With a close URL, BluMint waits for your 200 to each close before it asks you for a new lobby for any player in the closed one, so no player is ever in two of your lobbies at once. Without one, BluMint sends you no closes and does not wait, so a create can name a player whose earlier lobby is still open on your side, and you expire such lobbies yourself. Registering again replaces the previous URL. The URL’s host must resolve only to public addresses, an IP-address host must be a public IPv4 address, and BluMint follows no redirects, so the URL must answer directly.
Which answer to send when BluMint calls your URL:
| Situation | Status | What happens next |
|---|---|---|
| You closed the lobby, it had already ended, or you made no lobby under the key and will refuse one | 200 | The player’s next match is created. |
| You are down or overloaded | 502, 503, 504, 408, 429, or no answer | The player’s next match waits while BluMint re-sends the close every 60 seconds, or once the wait your Retry-After names has passed when that is later, waiting at most 5 minutes, for up to 30 minutes, then goes to the host. |
For what BluMint sends to your URL and how to answer it, see Close a lobby.
curl --request POST \
--url https://staging.blumint.io/api/tournaments/match/setClose \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"closeMatchUrl": "https://www.yourgame.com/api/match/close"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({closeMatchUrl: 'https://www.yourgame.com/api/match/close'})
};
fetch('https://staging.blumint.io/api/tournaments/match/setClose', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.blumint.io/api/tournaments/match/setClose"
payload = { "closeMatchUrl": "https://www.yourgame.com/api/match/close" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "Success - Match close callback URL set successfully."
}Authorizations
Body
Callbacks
POST{$request.body#/closeMatchUrl}matchClose
Body
The Idempotency-Key of the create that made the lobby to close, never your matchId. It can belong to a create whose answer never reached BluMint, or to one that never reached you.
128^[\dA-Za-z-]{1,128}$Why BluMint is closing your lobby. Close it and answer 200 whatever the reason; the reason is for your logs.
- decided: the BluMint match, or a game session of it, got a result without you, for example because the host entered a score.
- replaced: something other than the host's take over replaced the lobby you made. BluMint handed the match to the host (your create failed for good after you may have made a lobby: a 500, a 409 idempotency_key_reused, a 200 it could not use, an answer the decision table does not list, or an outage on its last send; or its hold ran out) and the host then set it up; the host set it up while your create was still on its way; the host reset its score; a player change re-seated it; or you made a second lobby under one Idempotency-Key.
- removed: the BluMint match was deleted, for example because the host undid the start of the tournament.
- hostOverride: the host pressed take over on a match you were running or setting up, to run it manually instead.
decided, replaced, removed, hostOverride Response
The lobby is closed or had already ended, or no lobby exists under the key and you will refuse a create under it.
Response
The close-lobby callback URL is registered.
"Success - Match close callback URL set successfully."
curl --request POST \
--url https://staging.blumint.io/api/tournaments/match/setClose \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"closeMatchUrl": "https://www.yourgame.com/api/match/close"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({closeMatchUrl: 'https://www.yourgame.com/api/match/close'})
};
fetch('https://staging.blumint.io/api/tournaments/match/setClose', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.blumint.io/api/tournaments/match/setClose"
payload = { "closeMatchUrl": "https://www.yourgame.com/api/match/close" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "Success - Match close callback URL set successfully."
}