Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{ "name": "Auth", "description": "Authentication and token exchange" },
{ "name": "Logout", "description": "Session logout" },
{ "name": "Mobile auth", "description": "OAuth flow for native apps" },
{ "name": "Teams", "description": "Teams list and follow/unfollow" },
{ "name": "Teams", "description": "Teams, leagues, and follow/unfollow" },
{ "name": "Leaderboard", "description": "Leaderboards, seasons, winners, stats" },
{ "name": "Locker room", "description": "Social feed posts, comments, reactions" },
{ "name": "Packs", "description": "Packs list, purchase, open" },
Expand All @@ -26,7 +26,7 @@
{ "name": "D-Sports Cash", "description": "D-Sports Cash balance" },
{ "name": "Dashboard", "description": "Dashboard stats and balance" },
{ "name": "Products", "description": "Products and packs catalog" },
{ "name": "Webhooks", "description": "RevenueCat webhook" },
{ "name": "Webhooks", "description": "RevenueCat and leagues-sync webhooks" },
{ "name": "Misc", "description": "Image proxy, crypto prices, upload, feedback" },
{ "name": "Auth and onboarding", "description": "Domain grouping for auth, profile, onboarding, and identity flows" },
{ "name": "Social and locker room", "description": "Domain grouping for social feed, follows, and community interactions" },
Expand Down Expand Up @@ -1071,6 +1071,71 @@
"security": [{ "bearerAuth": [] }],
"responses": { "200": { "description": "OK" } }
}
},
"/api/leagues": {
"get": {
"tags": ["Teams"],
"summary": "List leagues",
"description": "Returns all leagues with colors, metadata, and team counts. Optionally filter by country.",
"parameters": [
{ "name": "country", "in": "query", "description": "Filter leagues by country (case-insensitive).", "schema": { "type": "string" } }
],
"security": [],
"responses": { "200": { "description": "{ success, data: { leagues } }" } }
}
},
"/api/user/check-username": {
"get": {
"tags": ["User"],
"summary": "Check username availability",
"description": "Returns whether a given username (handle) is available.",
"parameters": [
{ "name": "username", "in": "query", "required": true, "schema": { "type": "string" }, "description": "The username to check." }
],
"security": [],
"responses": {
"200": { "description": "{ success, data: { available } }" },
"400": { "description": "Username is required" }
}
}
},
"/api/user/all": {
"get": {
"tags": ["User"],
"summary": "List all users",
"description": "Returns a paginated list of onboarded users with follower counts and leaderboard points. Rate-limited to 30 requests per minute.",
"parameters": [
{ "name": "limit", "in": "query", "description": "Maximum users to return (1–100, default 50).", "schema": { "type": "integer", "default": 50 } },
{ "name": "excludeFollowing", "in": "query", "description": "When 'true', excludes users the caller already follows.", "schema": { "type": "string", "enum": ["true", "false"] } }
],
"security": [{ "bearerAuth": [] }],
"responses": {
"200": { "description": "{ success, data: { users, total } }" },
"401": { "description": "Unauthorized" },
"429": { "description": "Rate limit exceeded" }
}
}
},
"/api/webhooks/leagues-sync": {
"post": {
"tags": ["Webhooks", "Platform and infrastructure"],
"summary": "Leagues sync webhook",
"description": "Triggered by CI on push to the leagues repo. Requires x-webhook-secret header matching LEAGUES_WEBHOOK_SECRET.",
"security": [],
"responses": {
"200": { "description": "{ success, data }" },
"401": { "description": "Invalid or missing webhook secret" }
}
}
},
"/api/v1/product_entitlement_mapping": {
"get": {
"tags": ["Commerce and purchases"],
"summary": "Product entitlement mapping",
"description": "Returns the mapping of RevenueCat product IDs to entitlements and D-Sports Cash amounts.",
"security": [],
"responses": { "200": { "description": "{ success, data: { mappings } }" } }
}
}
},
"components": {
Expand Down
Loading