API Reference

RESTful API with 100+ endpoints. All requests use JSON. Authentication via Bearer JWT token.

Base URL:/api/v1/api/v1

Authentication

5 endpoints
POST/api/v1/auth/registerCreate a new user account
POST/api/v1/auth/loginLogin and receive JWT tokens
POST/api/v1/auth/refreshRefresh access token
POST/api/v1/auth/logoutRevoke refresh token
GET/api/v1/auth/meGet current user profile

Authentication Example

curl -X POST /api/v1/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "your-password"}'

# Response:
{
  "success": true,
  "data": {
    "user": { "id": "...", "email": "...", "memberships": [...] },
    "tokens": {
      "accessToken": "eyJhbG...",   // Use in Authorization header
      "refreshToken": "eyJhbG..."
    }
  }
}

# Authenticated request:
curl /api/v1/api/v1/players?academyId=... \
  -H "Authorization: Bearer eyJhbG..."