---
title: "List leagues."
method: GET
path: "/api/league"
tags: ["League"]
---

# List leagues.

`GET /api/league`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/league`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/league/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns leagues with their related data. Supports filtering, ordering and pagination. When download is true a CSV file is streamed instead of JSON.

## Query parameters

- `name` string
- `genre` integer[]
- `subgenre` integer[]
- `owner` integer[]
- `withRelationships` string[]
- `order_by` string
- `order` string
- `paginated` boolean
- `per_page` integer
- `page` integer
- `download` boolean

## Response `200`

A list of leagues (array, or paginated object when paginated is set). When download is true, a text/csv file is returned instead.

## Other responses

- `403`: The user lacks the permission required to view leagues.

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
