The user profile API exposes two endpoints: one for the authenticated user’s own profile and one for any player’s public profile. The authenticated endpoint returns richer data such as email and a computed rank. The public endpoint returns data that is safe to display to other participants.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.
GET /api/profile
Retrieve the profile of the currently signed-in user. Requires an active session.This endpoint returns data specific to your account, including your email address. Do not expose the raw response publicly.
Response fields
Your display name.
Your email address.
URL to your avatar image. Falls back to the session image if the database value is absent or invalid. May be
null.Your cumulative score across all solved challenges.
Your current rank on the platform, calculated by sorting all users by
totalScore descending.Your computed level label based on
totalScore. See the level thresholds below.Total number of challenges you have solved.
Alias for
completedQuestions.Count of system achievement badges you have earned, based on milestone thresholds (1, 5, 10, 25, 50, and 100 solved challenges).
Simplified activity streak, capped at 30.
ISO 8601 timestamp when your account was created.
Array of custom badges assigned to you by an admin. Each badge object includes
name, description, icon, color, assignedAt, and assignedBy.Level thresholds
| Score range | Level |
|---|---|
| 0 – 199 | [0x1][Newbie] |
| 200 – 499 | [0x2][Scout] |
| 500 – 999 | [0x3][Codebreaker] |
| 1000 – 1499 | [0x4][Hacker] |
| 1500 – 1999 | [0x5][Cipher Hunter] |
| 2000 – 2999 | [0x6][Forger] |
| 3000+ | [0x7][Flag Conqueror] |
Example
Error responses
| Status | Condition |
|---|---|
401 Unauthorized | You are not signed in. |
404 Not Found | The signed-in user’s account was not found in the database. |
GET /api/user/[username]
Retrieve a player’s public profile by their display name. No authentication is required. The username in the URL can use either spaces or hyphens — both forms are matched case-insensitively.Path parameters
The player’s display name. Spaces may be replaced with hyphens (e.g.
bob-smith matches the user bob smith).Response fields
true on a successful lookup.The player’s public profile.
Example
Error responses
| Status | Condition |
|---|---|
404 Not Found | No user was found with the given username. |