openapi: 3.1.0
info:
  version: 1.0.0
  title: Armchair Fantasy Football Public API
  description: >-
    Read-only access to Armchair fantasy football leagues, for building league

    analysis tools, dashboards and integrations.


    ## Authentication


    None required. Every endpoint here answers an anonymous `GET`.


    An optional API key raises your rate limit and lets us identify your

    integration if something goes wrong — send it as `X-Api-Key`, or as

    `Authorization: Bearer armch_pk_…` if your HTTP client only speaks bearer

    tokens. A key that is presented but unrecognised is a `401`; sending no key

    at all is fine.


    ## Rate limits


    | Tier | Per minute | Per day |

    | --- | --- | --- |

    | Anonymous (per IP) | 60 | 5,000 |

    | With an API key | 600 (default) | 120,000 |


    Responses carry `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`

    and `RateLimit-Policy`. A `429` carries `Retry-After`. Those headers

    describe the state at our origin; a response served from the CDN carries the

    counts that were current when it was cached, so treat them as a guide rather

    than a ledger.


    Responses are cached at the edge — from 30 seconds for live scores to an
    hour

    for completed seasons. Repeating a request costs you nothing and costs us

    nothing, so poll the cheap way: re-request rather than trying to keep a
    local

    mirror in sync.


    ## Which leagues are visible


    Only leagues whose commissioner has switched on public API access. Public

    leagues have it on by default, since they are already browseable and
    joinable

    by strangers; private leagues are off until someone turns them on, and a

    commissioner can turn any league back off at any time.


    A league that has not opted in returns `404`, identical to a league that
    does

    not exist — so this API cannot be used to discover which private leagues are

    out there.


    ## What is never returned


    League data, not personal data. Managers appear as a display name and a team

    index. No user ids, emails, real names, phone numbers or profile details are

    exposed anywhere on this API, and there is no identifier that would let you

    tell that the same person plays in two different leagues.


    Also withheld: in-progress trade negotiations and their messages (a trade

    appears only once it has been accepted), managers' private watchlists, and
    the

    commissioner's note to their own league.


    ## Conventions


    Teams are addressed by `teamIndex` — the team's slot in the league, stable
    for

    its lifetime — rather than by UUID. Leagues accept either their UUID or the

    short numeric id the app displays.


    Seasons default to the current fantasy season, which is not always the
    calendar

    year: from New Year's Day through the Super Bowl the calendar reads a year

    ahead of the season still being played.


    Errors are always `{ "error": { "code", "message" } }`. Branch on `code`;

    `message` is for humans and may change.
  contact:
    name: Armchair Support
    url: https://armchairff.com/contact
servers:
  - url: https://armchairff.com
    description: Production
security:
  - {}
  - apiKey: []
