---
title: "Update a team (Legacy)"
method: PATCH
path: "/teams/{team_id}"
tags: ["teams"]
deprecated: true
---

# Update a team (Legacy)

`PATCH /teams/{team_id}`

> **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 [Update a team](https://docs.github.com/enterprise-server@3.6/rest/teams/teams#update-a-team) endpoint.

To edit a team, the authenticated user must either be an organization owner or a team maintainer.

**Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.

## Path parameters

- `team_id` integer, required

## Request body

- object
  - `name` string, required — The name of the team.
  - `description` string — The description of the team.
  - `privacy` 'secret' | 'closed' — The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: **For a non-nested team:** * `secret` - only visible to organization owners and members of this team. * `closed` - visible to all members of this organization. **For a parent or child team:** * `closed` - visible to all members of this organization.
  - `permission` 'pull' | 'push' | 'admin' — **Deprecated**. The permission that new repositories will be added to the team with when none is specified.
  - `parent_team_id` integer, nullable — The ID of a team to set as the parent team.

## Response `200`

Response when the updated information already exists

- TeamFull — Groups of organization members that gives permissions on specified repositories.
  - `id` integer, required — Unique identifier of the team
  - `node_id` string, required
  - `url` string, uri, required — URL for the team
  - `html_url` string, uri, required
  - `name` string, required — Name of the team
  - `slug` string, required
  - `description` string, nullable, required
  - `privacy` 'closed' | 'secret' — The level of privacy this team should have
  - `permission` string, required — Permission that the team will have for its repositories
  - `members_url` string, required
  - `repositories_url` string, uri, required
  - `parent` NullableTeamSimple, nullable — Groups of organization members that gives permissions on specified repositories.
    - `id` integer, required — Unique identifier of the team
    - `node_id` string, required
    - `url` string, uri, required — URL for the team
    - `members_url` string, required
    - `name` string, required — Name of the team
    - `description` string, nullable, required — Description of the team
    - `permission` string, required — Permission that the team will have for its repositories
    - `privacy` string — The level of privacy this team should have
    - `html_url` string, uri, required
    - `repositories_url` string, uri, required
    - `slug` string, required
    - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment
  - `members_count` integer, required
  - `repos_count` integer, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `organization` TeamOrganization, required — Team Organization
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, uri, required
    - `hooks_url` string, required
    - `issues_url` string, required
    - `members_url` string, required
    - `public_members_url` string, required
    - `avatar_url` string, required
    - `description` string, nullable, required
    - `name` string
    - `company` string
    - `blog` string, uri
    - `location` string
    - `email` string, email
    - `twitter_username` string, nullable
    - `is_verified` boolean
    - `has_organization_projects` boolean, required
    - `has_repository_projects` boolean, required
    - `public_repos` integer, required
    - `public_gists` integer, required
    - `followers` integer, required
    - `following` integer, required
    - `html_url` string, uri, required
    - `created_at` string, date-time, required
    - `type` string, required
    - `total_private_repos` integer
    - `owned_private_repos` integer
    - `private_gists` integer, nullable
    - `disk_usage` integer, nullable
    - `collaborators` integer, nullable
    - `billing_email` string, email, nullable
    - `plan` object
      - `name` string, required
      - `space` integer, required
      - `private_repos` integer, required
      - `filled_seats` integer
      - `seats` integer
    - `default_repository_permission` string, nullable
    - `members_can_create_repositories` boolean, nullable
    - `two_factor_requirement_enabled` boolean, nullable
    - `members_allowed_repository_creation_type` string
    - `members_can_create_public_repositories` boolean
    - `members_can_create_private_repositories` boolean
    - `members_can_create_internal_repositories` boolean
    - `members_can_create_pages` boolean
    - `members_can_create_public_pages` boolean
    - `members_can_create_private_pages` boolean
    - `members_can_fork_private_repositories` boolean, nullable
    - `web_commit_signoff_required` boolean
    - `updated_at` string, date-time, required
  - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment

## Other responses

- `201` — Response
- `403` — Forbidden
- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-5.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-5/versions/50ae54440071/schema)
