Skip to main content
GET
/
users
/
{identifier}
/
stats
Get user aggregate stats
curl --request GET \
  --url https://teambattles.gg/api/v1/users/{identifier}/stats \
  --header 'Authorization: Bearer <token>'
{
  "stats": {
    "userId": "<string>",
    "matchesPlayed": 4503599627370495,
    "wins": 4503599627370495,
    "losses": 4503599627370495,
    "winRate": 0.5,
    "experience": 1,
    "draws": 4503599627370495,
    "currentStreak": 0,
    "bestStreak": 0
  },
  "timestamp": "<string>"
}

Authorizations

Authorization
string
header
required

Send your API key as: Authorization: Bearer tb_

Path Parameters

identifier
string
required

Username or Convex user ID.

Response

User stats.

Envelope containing stats plus a response timestamp.

stats
object
required

API-safe aggregate user stats.

timestamp
string
required

ISO 8601 timestamp.