Skip to main content

Get Guild Tournament

Retrieve details of a guild tournament. Requires the guilds.owner permission.

Endpoint

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

Authentication

This endpoint requires:

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

Description

Returns full details of a guild tournament by its ID. Use this to check tournament status, configuration, and whether it's ready to launch.

Path Parameters

ParameterTypeRequiredDescription
idstringYesGuild tournament ID

Request Example

GET /api/v2/guild-tournaments/gt-123

Response

Success Response (200)

{
"id": "gt-123",
"guildId": "guild-456",
"guildName": "Elite Gamers",
"name": "My Guild Championship",
"slug": "my-guild-championship",
"status": "accepted",
"requestedBy": "user-789",
"organizationId": "org-456",
"color": "#FF5733",
"image": "https://example.com/banner.png",
"projectsIds": ["project-1"],
"startDate": 1704067200000,
"endDate": 1704153600000,
"airdropsIds": [],
"stakesIds": [],
"gameId": "game-789",
"totalWinners": 10,
"totalPrize": 1000,
"prizeDistributionType": "automatic",
"isPractice": false,
"tournamentId": "tournament-abc",
"createdAt": 1704060000000,
"updatedAt": 1704060000000,
"rounds": []
}

Error Response (401)

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

Error Response (403)

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

Error Response (404)

{
"message": "Guild tournament not found",
"status": 404
}

Response Fields

FieldTypeDescription
idstringGuild tournament ID
guildIdstringGuild ID
guildNamestringGuild name
namestringTournament name
statusstringpending, accepted, rejected, launched
requestedBystringUser ID who requested
tournamentIdstringCreated tournament ID (after launch)
reviewedBystringReviewer user ID (if reviewed)
rejectionReasonstringReason if rejected

Usage Example

const response = await fetch("https://api.intraverse.io/api/v2/guild-tournaments/gt-123", {
headers: {
Authorization: `Bearer ${jwtToken}`,
},
});

const tournament = await response.json();

if (tournament.status === "accepted") {
console.log("Ready to launch!");
} else if (tournament.status === "rejected") {
console.log(`Rejected: ${tournament.rejectionReason}`);
}

Next Steps