Create tournament
curl --request POST \
--url https://ts.playservices.tech/api/api/tournaments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test Tournament",
"external_id": "EXT_001",
"game": "crash-classic",
"scheduled_start": "2023-11-07T05:31:56Z",
"entry_fee": 10.5,
"max_players": 50,
"min_players": 5,
"config": {
"tournament_type": "points_based"
}
}
'import requests
url = "https://ts.playservices.tech/api/api/tournaments"
payload = {
"name": "Test Tournament",
"external_id": "EXT_001",
"game": "crash-classic",
"scheduled_start": "2023-11-07T05:31:56Z",
"entry_fee": 10.5,
"max_players": 50,
"min_players": 5,
"config": { "tournament_type": "points_based" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Test Tournament',
external_id: 'EXT_001',
game: 'crash-classic',
scheduled_start: '2023-11-07T05:31:56Z',
entry_fee: 10.5,
max_players: 50,
min_players: 5,
config: {tournament_type: 'points_based'}
})
};
fetch('https://ts.playservices.tech/api/api/tournaments', 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://ts.playservices.tech/api/api/tournaments",
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' => 'Test Tournament',
'external_id' => 'EXT_001',
'game' => 'crash-classic',
'scheduled_start' => '2023-11-07T05:31:56Z',
'entry_fee' => 10.5,
'max_players' => 50,
'min_players' => 5,
'config' => [
'tournament_type' => 'points_based'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://ts.playservices.tech/api/api/tournaments"
payload := strings.NewReader("{\n \"name\": \"Test Tournament\",\n \"external_id\": \"EXT_001\",\n \"game\": \"crash-classic\",\n \"scheduled_start\": \"2023-11-07T05:31:56Z\",\n \"entry_fee\": 10.5,\n \"max_players\": 50,\n \"min_players\": 5,\n \"config\": {\n \"tournament_type\": \"points_based\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://ts.playservices.tech/api/api/tournaments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Test Tournament\",\n \"external_id\": \"EXT_001\",\n \"game\": \"crash-classic\",\n \"scheduled_start\": \"2023-11-07T05:31:56Z\",\n \"entry_fee\": 10.5,\n \"max_players\": 50,\n \"min_players\": 5,\n \"config\": {\n \"tournament_type\": \"points_based\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ts.playservices.tech/api/api/tournaments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Test Tournament\",\n \"external_id\": \"EXT_001\",\n \"game\": \"crash-classic\",\n \"scheduled_start\": \"2023-11-07T05:31:56Z\",\n \"entry_fee\": 10.5,\n \"max_players\": 50,\n \"min_players\": 5,\n \"config\": {\n \"tournament_type\": \"points_based\"\n }\n}"
response = http.request(request)
puts response.read_body{
"tournament_id": "<string>",
"status": "<string>",
"estimated_prize_pool": 123,
"tournament": {
"tournamentId": "12345",
"name": "Daily Championship",
"gameSlug": "crash-classic",
"scheduledStart": "2023-11-07T05:31:56Z",
"actualStartTime": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"maxPlayers": 100,
"currentPlayers": 87,
"entryFee": 10,
"currency": "USD",
"prizePool": {
"totalAmount": 870,
"currency": "USD",
"guaranteedPrize": 500,
"distribution": {}
},
"gameConfig": {},
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Casino Integration - Tournaments
Create tournament
Create a new tournament
POST
/
api
/
tournaments
Create tournament
curl --request POST \
--url https://ts.playservices.tech/api/api/tournaments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test Tournament",
"external_id": "EXT_001",
"game": "crash-classic",
"scheduled_start": "2023-11-07T05:31:56Z",
"entry_fee": 10.5,
"max_players": 50,
"min_players": 5,
"config": {
"tournament_type": "points_based"
}
}
'import requests
url = "https://ts.playservices.tech/api/api/tournaments"
payload = {
"name": "Test Tournament",
"external_id": "EXT_001",
"game": "crash-classic",
"scheduled_start": "2023-11-07T05:31:56Z",
"entry_fee": 10.5,
"max_players": 50,
"min_players": 5,
"config": { "tournament_type": "points_based" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Test Tournament',
external_id: 'EXT_001',
game: 'crash-classic',
scheduled_start: '2023-11-07T05:31:56Z',
entry_fee: 10.5,
max_players: 50,
min_players: 5,
config: {tournament_type: 'points_based'}
})
};
fetch('https://ts.playservices.tech/api/api/tournaments', 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://ts.playservices.tech/api/api/tournaments",
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' => 'Test Tournament',
'external_id' => 'EXT_001',
'game' => 'crash-classic',
'scheduled_start' => '2023-11-07T05:31:56Z',
'entry_fee' => 10.5,
'max_players' => 50,
'min_players' => 5,
'config' => [
'tournament_type' => 'points_based'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://ts.playservices.tech/api/api/tournaments"
payload := strings.NewReader("{\n \"name\": \"Test Tournament\",\n \"external_id\": \"EXT_001\",\n \"game\": \"crash-classic\",\n \"scheduled_start\": \"2023-11-07T05:31:56Z\",\n \"entry_fee\": 10.5,\n \"max_players\": 50,\n \"min_players\": 5,\n \"config\": {\n \"tournament_type\": \"points_based\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://ts.playservices.tech/api/api/tournaments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Test Tournament\",\n \"external_id\": \"EXT_001\",\n \"game\": \"crash-classic\",\n \"scheduled_start\": \"2023-11-07T05:31:56Z\",\n \"entry_fee\": 10.5,\n \"max_players\": 50,\n \"min_players\": 5,\n \"config\": {\n \"tournament_type\": \"points_based\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ts.playservices.tech/api/api/tournaments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Test Tournament\",\n \"external_id\": \"EXT_001\",\n \"game\": \"crash-classic\",\n \"scheduled_start\": \"2023-11-07T05:31:56Z\",\n \"entry_fee\": 10.5,\n \"max_players\": 50,\n \"min_players\": 5,\n \"config\": {\n \"tournament_type\": \"points_based\"\n }\n}"
response = http.request(request)
puts response.read_body{
"tournament_id": "<string>",
"status": "<string>",
"estimated_prize_pool": 123,
"tournament": {
"tournamentId": "12345",
"name": "Daily Championship",
"gameSlug": "crash-classic",
"scheduledStart": "2023-11-07T05:31:56Z",
"actualStartTime": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"maxPlayers": 100,
"currentPlayers": 87,
"entryFee": 10,
"currency": "USD",
"prizePool": {
"totalAmount": 870,
"currency": "USD",
"guaranteedPrize": 500,
"distribution": {}
},
"gameConfig": {},
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
Operator API key with role-based permissions (tournaments.read, players.write, etc.)
Body
application/json
Example:
"Test Tournament"
Example:
"EXT_001"
Example:
"crash-classic"
Required range:
x >= 0Example:
10.5
Maximum players (null for unlimited capacity)
Required range:
x >= 1Example:
50
Required range:
x >= 1Example:
5
Show child attributes
Show child attributes
Example:
{ "tournament_type": "points_based" }
⌘I

