# List a team's members

> The people in a team, each with their username, name, avatar and role in it (member or maintainer).

<div class="g1t-endpoint"><span class="g1t-method" data-method="get">GET</span><code>/workspaces/{workspace}/teams/{team}/members</code></div>

With `include_child_teams`, the people of its child teams are listed too, each with `via`, the child team they are in. Anyone who can see the team.

Maintainers come first, then members, each by username. With `include_child_teams`, the people of its child teams (and theirs) follow, each with `via`, the child team they are in; someone in both is listed once, as the team's own.

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`team`](/reference/mcp/#team) with `action` `list_members`, and the same inputs
- **Scope:** An access token needs [`workspace:read`](/guides/authentication/#scopes).

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace` | string | Yes | The workspace's slug, e.g. "flagon-io". |
| `team` | string | Yes | The team's slug, as in its mention @workspace/slug, e.g. "backend". |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `include_child_teams` | boolean | No | Also the people of its child teams: listed with [`list_members`](/reference/api/members/list-members/), picked from with review assignment. |

## Example request

```sh
curl "https://api.g1t.sh/workspaces/flagon-io/teams/backend/members?include_child_teams=true" \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
[
  {
    "username": "syntaqx",
    "display_username": "syntaqx",
    "name": "Chase Pierce",
    "avatar": null,
    "role": "maintainer",
    "via": null
  },
  {
    "username": "ana",
    "display_username": "Ana",
    "name": "Ana Lima",
    "avatar": null,
    "role": "member",
    "via": null
  },
  {
    "username": "bo",
    "display_username": "bo",
    "name": null,
    "avatar": null,
    "role": "member",
    "via": "payments"
  }
]
```

## Errors

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#errors).

| Status | Code | When |
| --- | --- | --- |
| 401 | `unauthenticated` | A token is required, or the one sent is not valid. |
| 403 | `forbidden` | The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | `not_found` | It does not exist, or you cannot see it. |
| 422 | `invalid` | The input is not valid. `message` says which field and why. |
