List My Guild Tournaments
Retrieve a paginated list of tournaments for your guild. Requires the guilds.owner permission.
Endpoint
GET /api/v2/guild-tournaments/my
Authentication
This endpoint requires:
- JWT Token: User authentication
- Permission:
guilds.ownerrole (you must own a guild)
Authorization: Bearer user-jwt-token-here
Description
Returns a paginated list of guild tournaments for the guild you own. Automatically filters to your guild's tournaments only.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
size | number | Yes | Number of items per page (min: 1, max: 30) |
key | string | No | Cursor key for pagination |
direction | string | No | Cursor direction: forward or backward |
order | string | No | Sort order: asc or desc |
orderBy | string | No | Field to sort by |
status | string | No | Filter by status: pending, accepted, rejected |
Request Example
GET /api/v2/guild-tournaments/my?size=10
With status filter
GET /api/v2/guild-tournaments/my?size=10&status=accepted
Response
Success Response (200)
{
"current": {
"size": 10,
"key": null,
"direction": null,
"order": "asc",
"orderBy": null,
"query": null
},
"previous": null,
"next": null,
"data": [
{
"id": "gt-123",
"guildId": "guild-456",
"guildName": "Elite Gamers",
"name": "My Guild Championship",
"status": "accepted",
"requestedBy": "user-789",
"startDate": 1704067200000,
"endDate": 1704153600000,
"createdAt": 1704060000000,
"updatedAt": 1704060000000,
"tournamentId": "tournament-abc"
}
]
}
Error Response (401)
{
"message": "Unauthorized",
"status": 401
}
Error Response (403)
{
"message": "Forbidden",
"status": 403
}
Error Response (404)
{
"message": "You don't have a guild",
"status": 404
}
Tournament Statuses
| Status | Description |
|---|---|
pending | Awaiting review |
accepted | Approved; ready to launch |
rejected | Rejected by reviewer |
launched | Tournament launched |
Usage Example
const response = await fetch("https://api.intraverse.io/api/v2/guild-tournaments/my?size=10&status=accepted", {
headers: {
Authorization: `Bearer ${jwtToken}`,
},
});
const result = await response.json();
result.data.forEach((t) => {
console.log(`${t.name} - ${t.status}`);
});