REST API Reference
All HTTP endpoints operate over HTTPS and accept JSON payloads. Base URL: /api
Authentication
POST
/auth/loginAuthenticate a user and return a JWT cookie.
POST
/auth/registerCreate a new user account.
GET
/auth/meRetrieve the currently authenticated user's profile.
Battles & Matchmaking
POST
/matchmaking/joinJoin the global matchmaking queue.
POST
/matchmaking/leaveLeave the matchmaking queue.
POST
/battles/createCreate a custom battle room (invite only).
GET
/battles/:idRetrieve details of a specific battle.
POST
/battles/:id/submitSubmit code for evaluation against the battle's test suite.
GET
/battles/:id/replayFetch replay telemetry for a completed battle.
Social & Ranking
GET
/users/:idFetch a public user profile.
GET
/leaderboardRetrieve the global Elo rankings.
Tournaments
POST
/tournaments/createAdmin only: Create a new tournament bracket.
GET
/tournaments/:idGet tournament details and current standings.
AI Integrations
POST
/ai/reviewGet an AI code review for a specific battle submission.
POST
/ai/interviewStart a mock technical interview session.
POST
/ai/similar-problemsGenerate variations of a specific problem.