Skip to Content

Games

Games represent scheduled matchups with scores and sport-specific stats. The Staty API supports 6 sport types, each with a distinct schema.

Endpoint: /api/v1/games Required scope: read:games (read) / admin (write)

Get teams and rosters in one request by populating both at the same time: ?include=homeTeam.players,awayTeam.players,organization,league. See Query Parameter: ?include= for the full grammar.

Endpoints

MethodPathAuthDescription
GET/api/v1/games?division=:idRecommendedList games for a division
GET/api/v1/games/:idRecommendedGet a single game
GET/api/v1/games?division=:id&include=homeTeam.players,awayTeam.playersRecommendedGames with team rosters
POST/api/v1/gamesRequiredCreate a game
PUT/api/v1/games/:idRequiredUpdate game scores or details

Allowed ?include= roots: homeTeam, awayTeam, organization, league, division.

Filtering & pagination on GET /api/v1/games: ?division=, ?league=, and ?organization= filter the list; results are newest-first. ?limit= defaults to 500 (max 1000) and ?page= (1-based) pages through larger sets. Always scope by one of the filters rather than paging the whole collection.

Common Fields (All Sports)

FieldTypeDefaultDescription
_idObjectId—Unique identifier
datedatenowGame date
timestring—Game time string
durationnumber60Duration in minutes
isByeboolean—Whether this is a bye game
organizationstring—Owning organization ID
leaguestring—Parent league ID
divisionstring—Parent division ID
locationstring—Location text
locationModelObjectId—Venue (ref: Location)
gameLabelstring—Custom label (e.g. “Game 1”, “Semifinal A”)
playoffRoundstring—quarterfinal, consolation_semifinal, semifinal, championship, third_place, fifth_place, seventh_place, consolation
isCancelledbooleanfalseWhether game is cancelled
isHiddenbooleanfalseWhether game is hidden from public views
globalDatestring—Timezone-agnostic date string
timeSlotObjectId—Scheduled time slot (ref: TimeSlot)
createddate—Creation timestamp
updateddate—Last update timestamp

Basketball (shared team-game schema)

sport: "basketball". This schema also backs volleyball and soccer games.

FieldTypeDescription
homeTeamObjectIdHome team (ref: DivisionTeam)
awayTeamObjectIdAway team (ref: DivisionTeam)
homeTeamPlaceholderstringPlaceholder name (e.g. “Winner Game 3”)
awayTeamPlaceholderstringPlaceholder name
homeScorenumberHome team score. For volleyball this stores sets won
awayScorenumberAway team score. For volleyball this stores sets won
setScoresarrayVolleyball only: per-set points, [{ "home": 25, "away": 20 }, ...] (up to 5 sets). When present, homeScore/awayScore are derived as sets won

Baseball

sport: "baseball"

FieldTypeDescription
homeTeamObjectIdHome team (ref: DivisionTeam)
awayTeamObjectIdAway team (ref: DivisionTeam)
homeScorenumberHome team score
awayScorenumberAway team score

Judo

sport: "judo"

FieldTypeDescription
winnerObjectIdWinning competitor (ref: Player)
genderstringmale or female. Default: "male"
roundstringMatch round

Golf

sport: "golf"

FieldTypeDescription
formatstringstroke, match, or stableford. Default: "stroke"

Racket (Tennis, Badminton, etc.)

sport: "racket"

FieldTypeDescription
formatstringbest-of-1, best-of-3, best-of-5. Default: "best-of-3"

Track & Field

sport: "track"

FieldTypeDescription
eventNamestringEvent name (e.g. “100m Sprint”, “Long Jump”)
resultTypestringtime, distance, or points
genderstringmale, female, or mixed. Default: "mixed"
isRelaybooleanWhether this is a relay event. Default: false
participantsstring[]Participant player IDs

Example: List Games with Players

curl "https://api.staty.io/api/v1/games?division=div_def456&include=homeTeam.players,awayTeam.players" \ -H "Authorization: Bearer sk_live_..."

Response:

{ "success": true, "data": [ { "_id": "game_abc", "sport": "basketball", "date": "2026-04-10T19:00:00.000Z", "duration": 60, "homeTeam": { "_id": "divteam_1", "name": "Thunder", "players": [ { "_id": "player_1", "name": "Alex Johnson", "number": "7" } ] }, "awayTeam": { "_id": "divteam_2", "name": "Lightning", "players": [ { "_id": "player_2", "name": "Sam Lee", "number": "11" } ] }, "homeScore": null, "awayScore": null } ], "count": 1 }
Last updated on