Skip to Content
API ReferenceDivisions

Divisions

Divisions belong to a league and hold teams. Each division tracks its own standings, schedule, and configuration.

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

Endpoints

MethodPathAuthDescription
GET/api/v1/divisions?league=:idRecommendedList all divisions for a league
GET/api/v1/divisions/:idRecommendedGet a single division (includes standings)
POST/api/v1/divisionsRequiredCreate a division within a league
PUT/api/v1/divisions/:idRequiredUpdate a division

Allowed ?include= roots: league, layout, organization, paymentProduct. By default, league and layout are returned as ObjectId strings — pass ?include=league,layout to get them as nested objects. See Query Parameter: ?include=.

Division Fields

FieldTypeDescription
_idObjectIdUnique identifier
namestringDivision name (required)
organizationObjectIdOwning organization (ref: Organization)
leagueObjectIdParent league (ref: League)
sportsstring[]Sports for this division. Default: []
prioritynumberDisplay sort order
paymentProductObjectIdPayment product override (ref: PaymentProduct)
configConfigSchemaDivision-level configuration — highest precedence
strengthLevelnumberSkill level indicator
startDatedateDivision start date
endDatedateDivision end date
layoutObjectIdBracket/schedule layout (ref: Layout)
createddateCreation timestamp
updateddateLast update timestamp

ConfigSchema Fields

Division config overrides league, tournament, and registration config. See Config Hierarchy for details.

FieldTypeDefaultDescription
requirePlayersbooleanTeams must add players to complete registration
hideTeamsbooleanHide team names from public views
hideSchedulesbooleanfalseHide schedules from public views
excludeTeamNamebooleanShow player names instead of team name
minPlayersnumberMinimum players per team
maxPlayersnumberMaximum players per team
gameDurationInMinutesnumberDefault game duration
requireCoachesbooleanTeams must add coaches
requireTeamRepresentativesbooleanTeams must add team representatives
minTeamRepresentativesnumberMinimum team representatives
maxTeamRepresentativesnumberMaximum team representatives
minCoachesnumberMinimum coaches
maxCoachesnumberMaximum coaches
capacitynumber0Max teams (0 = unlimited)
waitlistCapacitynumber0Waitlist spots (0 = no waitlist)
autoPromotebooleanfalseAuto-promote waitlisted teams
promotionPaymentWindowHoursnumber48Hours to complete payment after promotion
disableSyncbooleanDisable automatic sync
adminsstring[][]Additional admin user IDs
tiebreakersobjectTiebreaker rules per sport (basketball, football, baseball, soccer)

Create a Division

curl -X POST https://api.staty.io/api/v1/divisions \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Competitive", "league": "league_abc123", "config": { "capacity": 12, "minPlayers": 7, "maxPlayers": 15, "gameDurationInMinutes": 50 } }'

Response:

{ "success": true, "data": { "_id": "div_def456", "name": "Competitive", "league": "league_abc123", "config": { "capacity": 12, "minPlayers": 7, "maxPlayers": 15, "gameDurationInMinutes": 50, "waitlistCapacity": 0, "autoPromote": false, "promotionPaymentWindowHours": 48 }, "created": "2026-03-15T10:00:00.000Z" } }

Division config takes the highest precedence in the config hierarchy. See Config Hierarchy for how it interacts with league, tournament, and registration config.

Last updated on