Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/flagForgeCTF/flagForge/llms.txt

Use this file to discover all available pages before exploring further.

The leaderboard API returns the top 50 players ranked by their cumulative score. You can use this endpoint to build external scoreboards, integrate FlagForge standings into Discord bots, or display rankings in your own UI. No authentication is required.

GET /api/leaderboard

Return the top 50 players sorted by totalScore in descending order.
Scores update in real time as players submit correct flags. Each successful flag submission increments the solver’s totalScore immediately, so this endpoint always reflects the current live standings.

Response

The response is a JSON array of player objects. The array is ordered from highest to lowest score.
name
string
The player’s display name.
totalScore
number
The player’s cumulative score across all solved challenges.
image
string
URL to the player’s avatar image. May be null if the user has no avatar set.
roomsCompleted
number
Number of challenges the player has solved.
rank
number
The player’s current rank (1-indexed). Rank 1 is the highest-scoring player.
slug
string
URL-safe version of the player’s name (spaces replaced with hyphens). Use this to construct links to the player’s public profile at /user/[slug].

Example

curl "https://flagforgectf.com/api/leaderboard"
[
  {
    "name": "alice",
    "totalScore": 3750,
    "image": "https://lh3.googleusercontent.com/a/example",
    "roomsCompleted": 28,
    "rank": 1,
    "slug": "alice"
  },
  {
    "name": "bob smith",
    "totalScore": 2100,
    "image": null,
    "roomsCompleted": 15,
    "rank": 2,
    "slug": "bob-smith"
  },
  {
    "name": "charlie",
    "totalScore": 900,
    "image": "https://lh3.googleusercontent.com/a/another-example",
    "roomsCompleted": 9,
    "rank": 3,
    "slug": "charlie"
  }
]
To link directly to a player’s profile page from the leaderboard data, use the slug field: https://flagforgectf.com/user/{slug}. You can also embed a player’s score badge as an image using GET /api/badge/{username}/svg or GET /api/badge/{username}/png.

Build docs developers (and LLMs) love