Skip to content

List tournaments and 1v1 challenges

GET
/api/tournaments
curl --request GET \
--url https://foxleague.ai/api/tournaments

Lists tournaments and 1v1 challenges: featured ones first, then by kickoff, newest first, unless sort or sections asks for another order. The answer is one page of up to 500 rows. Every filter and the order are applied before the page is cut, so a page of 20 rows is the first 20 of the filtered list. The X-Total-Count response header holds how many match the filters in all; ask for the next page with offset set to the number of rows already read until you hold that many. Use kind to list tournaments and challenges separately. Use completed_since to list only those that completed at or after an instant: a tournament completes after the broadcast of its last match has ended, at its completed_at. A 1v1 row carries the team names and badges of its creator and opponent; a completed 1v1 row carries its score once its match’s broadcast ends.

With sections, the X-Section-Counts response header holds how many rows of the filtered list each section has, in display order, for example open=3,active=1,completed=730. Every answer carries the header X-List-Contract: 2: a server without it ignored hide_cancelled, developer_mode, involving, wallet, search, sections and sort.

Who: anyone. With a session, the creator and the target of a targeted 1v1 challenge also read its target_user_id. The target reads targeted_to_you: true. involving answers for the player named by wallet, else for the signed-in player; with neither it answers no rows.

Refusals:

  • Invalid sort. Use one of: featured, newest, pool_desc, pool_asc: HTTP 400.
  • Invalid sections. Use one of: status, phase, featured: HTTP 400.
  • Invalid involving. Use one of: target, target_or_creator, participant_or_creator, mine: HTTP 400.
  • Invalid <parameter>: a NUL byte is not a character.: HTTP 400; <parameter> is the text parameter that held the byte.
status
string

Only tournaments with this status: open, pending_sc, active, completed or cancelled. Any other value is refused.

format
string

Only tournaments of this format: knockout, groups_knockout, round_robin, swiss or league_knockout.

tier
string

Only tournaments of this tier: bronze, silver or gold.

kind
string

standard lists tournaments of more than two teams; challenge lists 1v1 challenges. Without it both are listed together.

completed_since
string format: date-time

Only tournaments that completed at or after this instant, as RFC 3339 with Z or an offset (for example 2026-10-08T00:00:00Z). A tournament that was cancelled never completed. Any other value is refused with HTTP 400.

limit
integer format: int64

Rows per page, 1 to 500. Default 500.

offset
integer format: int64

Rows to skip. Default 0.

hide_cancelled
boolean

true leaves cancelled tournaments out.

developer_mode
boolean

true lists only developer tournaments; false lists only the others. Without it both are listed.

involving
string

Only rows a player is part of: the player named by wallet, else the signed-in one. target: 1v1 challenges addressed to them. target_or_creator: addressed to them or created by them. participant_or_creator: tournaments they play in or created. mine: created by them, joined by them or addressed to them (the 1v1 lobby’s own set). Without a wallet or a session no row matches.

wallet
string

The player involving is about, by wallet address. What is public about them answers to anyone: the tournaments they created or play in. Who a challenge is addressed to is not public: with wallet, target and the target half of target_or_creator answer only under that wallet’s own session; under another session or none they match nothing. An unknown wallet matches nothing.

sections
string

Lists the rows section after section and counts each section in X-Section-Counts. status: open, active, completed, cancelled, then every other status. phase: open (neither running nor completed), active (running), completed. featured: featured (whatever its status), open (open or being created), running, completed, other (cancelled). sort then orders the rows inside each section.

sort
string

The order of the rows. featured (the default): featured first, then latest kickoff first. newest: newest created first. pool_desc: largest prize pool (entry fee times seats) first. pool_asc: smallest prize pool first.

search
string

Only tournaments whose title contains this text (upper and lower case are the same) or the one whose id is this number, written with or without a leading hash sign.

Success or a refusal: read success (the refusals are in the description).

