# Leagueborn Sleeper League Lookup API

Leagueborn exposes one supported public API operation: a read-only lookup for the leagues associated with a public Sleeper username. It never asks for a Sleeper password and cannot modify a league.

## Discovery

The catalog follows RFC 9727: https://www.rfc-editor.org/info/rfc9727

- API catalog: https://leagueborn.com/.well-known/api-catalog
- OpenAPI 3.1 description: https://leagueborn.com/openapi.json
- Endpoint: https://leagueborn.com/api/sleeper/leagues

## Find leagues

`GET /api/sleeper/leagues`

Query parameters:

- `username` (required): a public Sleeper username containing 1-40 letters, numbers, underscores, or hyphens.
- `season` (optional): a numeric Sleeper season from 2017 through 2100. When omitted, Leagueborn checks the current available season.

Example:

`GET /api/sleeper/leagues?username=demo&season=2025`

A successful JSON response includes the public Sleeper user, normalized league summaries, the selected and checked seasons, whether a historical fallback was used, and the synchronization timestamp.

## Responses

- `200`: user and league results.
- `400`: invalid username or season.
- `404`: Sleeper could not find the username.
- `500`: Leagueborn could not complete the lookup.
- `503`: Sleeper is temporarily unavailable or returned incomplete data.

Errors use a JSON object with human-readable `error` text and a stable `code`.

## Usage and privacy

No Leagueborn authentication is required. Responses contain data that Sleeper exposes publicly, including user identity and league metadata. Cache responsibly, avoid high-frequency polling, and respect league members' privacy. This service has no availability guarantee.

The catalog deliberately excludes account data, mutations, live-score streaming, editorial tools, analytics, health checks, share rendering, and scheduled operations. Those routes are not part of the public developer contract.

The current contract is version 1.0. Compatible fields may be added to JSON objects. Breaking changes will be reflected in the OpenAPI version and these docs.
