Skip to content

Your invite link for friends

GET
/api/referral/invites
curl --request GET \
--url https://foxleague.ai/api/referral/invites \
--header 'Authorization: Bearer <token>'

Answers the state of the programme, your team’s one invite link (link_code) and its places (places_taken of places_total). While the programme is on, the places are made the first time you ask, up to invites_per_team, one code each (invites). Share link_code: the first friends who complete the paid registration with it take your places, one each, in the order they pay. Any code of your team works the same way. While the programme is off no code is made and the ones you hold cannot be used.

Who: a signed-in player with a team.

Refusals: none.

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
enabled
required

true while the programme takes invitations. Off by default.

boolean
invites
required

Your team’s places, one code each, oldest first. Every code works the same way: it takes a free place of your team. Share link_code only.

Array<object>

One of your invitations.

object
code
required

The code to share with one friend.

string
state
required

free (waiting for a friend), used (a friend’s paid team took it) or inactive (not used, but your team already spent as many invitations as a team gets: it cannot be used).

string
used_at

When it was used (RFC 3339, UTC). null while it is not used.

string | null
used_by_team

The team that used it. null while it is not used.

string | null
invites_per_team
required

How many invitations a team gets.

integer format: int64
link_code

Your team’s one invite link code (its first code, it never changes): the first places_total friends who complete the paid registration with it take your places. null while you have no code yet.

string | null
paused
required

true while invitations are paused because too few starter cards are free. A paused code cannot be used yet.

boolean
places_taken
required

How many places are taken: friends whose paid registration took one.

integer format: int64
places_total
required

How many places your team has (invites_per_team now).

integer format: int64
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
{
"success": true,
"data": {
"enabled": true,
"paused": false,
"invites_per_team": 5,
"invites": [
{
"code": "K7QMX2PA4BND",
"state": "used",
"used_by_team": "Steaua Nordului",
"used_at": "2026-11-14T09:12:00Z"
},
{
"code": "B3ZTR7WCQ6LM",
"state": "free",
"used_by_team": null,
"used_at": null
}
],
"link_code": "K7QMX2PA4BND",
"places_total": 5,
"places_taken": 1
}
}

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

A database read or write failed. The body is empty.