> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://statpad.dev/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://statpad.dev/docs/_mcp/server.

# Get a team's roster

GET https://api.statpad.dev/v1/{league}/teams/{team_id}/roster

Reference: https://statpad.dev/docs/api-reference/teams/get-team-roster

## Authentication

- `Authorization` header (bearer token, required) — An API key, sent as `Authorization: Bearer <key>`.

## Request

### Path parameters

- `league` (string, required) — The league's alias.
- `team_id` (string, required)

### Query parameters

- `date` (date, optional) — The roster as of this day. Defaults to today in US Eastern time.
- `cursor` (string, optional) — `next_cursor` from the previous page. Omit it for the first page.
- `limit` (integer, optional, default: 100) — Page size.

### Headers

- `If-None-Match` (string, optional) — An `ETag` from an earlier response. When it still matches, the response is 304 with no body.

## Response

### 200

A page of roster entries, ordered by position and last name, with their players.

- `data` (list of RosterEntry, required)
- `players` (list of Player, required)
- `next_cursor` (string, required, nullable) — Pass as `cursor` for the next page; null on the last page.

## Errors

### 400 Bad Request Error

A parameter is missing or invalid (`bad_request`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 401 Unauthorized Error

The API key is missing, unknown or revoked (`unauthorized`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 403 Forbidden Error

The plan doesn't include this league or feature (`forbidden`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 404 Not Found Error

No such league or entity (`not_found`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 429 Too Many Requests Error

The account's request rate (`rate_limited`) or period allowance (`quota_exhausted`, with `resets_at`) is used up. No data is served.

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 500 Internal Server Error

Something failed on our side (`internal`). Retry with backoff.

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 503 Service Unavailable Error

Account access or its limits could not be checked because a dependency is unavailable (`unavailable`). No data is served.

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

## Types

### RosterEntry

A stint of a player on a team. `ended_on` is the last day, null while current.

- `id` (string, required)
- `league` (string, required) — A league's public alias, such as `nfl` or `ncaaf`.
- `player_id` (string, required)
- `team_id` (string, required)
- `status` (enum, required)
  - Allowed values: `active`, `injured_reserve`, `practice_squad`, `suspended`, `reserve`, `pup`, `nfi`, `injured_list`, `minors`, `restricted`, `redshirt`
- `position` (string, required, nullable)
- `jersey` (string, required, nullable)
- `started_on` (date, required)
- `ended_on` (date, required, nullable)

### Player

A person. One id follows a player across leagues, from college to the pros.

- `id` (string, required)
- `first_name` (string, required)
- `last_name` (string, required)
- `full_name` (string, required)
- `abbr_name` (string, required, nullable)
- `birth_date` (date, required, nullable)
- `birth_place` (string, required, nullable)
- `height_in` (integer, required, nullable)
- `weight_lb` (integer, required, nullable)
- `bats` (enum, required, nullable) — Left, right or switch.
  - Allowed values: `L`, `R`, `S`
- `throws` (enum, required, nullable) — Left, right or switch.
  - Allowed values: `L`, `R`, `S`
- `primary_position` (string, required, nullable)
- `college` (string, required, nullable)
- `rookie_year` (integer, required, nullable)
- `draft` (Draft, required, nullable) — What is known of the player's draft. Present when any of its fields is known.
- `version` (integer, required) — Bumps on every change to the entity, deletions included. A client holding a version can ignore any state with a lower one.
- `updated_at` (datetime, required)

### Draft

What is known of the player's draft. Present when any of its fields is known.

- `year` (integer, required, nullable)
- `round` (integer, required, nullable)
- `pick` (integer, required, nullable)
- `team_id` (string, required, nullable)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "league": "nfl",
      "player_id": "string",
      "team_id": "string",
      "status": "active",
      "position": "string",
      "jersey": "string",
      "started_on": "2023-01-15",
      "ended_on": "2023-01-15"
    }
  ],
  "players": [
    {
      "id": "string",
      "first_name": "string",
      "last_name": "string",
      "full_name": "string",
      "abbr_name": "string",
      "birth_date": "2023-01-15",
      "birth_place": "string",
      "height_in": 1,
      "weight_lb": 1,
      "bats": "L",
      "throws": "L",
      "primary_position": "QB",
      "college": "string",
      "rookie_year": 1,
      "draft": {
        "year": 1,
        "round": 1,
        "pick": 1,
        "team_id": "string"
      },
      "version": 1,
      "updated_at": "2024-01-15T09:30:00Z"
    }
  ],
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.statpad.dev/v1/nfl/teams/team_id/roster"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.statpad.dev/v1/nfl/teams/team_id/roster';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.statpad.dev/v1/nfl/teams/team_id/roster"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.statpad.dev/v1/nfl/teams/team_id/roster")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.statpad.dev/v1/nfl/teams/team_id/roster")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.statpad.dev/v1/nfl/teams/team_id/roster', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.statpad.dev/v1/nfl/teams/team_id/roster");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.statpad.dev/v1/nfl/teams/team_id/roster")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```