Media type application/json
object
code

A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.

string | null
data

The answer. Present when success is true.

Array<object>

A tournament or 1v1 challenge.

object
away_penalty

Completed 1v1 challenge rows decided on penalties: shootout goals of the away side. Absent otherwise.

integer | null format: int32
away_score

Completed 1v1 challenge rows of the tournament lists: goals of the away side. Absent otherwise.

integer | null format: int32
blocking_window_end

End of that reserved window (RFC 3339): one hour after the tournament’s booked play time, about 3 minutes per match without the time between games; null when there is none. This is not when the tournament ends: it can keep playing after its window for hours or days.

string | null format: date-time
blocking_window_start

Start of the time window a standard tournament reserves on the schedule, one hour before kickoff (RFC 3339). No other tournament may reserve an overlapping window. null for 1v1 challenges and developer tournaments.

string | null format: date-time
cancelled_at

When the tournament was cancelled (RFC 3339); null when it was not.

string | null format: date-time
challenge_deadline_minutes

1v1 challenge: the minutes it was opened for. null for a standard tournament.

integer | null format: int32
completed_at

When the tournament completed (RFC 3339); null before.

string | null format: date-time
created_at
required

When the tournament was created (RFC 3339).

string format: date-time
creator_badge

1v1 challenge rows of the tournament lists: the creator’s team badge. Absent otherwise.

string | null
creator_team_name

1v1 challenge rows of the tournament lists: the creator’s team name. Absent otherwise.

string | null
creator_user_id
required

User id of the creator (the organizer).

integer format: int32
deadline
required

Registration closes at this time (RFC 3339).

string format: date-time
decided_by

Completed 1v1 challenge rows of the tournament lists: regular, extra_time or penalties. Absent otherwise.

string | null
description

Text written by the creator; null when none.

string | null
developer_mode

true when only teams with a verified developer binary may join.

boolean | null
distribute_tx_hash

Completed 1v1 challenge rows of the tournament lists: hash of the prize payout transaction. Absent otherwise.

string | null
entry_fee_foxsy
required

Entry fee in whole FOXSY; 0 for Bronze.

integer format: int64
featured
required

true for a tournament the game features: it is listed first and enters the hall of fame when it completes.

boolean
format
required

knockout, groups_knockout, round_robin, swiss or league_knockout (League + Knockout: 36 teams in one league table drawn from four pots).

string
has_third_place_match
required

true when a match for third place is played.

boolean
home_and_away

true for a round robin where every pair of teams meets twice.

boolean | null
home_penalty

Completed 1v1 challenge rows decided on penalties: shootout goals of the home side. Absent otherwise.

integer | null format: int32
home_score

Completed 1v1 challenge rows of the tournament lists: goals of the home side. Absent otherwise.

integer | null format: int32
home_user_id

Completed 1v1 challenge rows of GET /api/tournaments: user id of the home side, to match the score to the teams (the creator is not always at home). Absent otherwise.

integer | null format: int32
id
required

The tournament id.

integer format: int64
is_private

true when only invited teams may join.

boolean
max_teams
required

Seats. 2 for a 1v1 challenge.

integer format: int32
min_teams
required

Teams needed to start; with fewer at the deadline the tournament is cancelled.

integer format: int32
opponent_badge

1v1 challenge rows of the tournament lists: the opponent’s team badge once an opponent holds the second seat. Absent otherwise.

string | null
opponent_team_name

1v1 challenge rows of the tournament lists: the opponent’s team name once an opponent holds the second seat. Absent otherwise.

string | null
organizer_only

Tournament detail only: true when the creator runs the tournament without a seat. Absent elsewhere.

boolean | null
participant_count

Seats taken. Filled by GET /api/tournaments; null in other answers.

integer | null format: int64
round_interval_minutes
required

Minutes between one match’s kickoff and the next.

integer format: int32
runner_up_user_id

User id of the runner-up, set when the tournament completes; null before.

