Developer Documentation

CodeArena API

Integrate with our platform, build custom clients, or contribute to the ecosystem. Explore our REST endpoints and real-time WebSocket events.

REST API Reference

All HTTP endpoints operate over HTTPS and accept JSON payloads. Base URL: /api

Authentication
POST/auth/login
Authenticate a user and return a JWT cookie.
POST/auth/register
Create a new user account.
GET/auth/me
Retrieve the currently authenticated user's profile.
Battles & Matchmaking
POST/matchmaking/join
Join the global matchmaking queue.
POST/matchmaking/leave
Leave the matchmaking queue.
POST/battles/create
Create a custom battle room (invite only).
GET/battles/:id
Retrieve details of a specific battle.
POST/battles/:id/submit
Submit code for evaluation against the battle's test suite.
GET/battles/:id/replay
Fetch replay telemetry for a completed battle.
Social & Ranking
GET/users/:id
Fetch a public user profile.
GET/leaderboard
Retrieve the global Elo rankings.
Tournaments
POST/tournaments/create
Admin only: Create a new tournament bracket.
GET/tournaments/:id
Get tournament details and current standings.
AI Integrations
POST/ai/review
Get an AI code review for a specific battle submission.
POST/ai/interview
Start a mock technical interview session.
POST/ai/similar-problems
Generate variations of a specific problem.