<!-- Generated by scripts/build-docs.js. Edit docs/swagger.yaml or docs/guides/, then run `npm run docs:build`. -->

# Get a team

`GET https://marketplace-api.sequifi.com/v1/teams/{id}`

Module: Teams · operationId: `getTeam` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequifi.com/#/api/get-team

Returns one team by id with its Team Manager and every membership it has had, each with its own `start_date` and `end_date`. Unlike `GET /v1/teams`, no date filter is applied, so read the membership dates yourself.

**Formats:**

- Same fields as one item of `GET /v1/teams`, under `data.team`. Team and membership dates are `YYYY-MM-DD`; `created_at` and `updated_at` are UTC timestamps.
- Members include former members; check each membership's dates. Each person has `status_id` (`1` = active).
- A member whose user record no longer exists comes back with only `start_date` and `end_date`.

**Errors:**

- `400 Invalid team id`: the id is not a positive whole number.
- `400 Cannot use query parameters when fetching a single team by id`
- `404 Team not found`: no team has this id, or it was deleted.

**Related:**

- `POST /v1/teams` returns this id as `data.id`.

## Path parameters

- `id` (integer, **required**): Team id, from `GET /v1/teams` or `POST /v1/teams`. Minimum: 1. Example: `44`.

## Example request

```bash
curl -X GET "https://marketplace-api.sequifi.com/v1/teams/44" \
  -H "Authorization: Bearer $SEQUIFI_TOKEN"
```

## Responses

### 200: The team with all of its memberships.

- `status` (integer): Same as the HTTP status code. Example: `200`.
- `message` (string) Example: `success`.
- `data` (object)
  - `team` (object): The team.
    - `id` (integer): Team id.
    - `team_name` (string): Team name.
    - `type` (string): Always `lead`.
    - `start_date` (string): First day, `YYYY-MM-DD`.
    - `end_date` (string, nullable): Last day, `YYYY-MM-DD`, or null.
    - `manager_gets_override` (boolean): The "Team Manager gets Override" setting.
    - `location_id` (integer, nullable): Location id, if set.
    - `office_id` (integer, nullable): Office id, if set.
    - `created_at` (string): UTC timestamp.
    - `updated_at` (string): UTC timestamp of the last change to the team itself.
    - `team_manager` (object, nullable): The Team Manager (same person fields as `GET /v1/teams`), or null.
    - `team_members` (array of object): Every membership, past, current and future, each with its own dates.
      - `id` (integer): User id. Missing when the user no longer exists.
      - `first_name` (string): First name.
      - `last_name` (string): Last name.
      - `status_id` (integer, nullable): Employment status. `1` is active.
      - `start_date` (string): First day on this team, `YYYY-MM-DD`.
      - `end_date` (string, nullable): Last day on this team, `YYYY-MM-DD`, or null.

```json
{
  "status": 200,
  "message": "success",
  "data": {
    "team": {
      "id": 44,
      "team_name": "Team Alpha - Sep 6",
      "type": "lead",
      "start_date": "2026-09-06",
      "end_date": "2026-09-12",
      "manager_gets_override": false,
      "location_id": null,
      "office_id": null,
      "created_at": "2026-09-07T15:05:14.000Z",
      "updated_at": "2026-09-07T15:05:14.000Z",
      "team_manager": {
        "id": 72,
        "first_name": "Avery",
        "last_name": "Nolan",
        "email": "avery.nolan@example.com",
        "position_id": 2,
        "position_name": "Closer",
        "sub_position_id": 7,
        "sub_position_name": "Veteran",
        "is_manager": 1,
        "status_id": 1
      },
      "team_members": [
        {
          "id": 428,
          "first_name": "Alex",
          "last_name": "Morgan",
          "email": "alex.morgan@example.com",
          "position_id": 2,
          "position_name": "Closer",
          "sub_position_id": 9,
          "sub_position_name": "Sophomore",
          "is_manager": 0,
          "status_id": 1,
          "start_date": "2026-09-06",
          "end_date": "2026-09-12"
        }
      ]
    }
  }
}
```

### 400: The id is invalid, or query parameters were sent with it.

Example (invalid_id): id is not a positive whole number

```json
{
  "status": 400,
  "message": "Invalid team id",
  "data": {}
}
```

### 401: Missing, unknown, expired or disabled token. Sent by the gateway as `{"message":"Unauthorized"}`, without `status` or `data`.

```json
{
  "message": "Unauthorized"
}
```

### 404: No team has this id, or it was deleted.

```json
{
  "status": 404,
  "message": "Team not found",
  "data": {}
}
```

### 500: Unexpected server error. Safe to retry.

```json
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}
```
