Skip to main content

Tournaments API

Below, you'll find all endpoints needed to fetch all available data about tournaments in a guild.

info

For these endpoints, there is an exception from our API Rules:

You MAY store leaderboard data permanently in your systems as that would be required to build power rankings or similar things, and share it with users of your systems. All other rules remain unchanged.

warning

Note that these endpoints require a separate Authorization scope, so you might have to re-authorize existing guilds.

GET
Get list of tournaments
https://yunite.xyz/api/v3/guild/{guildId}/tournaments
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
GET
Get single tournament
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
GET
Get leaderboard of tournament
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/leaderboard
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
GET
Get list of matches in tournament
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/matches
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
GET
Get leaderboard of single match
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/matches/{sessionId}
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
sessionIdstringThe ID of the match you want to access
GET
Get all teams
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/teams
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
POST
Add or update team
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/teams
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
Request Body
{
    "type": "object",
    "properties": {
        "id": {
            "type": "UUIDv4",
            "value": "ID of the team if you want to edit an existing team; omit or 'null' if you want to create a new team",
            "optional": true
        },
        "players": {
            "type": "array",
            "itemSchema": {
                "type": "object",
                "properties": {
                    "discordId": {
                        "type": "string",
                        "value": "discord ID of the player (at least one of discordId and epicId required; will be overridden if epicId present)",
                        "optional": true
                    },
                    "epicId": {
                        "type": "string",
                        "value": "epic ID of the player (at least one of discordId and epicId required)",
                        "optional": true
                    }
                }
            },
            "optional": true
        },
        "disqualified": {
            "type": "boolean",
            "value": "wether or not the team has been disqualified; if you want to disqualify a team, change this field (and leave the players array as 'null'); will be ignored on team creation",
            "optional": true
        }
    }
}
POST
Add or update teams in bulk
https://yunite.xyz/api/v3/guild/{guildId}/tournaments/{tournamentId}/teams/bulk
Path Parameters
NameValue typeDescription
guildIdGuild ID SnowflakeThe ID of the guild you want to access
tournamentIdUUIDv4The ID of the tournament you want to access
Request Body
{
    "type": "array",
    "itemSchema": {
        "type": "object",
        "properties": {
            "id": {
                "type": "UUIDv4",
                "value": "ID of the team if you want to edit an existing team; omit or 'null' if you want to create a new team",
                "optional": true
            },
            "players": {
                "type": "array",
                "itemSchema": {
                    "type": "object",
                    "properties": {
                        "discordId": {
                            "type": "string",
                            "value": "discord ID of the player (at least one of discordId and epicId required; will be overridden if epicId present)",
                            "optional": true
                        },
                        "epicId": {
                            "type": "string",
                            "value": "epic ID of the player (at least one of discordId and epicId required)",
                            "optional": true
                        }
                    }
                },
                "optional": true
            },
            "disqualified": {
                "type": "boolean",
                "value": "wether or not the team has been disqualified; if you want to disqualify a team, change this field (and leave the players array as 'null'); will be ignored on team creation",
                "optional": true
            }
        }
    }
}
POST
Send tournament embed
https://yunite.xyz/api/v3/guild/{serverID}/tournaments/{tournamentId}/sendEmbedPath Parameters
NameValue typeDescription
serverIDGuild ID SnowflakeThe ID of the guild
tournamentIdTournament IDThe ID of the tournament
Request Body
{
    "type": "object",
    "properties": {
        "channel": {
            "type": "string",
            "value": "target text channel ID"
        }
    }
}