Matches & leaderboards

Hosting a match spins up a customs session pre-seeded with every active team's players; results are scored automatically and surface on the live leaderboard.

All paths are relative to https://api.zyron.pro/api/v1/guilds/:guildId/sessions/:tournamentId. Matches build on the customs machinery — dispatch, in-game key delivery, and retries all work the same way.

List matches

GET/guilds/:guildId/sessions/:tournamentId/matches

Returns the tournament's matches with their number, status, and underlying customs sessionId.

Host a match

POST/guilds/:guildId/sessions/:tournamentId/matches

Creates the next match: a seeded customs session containing every active team's players. Returns 201 Created.

FieldTypeDescription
hostDiscordIdrequiredstringThe Discord member hosting the match. They are DM'd the session details as host.
curl -X POST https://api.zyron.pro/api/v1/guilds/123456789012345678/sessions/t_7d31e0aa9c/matches \
  -H "Authorization: Bearer zyr_your_guild_key" \
  -H "Content-Type: application/json" \
  -d '{ "hostDiscordId": "222222222222222222" }'
json
{
  "session": {
    "sessionId": "cs_4be09d17aa",
    "title": "Sunday Cup #12 — Match 3",
    "gameMode": "Battle Royale",
    "status": "open",
    "tournamentId": "t_7d31e0aa9c",
    "matchNumber": 3,
    "players": [ /* every active team's players, pre-seeded */ ]
  },
  "key": "cup12-m3-9174",
  "skippedUnverified": ["999999999999999999"]
}

Key returned once; unverified players skipped

Dispatch the seeded session via the customs POST .../dispatch endpoint when the lobby should receive the key. When results come in, the match.results.posted webhook fires with per-player placements, elims, and points.

Leaderboard

GET/guilds/:guildId/sessions/:tournamentId/leaderboard

Returns the tournament summary, current standings, the match list, and a live block indicating whether a match is in progress. Poll this to render your own overlay or site — or subscribe to match.results.posted to update only when scores change.

json
{
  "tournament": {
    "tournamentId": "t_7d31e0aa9c",
    "name": "Sunday Cup #12",
    "lobbyNumber": 12
  },
  "standings": [
    {
      "rank": 1,
      "teamId": "tm_51fe09c2",
      "name": "Alpha Wolves",
      "points": 87,
      "wins": 1,
      "avgPlacement": 3.2,
      "elims": 24
    }
  ],
  "matches": [
    {
      "matchNumber": 1,
      "status": "scored",
      "playedAt": "2026-07-19T18:15:00.000Z"
    }
  ],
  "live": {
    "inProgress": true,
    "matchNumber": 3
  }
}

Errors

404 not_found for an unknown tournament; 409 conflict when a match is already live or the tournament is cancelled; 400 invalid_request for a missing hostDiscordId. See Errors.