Skip to content

Free starts for a new tournament

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

The calendar of Create Tournament: the other tournaments’ booked windows, the starts where a new tournament with these settings fits, whether from itself fits and the next free start. It follows the rule POST /api/tournaments/create applies to a start.

A standard tournament books from one hour before its start to one hour after its booked play time, about 3 minutes per match without the time between games. The booking covers the start, not the whole run: a tournament can keep playing after its booking for hours or days, alongside other tournaments, so its later matches do not block a start. If a team of a match is busy in another tournament at that time, the scheduler moves the match later. A start is free when it is more than one hour from now, no more than 90 days from now and its booking overlaps no other tournament’s. A 1v1 challenge (teams 2) and a developer tournament book nothing.

Who: anyone. The answer is the same for every caller.

Refusals:

  • Unknown tournament format.: format is not knockout, groups_knockout, round_robin, swiss or league_knockout.
  • This format is not offered for that number of teams.: teams is not an allowed size of format.
format
string

The format of the tournament being created: knockout (the default), groups_knockout, round_robin, swiss or league_knockout.

teams
integer format: int32

Its number of teams, an allowed size of format. Default 8.

home_and_away
boolean

true when a round robin plays home and away, which lengthens its booking. Default false.

developer_mode
boolean

true for a developer tournament, which books nothing. Default false.

from
string format: date-time

The first instant asked about (RFC 3339). Default now. The answered range starts between now and 90 days from now; from_refusal, conflict and next_free judge from as asked.

days
integer format: int64

How many days the answer covers from from: 1 to 14. Default 7.

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.

object
busy
required

The other tournaments’ bookings that overlap the answered range, earliest first.

Array<object>

Another tournament’s booked window.

object
end
required

Where its booking ends (RFC 3339): one hour after its booked play time, about 3 minutes per match without the time between games. This is not when the tournament ends: a tournament can keep playing after its booking for hours or days, alongside other tournaments.

string format: date-time
start
required

Where its booking starts (RFC 3339): one hour before the tournament starts.

string format: date-time
title
required

The tournament’s title.

string
tournament_id
required

The tournament’s id.

integer format: int64
conflict
One of:

Another tournament’s booked window.

object
end
required

Where its booking ends (RFC 3339): one hour after its booked play time, about 3 minutes per match without the time between games. This is not when the tournament ends: a tournament can keep playing after its booking for hours or days, alongside other tournaments.

string format: date-time
start
required

Where its booking starts (RFC 3339): one hour before the tournament starts.

string format: date-time
title
required

The tournament’s title.

string
tournament_id
required

The tournament’s id.

integer format: int64
free
required

The runs of starts in the answered range where this tournament fits, earliest first.

Array<object>

A run of free starts: every start from first to last is free.

object
first
required

The first free start of the run (RFC 3339).

string format: date-time
last
required

The last free start of the run (RFC 3339).

string format: date-time
from
required

The first instant answered (RFC 3339): the requested from, kept between now and 90 days from now.

string format: date-time
from_refusal
One of:

Why a start is not free: too_soon (one hour from now or sooner), taken (its booking overlaps another tournament’s) or too_far (more than 90 days from now).

string
Allowed values: too_soon taken too_far
next_free

The first free start at or after the requested from (RFC 3339): that start when it is free, else the first free quarter hour; null when there is none.

string | null format: date-time
to
required

The last instant answered (RFC 3339): from plus days.

string format: date-time
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": {
"busy": [
{
"end": "2026-10-03T23:30:00Z",
"start": "2026-10-03T17:00:00Z",
"title": "Champions League 2026",
"tournament_id": 83
}
],
"conflict": null,
"free": [
{
"first": "2026-10-02T11:15:00Z",
"last": "2026-10-03T12:00:00Z"
},
{
"first": "2026-10-04T00:30:00Z",
"last": "2026-10-09T10:00:00Z"
}
],
"from": "2026-10-02T10:00:00Z",
"from_refusal": "too_soon",
"next_free": "2026-10-02T11:15:00Z",
"to": "2026-10-09T10:00:00Z"
},
"success": true
}