Skip to main content

TEAMS_CREATED

Triggered when teams are finalized and the match is ready to begin.

Example Payload​

{
"action": "TEAMS_CREATED",
"queue": "valorant",
"channel": "1234567890123456789",
"guild": "9876543210987654321",
"match_number": 42,
"teams": [
[
{
"name": "Player1#1234",
"id": "111222333444555666",
"mmr": 1500,
"role": "Duelist",
"team_num": 0,
"top_role_index": 0,
"ign": "PlayerIGN1",
"timestamp": 1707523200.0,
"pulled_from": null
},
{
"name": "Player2#5678",
"id": "222333444555666777",
"mmr": 1450,
"role": "Controller",
"team_num": 0,
"top_role_index": 1,
"ign": "PlayerIGN2",
"timestamp": 1707523250.0,
"pulled_from": null
}
],
[
{
"name": "Player3#9012",
"id": "333444555666777888",
"mmr": 1480,
"role": "Sentinel",
"team_num": 1,
"top_role_index": 2,
"ign": "PlayerIGN3",
"timestamp": 1707523300.0,
"pulled_from": null
},
{
"name": "Player4#3456",
"id": "444555666777888999",
"mmr": 1470,
"role": "Initiator",
"team_num": 1,
"top_role_index": 3,
"ign": "PlayerIGN4",
"timestamp": 1707523350.0,
"pulled_from": null
}
]
],
"match_details": [
["Best of", 3],
["Maps", ["Ascent", "Bind", "Haven"], "https://example.com/maps/ascent.png"],
["Server", "US West"]
],
"lobby_details": "Join custom match with code: ABC123"
}

Payload Fields​

FieldTypeDescription
actionstringAlways "TEAMS_CREATED"
queuestringThe name/identifier of the queue
channelstringDiscord channel ID where the event occurred
guildstringDiscord guild (server) ID
match_numbernumberUnique match number/ID
teamsPlayer[][]2D array of teams, each containing Player objects
match_detailsarrayResults of the match setup steps (best-of, maps, banned heroes, custom votes) as [label, value] entries, described below
lobby_detailsstring|nullThe lobby details message sent to players, or null if no lobby details are set (/lobbydetails)

Teams Structure​

The teams field is a 2D array where:

  • Each element is an array representing a team
  • Team indices start at 0 (Team 0, Team 1, etc.)
  • Each player object has team_num set to their team index

When This Event Fires​

This webhook is sent when:

  • Teams have been balanced and finalized
  • Map/mode selection is complete
  • The match is ready for players to join
tip

This is the ideal time to send match details to external systems, as all match information is available.

Use Cases​

  • Display team compositions on dashboards
  • Send match details to game servers
  • Notify players of their team assignments
  • Record team compositions for analytics
  • Generate match preview images
  • Start match timers

Implementation Example​

def handle_teams_created(data):
match_id = data['match_number']
teams = data['teams']
match_details = data['match_details']

print(f"Match #{match_id} teams created")
details = {entry[0]: entry[1] for entry in match_details}
print(f"Maps: {details.get('Map') or details.get('Maps', 'N/A')}")

# Calculate team MMR averages
for i, team in enumerate(teams):
avg_mmr = sum(p['mmr'] for p in team) / len(team)
print(f"Team {i} avg MMR: {avg_mmr:.1f}")
print(f"Team {i} players: {[p['name'] for p in team]}")

# Example: Send to Discord webhook
send_match_notification(
match_id=match_id,
teams=teams,
details=match_details,
lobby=data['lobby_details']
)

Match Details Object​

match_details is an array with one entry per setup step that produced a result, in the order the steps ran. Each entry is an array whose first item is its label:

EntryShapeDescription
Best of["Best of", number]Number of games, when the queue's best-of is above 1
Map(s)["Map" or "Maps", string[], string|null]Chosen map names (with the game mode in parentheses if set), then the image URL of the first chosen map that has one, or null
Banned heroes["Banned Heroes", string[]]Heroes banned during setup
Custom votes[label, string]One entry per voting menu, labelled with the menu's key (plus the team name in parentheses when teams vote separately), and the chosen options joined with ,

The array is empty when the queue has none of these steps.

note

The exact structure of match_details depends on your queue configuration.

Match Flow​

  1. MATCH_STARTED - Match validation begins
  2. TEAMS_CREATED ← You are here
  3. MATCH_COMPLETED or MATCH_CANCELLED - Match ends