Match-API: Match Configuration Options

Below you find a list of all accessible configuration options when starting a match (Best of 1) using our API. If you are looking for match series (Best of 2, 3 or 5) you should check out our match-series article here.

REST Method: POST
URL: https://dathost.net/api/0.1/match
Content-Type: application/json

Name Type Required Default Options
X-Fields string($mask) No
connect_time integer No 300
enable_knife_round boolean No false true
false
enable_pause boolean No false true
false
enable_playwin boolean No false true
false
enable_ready boolean No false true
false
enable_tech_pause boolean No false true
false
game_server_id string Yes
map string No
match_end_webhook_url string No
message_prefix string No Match BOT
playwin_result_webhook_url string No
ready_min_players integer No 1
round_end_webhook_url string No
spectator_steam_ids string No
team1_coach_steam_id string No
team1_flag string No
team1_name string No
team1_steam_ids string No
team2_coach_steam_id string No
team2_flag string No
team2_name string No
team2_steam_ids string No
wait_for_coaches boolean No true true
false
wait_for_spectators boolean No true true
false
warmup_time integer No 15
webhook_authorization_header string No

X-Fields

An optional fields mask.

connect_time

Time until match is cancelled if not everyone has joined. Also the same time the teams have to ready up if enable_ready is set to true.

enable_knife_round

Set to "true" to enable this knife round plugin: https://github.com/dathost/CSGO-Knife-Round

enable_pause

Set to true to enable the !pause in-game chat command. It uses the same configuration as Valves built-in feature, control it with the cvars mp_team_timeout_time and mp_team_timeout_max.

enable_playwin

Set to true to enable PlayWin cheat detection for this match. You need to contact us before so we can enable it for your account.

enable_ready

Set to true to enable the !ready in-game chat command.

enable_tech_pause

Set to true to enable the !tech in-game chat command. It will pause the match until one player of each team has written !unpause.

game_server_id

ID of the game server to run the match on. Must be a CS:GO server on the same account as the match.

map

Map to be played. Official maps and workshop maps accepted. If empty, it will use the map set in the server. Example: de_dust2 or workshop/125995702/aim_redline.

match_end_webhook_url

URL to send a webhook to when the match is done. It is sent as a HTTP POST with the same JSON format as the match GET endpoint. Below is an example of a webhook in a 2v2 match, sent when team 1 won the match with 16 - 10.

{
   "id":"yourmatchidhere",
   "game_server_id":"yourgameserveridhere",
   "map":"de_dust2",
   "connect_time":300,
   "warmup_time":15,
   "team1_start_ct":true,
   "team1_steam_ids":[
      "STEAM_1:1:101",
      "STEAM_1:1:102"
   ],
   "team1_coach_steam_id":null,
   "team1_name":"Team 1 Custom Name",
   "team1_flag":"SE",
   "team2_steam_ids":[
      "STEAM_1:1:201",
      "STEAM_1:1:202"
   ],
   "team2_coach_steam_id":null,
   "team2_name":"Team 2 Custom Name",
   "team2_flag":"FI",
   "spectator_steam_ids":[
      
   ],
   "wait_for_coaches":true,
   "wait_for_spectators":true,
   "round_end_webhook_url":"https://your-round-end-webhook.url",
   "match_end_webhook_url":"https://your-match-end-webhook.url",
   "started":true,
   "finished":true,
   "cancel_reason":null,
   "rounds_played":26,
   "team1_stats":{
      "score":16
   },
   "team2_stats":{
      "score":10
   },
   "player_stats":[
      {
         "steam_id":"STEAM_1:1:101",
         "kills":13,
         "deaths":12,
         "assists":1
      },
      {
         "steam_id":"STEAM_1:1:102",
         "kills":19,
         "deaths":16,
         "assists":0
      },
      {
         "steam_id":"STEAM_1:1:201",
         "kills":18,
         "deaths":22,
         "assists":2
      },
      {
         "steam_id":"STEAM_1:1:202",
         "kills":10,
         "deaths":20,
         "assists":4
      }
   ],
   "enable_knife_round":false,
   "enable_pause":false,
   "enable_playwin":false,
   "playwin_result_webhook_url":null,
   "playwin_result":{
      
   },
   "enable_ready":false,
   "ready_min_players":1,
   "enable_tech_pause":false,
   "message_prefix":"DatHost Match"
}

message_prefix

Prefix of in-game chat messages from the match bot. These are the messages that can be sent from the Match BOT depending on what is happening in-game. If you set the message_prefix to something else, it will be replaced in all messages.

  • [Match BOT] Waiting for all players to connect to the server.
  • [Match BOT] Type !ready to mark your team as ready.
  • [Match BOT] Your team is now marked as ready.
  • [Match BOT] Type !ready to mark yourself as ready.
  • [Match BOT] You are now marked as ready.
  • [Match BOT] LIVE LIVE LIVE
  • [Match BOT] Type !unpause when your team are ready to play again.
  • [Match BOT] Team1 won the match 1 - 0. GG WP!

