---
title: "Update child teams for parent team"
method: POST
path: "/teams/{parent_team_id}/updateChildTeams"
---

# Update child teams for parent team

`POST /teams/{parent_team_id}/updateChildTeams`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/teams/{parent_team_id}/updateChildTeams`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `teams:write`

Replace the child teams linked to a parent team. The provided list of child team IDs entirely replaces the current set: missing child teams are linked and extra child teams are unlinked. Parent team responsibilities are then recalculated from the linked child teams.

## Path parameters

- `parent_team_id` integer, required

## Request body

- object
  - `child_team_ids` integer[], required: The full list of child team IDs that should be linked to this parent team. This list replaces the current set of child teams. Pass an empty array to unlink all child teams.

## Response `200`

The child teams of the parent team have been successfully updated

- object
  - `success` integer: The integer 1 indicating success

## Other responses

- `400`: The provided team is not a parent team, or one or more of the provided fields are invalid.
- `404`: The provided parent_team_id does not belong to an existing team.

---

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