Update Guild Tournament
Update a guild tournament. Requires the guilds.owner permission.
Endpoint
PATCH /api/v2/guild-tournaments/:id
Authentication
This endpoint requires:
- JWT Token: User authentication
- Permission:
guilds.ownerrole (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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Guild tournament ID |
Request Body
All fields are optional. Only include fields you want to update.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Tournament name (min 5 chars) |
color | string | No | Hex color (e.g. #FF5733) |
image | string | No | Tournament image URL |
projectsIds | string[] | No | Project IDs |
startDate | number | No | Start timestamp (Unix ms) |
endDate | number | No | End timestamp (Unix ms) |
airdropsIds | string[] | No | Airdrop IDs |
stakesIds | string[] | No | Stake IDs |
totalWinners | number | No | Number of winners |
totalPrize | number | No | Total prize amount |
prizeDistributionType | string | No | automatic or manual |
isPractice | boolean | No | Practice mode enabled |
slug | string | No | URL-friendly identifier |
gameId | string | No | Game ID |
rounds | object[] | No | Round 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);
}