tags:
  - name: Leagues
    description: League discovery, settings and scoring rules
  - name: Teams
    description: Team identity, managers and records
  - name: Rosters
    description: Current rosters and scored weekly snapshots
  - name: Matchups
    description: Schedule, results and standings
  - name: Transactions
    description: Adds, drops, claims and player ownership history
  - name: Trades
    description: Completed trades, picks and FAAB
  - name: Drafts
    description: Draft boards, pick order and auction prices
  - name: Players
    description: NFL player reference data
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: "Optional. Every endpoint works without one; a key raises the rate
        limit and identifies the integration. Also accepted as `Authorization:
        Bearer armch_pk_…`."
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - bad_request
                - not_found
                - rate_limited
                - invalid_api_key
                - upstream_error
              description: Stable machine-readable code. Branch on this, not on the message.
            message:
              type: string
              description: Human-readable explanation. May change; do not parse it.
          required:
            - code
            - message
      required:
        - error
      description: Every non-2xx response on this API has this shape.
    Pagination:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
          description: Total rows matching the filter, ignoring limit/offset.
        hasMore:
          type: boolean
      required:
        - limit
        - offset
        - total
        - hasMore
    Manager:
      type: object
      properties:
        displayName:
          type:
            - string
            - "null"
          description: The name the manager chose to show in-app.
        role:
          type: string
          enum:
            - member
            - commissioner
            - co_commissioner
        joinedAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - displayName
        - role
        - joinedAt
      description: A league manager. Display name and role only — this API never
        returns a user id, email, real name or any other account detail, and a
        manager cannot be correlated across leagues.
    TeamRecord:
      type: object
      properties:
        season:
          type: integer
        wins:
          type: integer
        losses:
          type: integer
        draws:
          type: integer
        pointsFor:
          type: number
        pointsAgainst:
          type: number
        playoffWins:
          type: integer
        playoffLosses:
          type: integer
        wonGold:
          type: boolean
          description: Won the championship.
        wonSilver:
          type: boolean
          description: Runner-up.
        wonBronze:
          type: boolean
          description: Third place.
        weekEliminated:
          type:
            - integer
            - "null"
          description: Guillotine and elimination formats only.
      required:
        - season
        - wins
        - losses
        - draws
        - pointsFor
        - pointsAgainst
        - playoffWins
        - playoffLosses
        - wonGold
        - wonSilver
        - wonBronze
        - weekEliminated
    Team:
      type: object
      properties:
        id:
          type: string
          format: uuid
        teamIndex:
          type: integer
          description: The team's slot in the league, stable for its lifetime. Matchups,
            rosters, trades and draft picks all key on this rather than on the
            UUID.
        name:
          type: string
        abbreviation:
          type:
            - string
            - "null"
        logoUrl:
          type:
            - string
            - "null"
        logoBackground:
          type:
            - string
            - "null"
        primaryColor:
          type:
            - string
            - "null"
        secondaryColor:
          type:
            - string
            - "null"
        waiverBudget:
          type: number
        managers:
          type: array
          items:
            $ref: "#/components/schemas/Manager"
        record:
          allOf:
            - $ref: "#/components/schemas/TeamRecord"
            - type:
                - object
                - "null"
      required:
        - id
        - teamIndex
        - name
        - abbreviation
        - logoUrl
        - logoBackground
        - primaryColor
        - secondaryColor
        - waiverBudget
        - managers
        - record
    LeagueSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        publicId:
          type: integer
          description: The short number the app shows. Usable in place of the UUID.
        name:
          type: string
        access:
          type: string
          enum:
            - public
            - private
        joinMode:
          type: string
          enum:
            - open
            - request
        status:
          type: string
          enum:
            - active
            - inactive
        logoUrl:
          type:
            - string
            - "null"
        maxTeams:
          type: integer
        divisions:
          type: integer
        matchupType:
          type: string
          enum:
            - points
            - head_to_head
            - pickem
        playerRetention:
          type: string
          enum:
            - redraft
            - keeper
            - dynasty
            - pickem
        publicNotes:
          type:
            - string
            - "null"
        createdAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - id
        - publicId
        - name
        - access
        - joinMode
        - status
        - logoUrl
        - maxTeams
        - divisions
        - matchupType
        - playerRetention
        - publicNotes
        - createdAt
    DirectoryLeague:
      allOf:
        - $ref: "#/components/schemas/LeagueSummary"
        - type: object
          properties:
            memberCount:
              type: integer
            openSeats:
              type: integer
          required:
            - memberCount
            - openSeats
    LeagueDetail:
      allOf:
        - $ref: "#/components/schemas/LeagueSummary"
        - type: object
          properties:
            rosterConfig:
              description: Starting-lineup slots and any per-position roster caps.
            scoringRules:
              description: Full scoring configuration, including IDP when enabled.
            waiverRules: {}
            rosterMaximum:
              type: integer
            keeperAmount:
              type: integer
            settings:
              type: object
              additionalProperties: {}
              description: "Every rule governing play: format, playoffs, trades, waivers,
                keepers, elimination, Gambits and Pick’em. Keys are camelCase;
                new ones are added over time and readers should tolerate unknown
                keys."
          required:
            - rosterMaximum
            - keeperAmount
            - settings
    RosterSlot:
      type: object
      properties:
        playerId:
          type: integer
        lineupPosition:
          type: string
          description: Starting slot, BENCH, or IR.
        acquisitionType:
          type: string
        acquisitionDate:
          type:
            - string
            - "null"
          format: date-time
        isKeeper:
          type: boolean
      required:
        - playerId
        - lineupPosition
        - acquisitionType
        - acquisitionDate
        - isKeeper
    RosterSnapshot:
      type: object
      properties:
        season:
          type:
            - integer
            - "null"
        week:
          type:
            - integer
            - "null"
        teamIndex:
          type: integer
        matchupId:
          type:
            - string
            - "null"
          format: uuid
        rosterPlayers:
          type: array
          items:
            type: integer
        activePlayers:
          type: array
          items:
            type: integer
          description: Players in a starting slot that week.
        benchPlayers:
          type: array
          items:
            type: integer
        lineup:
          description: Slot -> player id, as the lineup stood when the week was scored.
        playerPoints:
          description: Player id -> fantasy points scored that week.
        capturedAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - season
        - week
        - teamIndex
        - matchupId
        - rosterPlayers
        - activePlayers
        - benchPlayers
        - capturedAt
      description: What a team actually started in a completed week, with what each
        player scored. Written when the week settles; weeks that were never
        snapshotted return no rows rather than a reconstruction.
    Matchup:
      type: object
      properties:
        id:
          type: string
          format: uuid
        season:
          type: integer
        week:
          type: integer
        matchupType:
          type: string
        status:
          type: string
          enum:
            - scheduled
            - in_progress
            - completed
        homeTeamIndex:
          type:
            - integer
            - "null"
        awayTeamIndex:
          type:
            - integer
            - "null"
        homeScore:
          type:
            - number
            - "null"
        awayScore:
          type:
            - number
            - "null"
        completedAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - id
        - season
        - week
        - matchupType
        - status
        - homeTeamIndex
        - awayTeamIndex
        - homeScore
        - awayScore
        - completedAt
    Trade:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACCEPTED
            - PROCESSING
            - COMPLETED
            - VETOED
        proposingTeamIndex:
          type:
            - integer
            - "null"
        receivingTeamIndex:
          type:
            - integer
            - "null"
        createdAt:
          type:
            - string
            - "null"
          format: date-time
        processedAt:
          type:
            - string
            - "null"
          format: date-time
        players:
          type: array
          items:
            type: object
            properties:
              playerId:
                type: integer
              fromTeamIndex:
                type:
                  - integer
                  - "null"
              toTeamIndex:
                type:
                  - integer
                  - "null"
            required:
              - playerId
              - fromTeamIndex
              - toTeamIndex
        picks:
          type: array
          items:
            type: object
            properties:
              year:
                type: integer
              round:
                type: integer
              fromTeamIndex:
                type:
                  - integer
                  - "null"
              toTeamIndex:
                type:
                  - integer
                  - "null"
              originalTeamIndex:
                type:
                  - integer
                  - "null"
              draftedPlayerId:
                type:
                  - integer
                  - "null"
            required:
              - year
              - round
              - fromTeamIndex
              - toTeamIndex
              - originalTeamIndex
              - draftedPlayerId
        faab:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
              fromTeamIndex:
                type:
                  - integer
                  - "null"
              toTeamIndex:
                type:
                  - integer
                  - "null"
            required:
              - amount
              - fromTeamIndex
              - toTeamIndex
        votes:
          type: array
          items:
            type: object
            properties:
              teamIndex:
                type:
                  - integer
                  - "null"
              vote:
                type: boolean
              votedAt:
                type:
                  - string
                  - "null"
                format: date-time
            required:
              - teamIndex
              - vote
              - votedAt
      required:
        - id
        - status
        - proposingTeamIndex
        - receivingTeamIndex
        - createdAt
        - processedAt
        - players
        - picks
        - faab
        - votes
      description: A trade that has reached acceptance. Proposals still under
        negotiation (PENDING, COUNTER_OFFERED, and offers declined before
        acceptance) are never returned, and the message thread between the two
        managers is never included.
    DraftPick:
      type: object
      properties:
        round:
          type: integer
        pickNumber:
          type: integer
        teamIndex:
          type:
            - integer
            - "null"
        playerId:
          type:
            - integer
            - "null"
          description: Null means the pick was VOIDED, not that nobody was taken. Filter
            these out when counting picks made.
        isAutopick:
          type: boolean
          description: The timer picked, not the manager.
        saleAmount:
          type:
            - number
            - "null"
          description: "Auction leagues: the winning bid."
        nominatedByTeamIndex:
          type:
            - integer
            - "null"
        pickedAt:
          type:
            - string
            - "null"
          format: date-time
      required:
        - round
        - pickNumber
        - teamIndex
        - playerId
        - isAutopick
        - saleAmount
        - nominatedByTeamIndex
        - pickedAt
    Draft:
      type: object
      properties:
        id:
          type: string
          format: uuid
        season:
          type: integer
        type:
          type: string
          enum:
            - snake
            - linear
            - auction
        status:
          type: string
          enum:
            - not_scheduled
            - scheduled
            - in_progress
            - completed
        rounds:
          type: integer
        playerPool:
          type: string
        isKeeperLeague:
          type: boolean
        isDynastyLeague:
          type: boolean
        keeperCount:
          type:
            - integer
            - "null"
        scheduledTime:
          type:
            - string
            - "null"
          format: date-time
        finalizedAt:
          type:
            - string
            - "null"
          format: date-time
        pickDurationSeconds:
          type: integer
        auctionBudget:
          type:
            - number
            - "null"
        order:
          type: array
          items:
            type: integer
          description: Team indexes in round-one pick order.
        picks:
          type: array
          items:
            $ref: "#/components/schemas/DraftPick"
      required:
        - id
        - season
        - type
        - status
        - rounds
        - playerPool
        - isKeeperLeague
        - isDynastyLeague
        - keeperCount
        - scheduledTime
        - finalizedAt
        - pickDurationSeconds
        - auctionBudget
        - order
        - picks
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        playerId:
          type: integer
        teamIndex:
          type: integer
        type:
          type: string
          enum:
            - DRAFTED
            - ADDED
            - CLAIMED
            - DROPPED
            - TRADED_FOR
            - TRADED_AWAY
        transactedAt:
          type: string
          format: date-time
        details:
          type:
            - object
            - "null"
          properties:
            waiverBid:
              type: number
            draftRound:
              type: integer
            draftPick:
              type: integer
            lineupPosition:
              type: string
      required:
        - id
        - playerId
        - teamIndex
        - type
        - transactedAt
        - details
    Player:
      type: object
      properties:
        playerId:
          type: integer
        firstName:
          type:
            - string
            - "null"
        lastName:
          type:
            - string
            - "null"
        fullName:
          type: string
        position:
          type:
            - string
            - "null"
        team:
          type:
            - string
            - "null"
          description: Canonical NFL abbreviation. Washington is WSH; WAS will not match.
        jerseyNumber:
          type:
            - integer
            - "null"
        status:
          type:
            - string
            - "null"
        injuryStatus:
          type:
            - string
            - "null"
        byeWeek:
          type:
            - integer
            - "null"
        active:
          type: boolean
      required:
        - playerId
        - firstName
        - lastName
        - fullName
        - position
        - team
        - jerseyNumber
        - status
        - injuryStatus
        - byeWeek
        - active
    LeagueRef:
      type: string
      description: League UUID, or the short numeric public id shown in the app.
      example: "100482"
  parameters:
    LeagueRef:
      schema:
        $ref: "#/components/schemas/LeagueRef"
      required: true
      description: League UUID, or the short numeric public id shown in the app.
      name: leagueRef
      in: path
