# List child teams (Legacy)

From **GitHub v3 REST API**.

`GET /teams/{team_id}/teams`

**Deprecated.**

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/enterprise-server@3.0/rest/reference/teams#list-child-teams) endpoint.

## Parameters

### `team_id`

- Location: path
- Required: true
- Type: `integer`

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

## Responses

### `200`

if child teams exist

#### Headers

##### `Link`

- Type: `string`

- Example: `<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"`

### `application/json`

- Type: `array`

```json
[
  {
    "description": "Started it all.",
    "html_url": "https://github.com/orgs/rails/teams/core",
    "id": 2,
    "members_url": "https://api.github.com/teams/2/members{/member}",
    "name": "Original Roster",
    "node_id": "MDQ6VGVhbTI=",
    "parent": {
      "description": "A great team.",
      "html_url": "https://github.com/orgs/github/teams/justice-league",
      "id": 1,
      "members_url": "https://api.github.com/teams/1/members{/member}",
      "name": "Justice League",
      "node_id": "MDQ6VGVhbTE=",
      "permission": "admin",
      "privacy": "closed",
      "repositories_url": "https://api.github.com/teams/1/repos",
      "slug": "justice-league",
      "url": "https://api.github.com/teams/1"
    },
    "permission": "admin",
    "privacy": "closed",
    "repositories_url": "https://api.github.com/teams/2/repos",
    "slug": "original-roster",
    "url": "https://api.github.com/teams/2"
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/team"},"type":"array"}
```

### `403`

Forbidden

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

### `422`

Validation failed

### `application/json`

- Type: `object`

Validation Error

```json
{"description":"Validation Error","properties":{"documentation_url":{"type":"string"},"errors":{"items":{"properties":{"code":{"type":"string"},"field":{"type":"string"},"index":{"type":"integer"},"message":{"type":"string"},"resource":{"type":"string"},"value":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"integer"},{"items":{"type":"string"},"nullable":true,"type":"array"}]}},"required":["code"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["message","documentation_url"],"title":"Validation Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/teams/{team_id}/teams
```
