Skip to main content

Update Guild Tournament

Update a guild tournament. Requires the guilds.owner permission.

Endpoint​

PATCH /api/v2/guild-tournaments/:id

Authentication​

This endpoint requires:

  1. JWT Token: User authentication
  2. Permission: guilds.owner role (you must own the guild that owns this tournament)
Authorization: Bearer user-jwt-token-here

Description​

Updates an existing guild tournament. Only tournaments in pending status can be updated. Once accepted or launched, updates are not allowed.

Path Parameters​

ParameterTypeRequiredDescription
idstringYesGuild tournament ID

Request Body​

All fields are optional. Only include fields you want to update.

FieldTypeRequiredDescription
namestringNoTournament name (min 5 chars)
colorstringNoHex color (e.g. #FF5733)
imagestringNoTournament image URL
projectsIdsstring[]NoProject IDs
startDatenumberNoStart timestamp (Unix ms)
endDatenumberNoEnd timestamp (Unix ms)
airdropsIdsstring[]NoAirdrop IDs
stakesIdsstring[]NoStake IDs
totalWinnersnumberNoNumber of winners
totalPrizenumberNoTotal prize amount
prizeDistributionTypestringNoautomatic or manual
isPracticebooleanNoPractice mode enabled
slugstringNoURL-friendly identifier
gameIdstringNoGame ID
roundsobject[]NoRound configurations

Request Example​

{
"name": "My Guild Championship - Updated",
"startDate": 1704153600000,
"endDate": 1704240000000
}

Response​

Success Response (200)​

{
"message": "Guild tournament updated successfully"
}

Error Response (400)​

{
"message": "Cannot update guild tournament with status accepted",
"status": 400
}

Error Response (401)​

{
"message": "Unauthorized",
"status": 401
}

Error Response (403)​

{
"message": "Forbidden",
"status": 403
}

Usage Example​

const response = await fetch("https://api.intraverse.io/api/v2/guild-tournaments/gt-123", {
method: "PATCH",
headers: {
Authorization: `Bearer ${jwtToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My Guild Championship - Updated",
startDate: 1704153600000,
endDate: 1704240000000,
}),
});

if (response.ok) {
const result = await response.json();
console.log(result.message);
}

Next Steps​