paths:
  /api/public/v1/leagues:
    get:
      summary: List leagues open to the API
      description: Every league that has enabled public API access. `joinable=true`
        narrows to leagues a stranger could actually join.
      tags:
        - Leagues
      parameters:
        - schema:
            type: string
            description: "`public` or `private`."
          required: false
          description: "`public` or `private`."
          name: access
          in: query
        - schema:
            type: string
            description: "`true` for leagues currently accepting managers."
          required: false
          description: "`true` for leagues currently accepting managers."
          name: joinable
          in: query
        - schema:
            type: string
            description: Page size, 1-100. Defaults to 25.
          required: false
          description: Page size, 1-100. Defaults to 25.
          name: limit
          in: query
        - schema:
            type: string
            description: Rows to skip.
          required: false
          description: Rows to skip.
          name: offset
          in: query
      responses:
        "200":
          description: The directory page.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagues:
                    type: array
                    items:
                      $ref: "#/components/schemas/DirectoryLeague"
                  pagination:
                    $ref: "#/components/schemas/Pagination"
                required:
                  - leagues
                  - pagination
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}:
    get:
      summary: Get a league
      description: "The league in one call: identity, every rule governing play, and
        the teams with their managers and records. Start here — the team indexes
        returned are the keys every other league endpoint uses."
      tags:
        - Leagues
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
      responses:
        "200":
          description: The league.
          content:
            application/json:
              schema:
                type: object
                properties:
                  league:
                    $ref: "#/components/schemas/LeagueDetail"
                  season:
                    type: integer
                  teams:
                    type: array
                    items:
                      $ref: "#/components/schemas/Team"
                required:
                  - league
                  - season
                  - teams
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/teams:
    get:
      summary: List teams
      description: Team identity, managers and season record, without the settings payload.
      tags:
        - Teams
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
      responses:
        "200":
          description: Teams in team-index order.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  season:
                    type: integer
                  teams:
                    type: array
                    items:
                      $ref: "#/components/schemas/Team"
                required:
                  - leagueId
                  - season
                  - teams
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/teams/{teamIndex}:
    get:
      summary: Get one team
      description: One team with its current roster and its record for every season it
        has played — the franchise history, in a single call rather than one per
        year.
      tags:
        - Teams
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
          required: true
          name: teamIndex
          in: path
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
      responses:
        "200":
          description: The team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  season:
                    type: integer
                  team:
                    allOf:
                      - $ref: "#/components/schemas/Team"
                      - type: object
                        properties:
                          records:
                            type: array
                            items:
                              $ref: "#/components/schemas/TeamRecord"
                        required:
                          - records
                  roster:
                    type: array
                    items:
                      $ref: "#/components/schemas/RosterSlot"
                required:
                  - leagueId
                  - season
                  - team
                  - roster
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/rosters:
    get:
      summary: Get rosters, live or historical
      description: "Without `week`, the current rosters (`rosters`). With `week`, the
        scored snapshot for that week (`snapshots`) — who was started, who was
        benched, and what each scored. The two shapes are different because they
        are different facts: only the snapshot can answer whether a lineup was
        right."
      tags:
        - Rosters
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
        - schema:
            type: string
            description: Fantasy week, 1-22.
            example: "7"
          required: false
          description: Fantasy week, 1-22.
          name: week
          in: query
        - schema:
            type: string
            description: Restrict to one team slot.
          required: false
          description: Restrict to one team slot.
          name: teamIndex
          in: query
      responses:
        "200":
          description: Rosters or snapshots, depending on whether `week` was given.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  season:
                    type: integer
                  week:
                    type:
                      - integer
                      - "null"
                  rosters:
                    type: array
                    items:
                      type: object
                      properties:
                        teamIndex:
                          type: integer
                        players:
                          type: array
                          items:
                            $ref: "#/components/schemas/RosterSlot"
                      required:
                        - teamIndex
                        - players
                  snapshots:
                    type: array
                    items:
                      $ref: "#/components/schemas/RosterSnapshot"
                required:
                  - leagueId
                  - season
                  - week
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/matchups:
    get:
      summary: Get the schedule and results
      tags:
        - Matchups
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
        - schema:
            type: string
            description: Fantasy week, 1-22.
            example: "7"
          required: false
          description: Fantasy week, 1-22.
          name: week
          in: query
        - schema:
            type: string
            description: Restrict to one team slot.
          required: false
          description: Restrict to one team slot.
          name: teamIndex
          in: query
      responses:
        "200":
          description: Matchups for the season or week.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  season:
                    type: integer
                  week:
                    type:
                      - integer
                      - "null"
                  matchups:
                    type: array
                    items:
                      $ref: "#/components/schemas/Matchup"
                required:
                  - leagueId
                  - season
                  - week
                  - matchups
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/standings:
    get:
      summary: Get standings
      description: The table for one season, plus the seasons the league has played.
        Ranked by wins, then points for, then fewest points against; every field
        behind that ordering is in the payload, so a tool that ranks differently
        can.
      tags:
        - Matchups
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
      responses:
        "200":
          description: Standings.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  season:
                    type: integer
                  availableSeasons:
                    type: array
                    items:
                      type: integer
                  standings:
                    type: array
                    items:
                      type: object
                      properties:
                        rank:
                          type: integer
                        teamIndex:
                          type: integer
                        teamName:
                          type:
                            - string
                            - "null"
                        abbreviation:
                          type:
                            - string
                            - "null"
                        logoUrl:
                          type:
                            - string
                            - "null"
                        primaryColor:
                          type:
                            - string
                            - "null"
                        record:
                          $ref: "#/components/schemas/TeamRecord"
                      required:
                        - rank
                        - teamIndex
                        - teamName
                        - abbreviation
                        - logoUrl
                        - primaryColor
                        - record
                required:
                  - leagueId
                  - season
                  - availableSeasons
                  - standings
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/transactions:
    get:
      summary: Get the roster-move ledger
      description: "Every add, drop, claim, draft and trade leg, newest first. This is
        the manager-decision record: who chased which breakout, what a claim
        cost, how long a player was held."
      tags:
        - Transactions
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Restrict to one team slot.
          required: false
          description: Restrict to one team slot.
          name: teamIndex
          in: query
        - schema:
            type: string
          required: false
          name: playerId
          in: query
        - schema:
            type: string
            description: DRAFTED, ADDED, CLAIMED, DROPPED, TRADED_FOR or TRADED_AWAY.
          required: false
          description: DRAFTED, ADDED, CLAIMED, DROPPED, TRADED_FOR or TRADED_AWAY.
          name: type
          in: query
        - schema:
            type: string
            description: ISO-8601 instant.
          required: false
          description: ISO-8601 instant.
          name: since
          in: query
        - schema:
            type: string
            description: Page size, 1-200. Defaults to 50.
          required: false
          description: Page size, 1-200. Defaults to 50.
          name: limit
          in: query
        - schema:
            type: string
            description: Rows to skip.
          required: false
          description: Rows to skip.
          name: offset
          in: query
      responses:
        "200":
          description: A page of the ledger.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  transactions:
                    type: array
                    items:
                      $ref: "#/components/schemas/Transaction"
                  pagination:
                    $ref: "#/components/schemas/Pagination"
                required:
                  - leagueId
                  - transactions
                  - pagination
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/trades:
    get:
      summary: Get trade history
      description: Players, picks and FAAB that changed hands, with the veto votes
        cast. Only trades that reached acceptance are returned; live
        negotiations and their message threads are never exposed.
      tags:
        - Trades
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: ACCEPTED, PROCESSING, COMPLETED or VETOED.
          required: false
          description: ACCEPTED, PROCESSING, COMPLETED or VETOED.
          name: status
          in: query
        - schema:
            type: string
            description: Restrict to one team slot.
          required: false
          description: Restrict to one team slot.
          name: teamIndex
          in: query
        - schema:
            type: string
            description: Page size, 1-100. Defaults to 50.
          required: false
          description: Page size, 1-100. Defaults to 50.
          name: limit
          in: query
        - schema:
            type: string
            description: Rows to skip.
          required: false
          description: Rows to skip.
          name: offset
          in: query
      responses:
        "200":
          description: A page of trades.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  trades:
                    type: array
                    items:
                      $ref: "#/components/schemas/Trade"
                  pagination:
                    $ref: "#/components/schemas/Pagination"
                required:
                  - leagueId
                  - trades
                  - pagination
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/drafts:
    get:
      summary: Get drafts and boards
      description: Every draft the league has held, with the full board. `isAutopick`
        separates a manager’s choice from a timer expiring — the one fact a
        draft board cannot otherwise show.
      tags:
        - Drafts
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
            description: Fantasy season year. Defaults to the current season, resolved from
              the NFL calendar rather than the calendar year.
            example: "2025"
          required: false
          description: Fantasy season year. Defaults to the current season, resolved from
            the NFL calendar rather than the calendar year.
          name: season
          in: query
      responses:
        "200":
          description: Drafts, newest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  drafts:
                    type: array
                    items:
                      $ref: "#/components/schemas/Draft"
                required:
                  - leagueId
                  - drafts
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/leagues/{leagueRef}/players/{playerId}:
    get:
      summary: Get a player's history in one league
      description: Who owns the player now, every move he has been part of, and those
        moves collapsed into ownership stints. A stint with a null `releasedAt`
        is current.
      tags:
        - Transactions
      parameters:
        - $ref: "#/components/parameters/LeagueRef"
        - schema:
            type: string
          required: true
          name: playerId
          in: path
      responses:
        "200":
          description: The player inside this league.
          content:
            application/json:
              schema:
                type: object
                properties:
                  leagueId:
                    type: string
                    format: uuid
                  player:
                    allOf:
                      - $ref: "#/components/schemas/Player"
                      - type:
                          - object
                          - "null"
                  currentOwner:
                    type:
                      - object
                      - "null"
                    properties:
                      teamIndex:
                        type: integer
                      lineupPosition:
                        type: string
                      acquisitionType:
                        type: string
                      acquisitionDate:
                        type:
                          - string
                          - "null"
                        format: date-time
                      isKeeper:
                        type: boolean
                    required:
                      - teamIndex
                      - lineupPosition
                      - acquisitionType
                      - acquisitionDate
                      - isKeeper
                  stints:
                    type: array
                    items:
                      type: object
                      properties:
                        teamIndex:
                          type: integer
                        acquiredAt:
                          type: string
                          format: date-time
                        acquiredVia:
                          type: string
                        releasedAt:
                          type:
                            - string
                            - "null"
                          format: date-time
                        releasedVia:
                          type:
                            - string
                            - "null"
                      required:
                        - teamIndex
                        - acquiredAt
                        - acquiredVia
                        - releasedAt
                        - releasedVia
                  transactions:
                    type: array
                    items:
                      $ref: "#/components/schemas/Transaction"
                required:
                  - leagueId
                  - player
                  - currentOwner
                  - stints
                  - transactions
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No such league, or the league has not enabled public API access.
            The two are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/players:
    get:
      summary: Search NFL players
      description: Resolve the player ids that appear on rosters, picks and
        transactions. Use `ids=` to resolve a whole roster in one request rather
        than looping.
      tags:
        - Players
      parameters:
        - schema:
            type: string
            description: Name search, 2+ characters.
          required: false
          description: Name search, 2+ characters.
          name: q
          in: query
        - schema:
            type: string
            description: Up to 100 comma-separated player ids.
          required: false
          description: Up to 100 comma-separated player ids.
          name: ids
          in: query
        - schema:
            type: string
          required: false
          name: position
          in: query
        - schema:
            type: string
            description: Canonical abbreviation (WSH, not WAS).
          required: false
          description: Canonical abbreviation (WSH, not WAS).
          name: team
          in: query
        - schema:
            type: string
            description: "`false` to include inactive players."
          required: false
          description: "`false` to include inactive players."
          name: active
          in: query
        - schema:
            type: string
            description: Page size, 1-100. Defaults to 25.
          required: false
          description: Page size, 1-100. Defaults to 25.
          name: limit
          in: query
        - schema:
            type: string
            description: Rows to skip.
          required: false
          description: Rows to skip.
          name: offset
          in: query
      responses:
        "200":
          description: Matching players.
          content:
            application/json:
              schema:
                type: object
                properties:
                  players:
                    type: array
                    items:
                      $ref: "#/components/schemas/Player"
                  pagination:
                    $ref: "#/components/schemas/Pagination"
                required:
                  - players
                  - pagination
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/public/v1/players/{playerId}:
    get:
      summary: Get one player
      tags:
        - Players
      parameters:
        - schema:
            type: string
          required: true
          name: playerId
          in: path
      responses:
        "200":
          description: The player.
          content:
            application/json:
              schema:
                type: object
                properties:
                  player:
                    $ref: "#/components/schemas/Player"
                required:
                  - player
        "400":
          description: Malformed parameter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: An API key was presented but is unknown or revoked.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No player with that id.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
webhooks: {}