playwin_result_webhook_url

URL to send a webhook to when the PlayWin match analysis is done. It is sent as a HTTP POST with the same JSON format as the match GET endpoint.

ready_min_players

If enable_ready is true, the game will wait until this number of players in each team have written !ready.

round_end_webhook_url

URL to send a webhook to after each round. It is sent as a HTTP POST with the same JSON format as the match GET endpoint. Below is an example of a webhook in a 2v2 match, sent after round 8 concluded, when team 1 was leading 5 - 3 on the first map in the match series.

{
   "id":"yourmatchidhere",
   "game_server_id":"yourgameserveridhere",
   "match_series_id":"yourmatchseriesidhere",
   "map":"de_dust2",
   "connect_time":300,
   "warmup_time":15,
   "team1_start_ct":true,
   "team1_steam_ids":[
      "STEAM_1:1:101",
      "STEAM_1:1:102"
   ],
   "team1_coach_steam_id":null,
   "team1_name":"Team 1 Custom Name",
   "team1_flag":"SE",
   "team2_steam_ids":[
      "STEAM_1:1:201",
      "STEAM_1:1:202"
   ],
   "team2_coach_steam_id":null,
   "team2_name":"Team 2 Custom Name",
   "team2_flag":"FI",
   "spectator_steam_ids":[

   ],
   "wait_for_coaches":true,
   "wait_for_spectators":true,
   "wait_for_gotv_before_nextmap":true,
   "round_end_webhook_url":"https://your-round-end-webhook.url",
   "match_end_webhook_url":"https://your-match-end-webhook.url",
   "started":true,
   "finished":false,
   "cancel_reason":null,
   "rounds_played":8,
   "team1_stats":{
      "score":5
   },
   "team2_stats":{
      "score":3
   },
   "player_stats":[
      {
         "steam_id":"STEAM_1:1:101",
         "kills":7,
         "deaths":4,
         "assists":1
      },
      {
         "steam_id":"STEAM_1:1:102",
         "kills":5,
         "deaths":3,
         "assists":0
      },
      {
         "steam_id":"STEAM_1:1:201",
         "kills":4,
         "deaths":6,
         "assists":0
      },
      {
         "steam_id":"STEAM_1:1:202",
         "kills":4,
         "deaths":7,
         "assists":0
      }
   ],
   "enable_knife_round":false,
   "enable_pause":false,
   "enable_playwin":false,
   "playwin_result_webhook_url":null,
   "playwin_result":{

   },
   "enable_ready":false,
   "ready_min_players":1,
   "enable_tech_pause":false,
   "message_prefix":"DatHost Match"
}

spectator_steam_ids

Comma separated list of Steam-IDs of spectators, if any. This parameter is only for spectators with the built-in spectator mode. If you want to utilize GOTV that will always be possible to join for anyone if you enable GOTV on the server. Example: STEAM_1:1:18592381,STEAM_1:1:23918572

Please note that Steam Ids in CS:GO starts with STEAM_1, if you have a Steam Id starting with STEAM_0 you should use the same id but change the beginning to STEAM_1. For more info read here.

team1_coach_steam_id

Steam-ID of an optional coach in team 1.

team1_flag

Flag of team 1 (ISO alpha-2: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Shown on the scoreboard, for GOTV viewers and in demo recordings.

team1_name

Name of team 1. Shown on the scoreboard, for GOTV viewers and in demo recordings.

team1_steam_ids

Comma separated list of Steam-IDs in team 1. Example: STEAM_1:1:18592381,STEAM_1:1:23918572

Please note that Steam Ids in CS:GO starts with STEAM_1, if you have a Steam Id starting with STEAM_0 you should use the same id but change the beginning to STEAM_1. For more info read here.

team2_coach_steam_id

Steam-ID of an optional coach in team 2.

team2_flag

Flag of team 2 (ISO alpha-2: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Shown on the scoreboard, for GOTV viewers and in demo recordings.

team2_name

Name of team 2. Shown on the scoreboard, for GOTV viewers and in demo recordings.

team2_steam_ids

Comma separated list of Steam-IDs in team 2. Example: STEAM_1:1:18592381,STEAM_1:1:23918572

Please note that Steam Ids in CS:GO starts with STEAM_1, if you have a Steam Id starting with STEAM_0 you should use the same id but change the beginning to STEAM_1. For more info read here.

wait_for_coaches

Set to false to start the game when all players has connected even if there are missing coaches.

wait_for_spectators

Set to false to start the game when all players has connected even if there are missing spectators. This won't include GOTV spectators.

warmup_time

Warmup time after everyone have joined. It will be shown as "Match restarting in X..." for players on the server.

webhook_authorization_header

If set, this value will be set as an Authorization HTTP header on all webhook requests.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us