integer | null format: int32
sc_tournament_id

Id of the tournament on chain (equal to id) for a paid tournament once it is created there; null for a free tournament.

integer | null format: int64
started_at

When registration closed and the draw was made (RFC 3339); null before.

string | null format: date-time
starts_at
required

Kickoff of the first match (RFC 3339).

string format: date-time
status
required

open: registration is open. pending_sc: a paid tournament is being created on chain and cannot be joined yet. active: registration closed and the tournament is under way. completed: finished, podium set. cancelled: too few teams at the deadline or cancelled by its creator.

string
target_user_id

Targeted 1v1 challenge: user id of the only opponent who may accept. Given to the creator and the target only; null for everyone else and for any other tournament.

integer | null format: int32
targeted

true for a 1v1 challenge locked to one opponent. Absent otherwise.

boolean
targeted_to_you

true when you are the opponent a targeted 1v1 challenge is locked to. Absent otherwise.

boolean
third_place_user_id

User id of the third-placed team, set when the tournament completes; null before and when no third place is decided.

integer | null format: int32
tier
required

bronze (free), silver or gold (paid in FOXSY).

string
title
required

Name of the tournament.

string
winner_user_id

User id of the winner, set when the tournament completes; null before.

integer | null format: int32
error

Why the request was refused, in plain words. Present when success is false.

string | null
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
Example
{
"data": [
{
"blocking_window_end": "2026-10-02T19:24:00Z",
"blocking_window_start": "2026-10-02T17:00:00Z",
"cancelled_at": null,
"challenge_deadline_minutes": null,
"completed_at": null,
"created_at": "2026-09-30T09:12:44Z",
"creator_user_id": 57,
"deadline": "2026-10-02T17:00:00Z",
"description": "Eight teams, straight knockout.",
"developer_mode": false,
"entry_fee_foxsy": 1000,
"featured": false,
"format": "knockout",
"has_third_place_match": true,
"home_and_away": false,
"id": 412,
"is_private": false,
"max_teams": 8,
"min_teams": 8,
"participant_count": 3,
"round_interval_minutes": 30,
"runner_up_user_id": null,
"sc_tournament_id": 412,
"started_at": null,
"starts_at": "2026-10-02T18:00:00Z",
"status": "open",
"target_user_id": null,
"third_place_user_id": null,
"tier": "silver",
"title": "Friday Night Cup",
"winner_user_id": null
},
{
"blocking_window_end": null,
"blocking_window_start": null,
"cancelled_at": null,
"challenge_deadline_minutes": 60,
"completed_at": null,
"created_at": "2026-10-01T10:40:00Z",
"creator_badge": "ipfs://bafkrei7qa5efe6qeqpno57ye6scmejvqtia6d7rgn7ss555hmtf",
"creator_team_name": "Copper Valley",
"creator_user_id": 88,
"deadline": "2026-10-01T11:40:00Z",
"description": null,
"developer_mode": false,
"entry_fee_foxsy": 5000,
"featured": false,
"format": "knockout",
"has_third_place_match": false,
"home_and_away": false,
"id": 415,
"is_private": false,
"max_teams": 2,
"min_teams": 2,
"participant_count": 1,
"round_interval_minutes": 30,
"runner_up_user_id": null,
"sc_tournament_id": 415,
"started_at": null,
"starts_at": "2026-10-01T11:45:00Z",
"status": "open",
"target_user_id": null,
"targeted": true,
"third_place_user_id": null,
"tier": "gold",
"title": "Come and get it",
"winner_user_id": null
}
],
"success": true
}

A sort, sections or involving outside its values and a NUL byte in a text parameter answer a JSON body with success: false and the reason in error. A completed_since that is not an RFC 3339 instant, a hide_cancelled or developer_mode that is not a boolean and a limit or offset that is not a number answer plain text.

No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.

Media type text/plain
string
Example
Session expired or invalid