Skip to content

Rename your team

POST
/api/teams/rename
curl --request POST \
--url https://foxleague.ai/api/teams/rename \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "wallet_address": "example" }'

Renames your team and answers it. Team names are unique, ignoring case, spaces and hyphens; changing the case or spacing of your own name is allowed. The name is locked during your tournament matches: from each match’s strategy lock until it ends.

Who: a signed-in player with a team.

Refusals:

  • Team name must be 3-15 characters: the trimmed name is too short or too long.
  • Only letters, numbers, spaces and hyphens allowed: the name holds another character.
  • User not found: the wallet has no account.
  • Your team name is locked during your tournament matches: from <n> minutes before kickoff until the match ends.: one of your tournament matches is between its strategy lock and the end of its broadcast. <n> is the strategy lock lead, 30 by default.
  • Your team name is locked until the group stage of '<title>' is finished.: from the strategy lock of the stage’s last group match the name of every team of that tournament stays locked until every group match has ended.
  • Your team name is locked until round <n> of '<title>' is finished.: in a Swiss tournament the name stays locked until every match of your round has ended.
  • That team name is already taken: another team has this name.

A wallet without a team gets HTTP 404 with an empty body. If the name cannot be saved on our side, the answer is HTTP 500 with an empty body.

Media type application/json

Your team’s new name.

object
name
required

The new name: 3 to 15 characters among letters, numbers, spaces and hyphens.

string
wallet_address
required

Your wallet address. The body needs it, but the session decides which team changes.

string
Example generated
{
"name": "example",
"wallet_address": "example"
}

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
badge

The team badge, usually an ipfs:// address (some older teams carry an inline image); null when none.

string | null
badge_ipfs_uri

The badge’s ipfs:// address; null when none.

string | null
coach_name

The coach name; null when not set.

string | null
created_at
required

When the team was created (RFC 3339).

string format: date-time
formation
required

The saved formation.

string
id
required

Team id.

integer format: int32
lineup
required

NFT nonces of the 11 starters, as an array. Empty until a lineup is saved.

name
required

Team name.

string
substitutes
required

NFT nonces of the bench, as an array.

team_overall

Average of the starters’ seven attributes; null until a lineup is saved.

number | null format: double
user_id
required

The owner’s user id.

integer format: int32
verified
required

true when the team carries the verified mark.

boolean
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": {
"badge": "ipfs://bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly",
"badge_ipfs_uri": "ipfs://bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly",
"coach_name": "Ada Moraru",
"created_at": "2026-09-16T08:02:44.517093Z",
"formation": "4-3-3",
"id": 398,
"lineup": [
1301,
1234,
1240,
1255,
1262,
1270,
1288,
1290,
1302,
1311,
1325
],
"name": "Fox Rovers",
"substitutes": [
1330,
1342,
1356,
1361,
1377,
1389,
1394
],
"team_overall": 47.25,
"user_id": 412,
"verified": false
},
"success": true
}

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

The wallet has no team yet. The body is empty.

The name could not be saved on our side. The body is empty.