Skip to Content
API ReferenceAPI Reference

API Reference

Full endpoint documentation for the Staty REST API.

Base URL: https://api.staty.io/api/v1

Authentication

All requests require an Authorization header:

Authorization: Bearer sk_live_abc123...

Generate keys from Settings → API Keys in the Admin dashboard . See Developer API: Getting Started for full instructions.

Available Scopes

ScopeAccess
read:leaguesRead seasons, tournaments, divisions
read:teamsRead teams and rosters
read:playersRead player profiles and stats
read:gamesRead game schedule and scores
read:registrationsRead registration submissions
write:registrationsSubmit registrations on behalf of users
read:paymentsRead payment status
adminFull read/write access

Response Envelope

All responses use this format:

{ "success": true, "data": [ ... ], "count": 5 }

Query Parameter: ?include=

By default, list and detail endpoints return only the immediate fields of the requested resource. Reference fields (e.g. league, paymentProduct, homeTeam) are returned as bare ObjectId strings. To get them populated as nested objects, opt in with ?include=.

Breaking change in v1.1: several endpoints that previously auto-populated reference fields (e.g. GET /divisions/:id always returned league and layout as objects) now return them as ObjectId strings unless you ask for them with ?include=. See the changelog for the full list.

Grammar

?include= accepts a comma-separated list. Each token supports four forms:

TokenEffect
aPopulate the a reference.
a,bPopulate a and b.
a.bPopulate a, then populate a.b on the result (nested).
a.b.cThree-level nesting.
a(x,y)Populate a and return only fields x and y on the populated doc.
a.b(x,y)Nested populate with field selection on the leaf.

Examples

Single populate:

GET /api/v1/divisions/div_123?include=league

Multiple flat populates:

GET /api/v1/divisions/div_123?include=league,layout

Nested populate (populate homeTeam, and on each homeTeam populate its players):

GET /api/v1/games/game_abc?include=homeTeam.players,awayTeam.players

Field selection (return only name and _id on the populated user):

GET /api/v1/payments?include=user(name,email)

Combination — populate requestedDivision, then populate paymentProduct on it, returning only name and price:

GET /api/v1/registrationTeams/rt_xyz?include=requestedDivision.paymentProduct(name,price)

Rules

  • Unknown roots are silently ignored. Passing ?include=evil won’t error; the field just doesn’t appear.
  • Each endpoint allow-lists root paths. If a root isn’t allowed on that endpoint, the token is ignored. Allowed roots are listed in each endpoint’s docs.
  • Same-root tokens merge. ?include=players.team,players.organization,players.league produces a single populate on players with three sub-populates — equivalent to populating each one separately and merging.
  • _id is always included in populated docs. You don’t need to add it to (...) selects.

Feature Endpoints

FeatureCategoryEndpoint
Season ManagementLeague/api/v1/leagues
Tournament BracketsLeague/api/v1/tournaments
Divisions & StandingsLeague/api/v1/divisions
Team RegistrationRegistration/api/v1/registrations
Digital WaiversRegistration/api/v1/waivers
Player ProfilesPlayers/api/v1/players
Game SchedulingScheduling/api/v1/games
Venue ManagementScheduling/api/v1/locations
PaymentsPayments/api/v1/payments
Game StatisticsAnalytics/api/v1/stats
Audit LogsDeveloper/api/v1/auditLogs

Rate Limits

PlanRequests/minute
Free60
Pro300
EnterpriseCustom

When exceeded: 429 Too Many Requests. Check the Retry-After header.

See Errors & Rate Limits for full error code reference.

Last updated on