Skip to main content

Update a team (Legacy)

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/[email protected]/rest/reference/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`.

PATCH/teams/{team_id}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
team_id integer
required
Body Params
required
application/jsonobject
description string
optional

The description of the team.

name string
required

The name of the team.

parent_team_id integer
optionalnullable

The ID of a team to set as the parent team.

permission string
optional

**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \* `pull` - team members can pull, but not push to or administer newly-added repositories. \* `push` - team members can pull and push, but not administer newly-added repositories. \* `admin` - team members can pull, push and administer newly-added repositories.

privacy string
optional

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.

Responses

application/json Full Team object

Response

created_at string<date-time>
required

Example: 2017-07-14T16:53:42Z

description string
requirednullable

Example: A great team.

html_url string<uri>
required

Example: https://github.com/orgs/rails/teams/core

id integer
required

Unique identifier of the team

Example: 42

ldap_dn string
optional

Distinguished Name (DN) that team maps to within LDAP environment

Example: uid=example,ou=users,dc=github,dc=com

members_count integer
required

Example: 3

members_url string
required

Example: https://api.github.com/organizations/1/team/1/members{/member}

name string
required

Name of the team

Example: Developers

node_id string
required

Example: MDQ6VGVhbTE=

organization Organization Full object
required

Organization Full

avatar_url string
required

Example: https://github.com/images/error/octocat_happy.gif

billing_email string<email>
optionalnullable

Example: [email protected]

blog string<uri>
optional

Example: https://github.com/blog

collaborators integer
optionalnullable

Example: 8

company string
optional

Example: GitHub

created_at string<date-time>
required

Example: 2008-01-14T04:33:35Z

default_repository_permission string
optionalnullable
description string
requirednullable

Example: A great organization

disk_usage integer
optionalnullable

Example: 10000

email string<email>
optional

Example: [email protected]

events_url string<uri>
required

Example: https://api.github.com/orgs/github/events

followers integer
required

Example: 20

following integer
required

Example: 0

has_organization_projects boolean
required

Example: true

has_repository_projects boolean
required

Example: true

hooks_url string
required

Example: https://api.github.com/orgs/github/hooks

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

is_verified boolean
optional

Example: true

issues_url string
required

Example: https://api.github.com/orgs/github/issues

location string
optional

Example: San Francisco

login string
required

Example: github

members_allowed_repository_creation_type string
optional

Example: all

members_can_create_internal_repositories boolean
optional

Example: true

members_can_create_pages boolean
optional

Example: true

members_can_create_private_pages boolean
optional

Example: true

members_can_create_private_repositories boolean
optional

Example: true

members_can_create_public_pages boolean
optional

Example: true

members_can_create_public_repositories boolean
optional

Example: true

members_can_create_repositories boolean
optionalnullable

Example: true

members_can_fork_private_repositories boolean
optionalnullable

Example: false

members_url string
required

Example: https://api.github.com/orgs/github/members{/member}

name string
optional

Example: github

node_id string
required

Example: MDEyOk9yZ2FuaXphdGlvbjE=

owned_private_repos integer
optional

Example: 100

plan object
optional
filled_seats integer
optional
name string
required
private_repos integer
required
seats integer
optional
space integer
required
private_gists integer
optionalnullable

Example: 81

public_gists integer
required

Example: 1

public_members_url string
required

Example: https://api.github.com/orgs/github/public_members{/member}

public_repos integer
required

Example: 2

repos_url string<uri>
required

Example: https://api.github.com/orgs/github/repos

total_private_repos integer
optional

Example: 100

twitter_username string
optionalnullable

Example: github

two_factor_requirement_enabled boolean
optionalnullable

Example: true

type string
required

Example: Organization

updated_at string<date-time>
required
url string<uri>
required

Example: https://api.github.com/orgs/github

parent Team Simple object
optionalnullable

Groups of organization members that gives permissions on specified repositories.

description string
requirednullable

Description of the team

Example: A great team.

html_url string<uri>
required

Example: https://github.com/orgs/rails/teams/core

id integer
required

Unique identifier of the team

Example: 1

ldap_dn string
optional

Distinguished Name (DN) that team maps to within LDAP environment

Example: uid=example,ou=users,dc=github,dc=com

members_url string
required

Example: https://api.github.com/organizations/1/team/1/members{/member}

name string
required

Name of the team

Example: Justice League

node_id string
required

Example: MDQ6VGVhbTE=

permission string
required

Permission that the team will have for its repositories

Example: admin

privacy string
optional

The level of privacy this team should have

Example: closed

repositories_url string<uri>
required

Example: https://api.github.com/organizations/1/team/1/repos

slug string
required

Example: justice-league

url string<uri>
required

URL for the team

Example: https://api.github.com/organizations/1/team/1

permission string
required

Permission that the team will have for its repositories

Example: push

privacy string
optional

The level of privacy this team should have

Example: closed

repos_count integer
required

Example: 10

repositories_url string<uri>
required

Example: https://api.github.com/organizations/1/team/1/repos

slug string
required

Example: justice-league

updated_at string<date-time>
required

Example: 2017-08-17T12:37:15Z

url string<uri>
required

URL for the team

Example: https://api.github.com/organizations/1/team/1

application/json Full Team object

Response

created_at string<date-time>
required

Example: 2017-07-14T16:53:42Z

description string
requirednullable

Example: A great team.

html_url string<uri>
required

Example: https://github.com/orgs/rails/teams/core

id integer
required

Unique identifier of the team

Example: 42

ldap_dn string
optional

Distinguished Name (DN) that team maps to within LDAP environment

Example: uid=example,ou=users,dc=github,dc=com

members_count integer
required

Example: 3

members_url string
required

Example: https://api.github.com/organizations/1/team/1/members{/member}

name string
required

Name of the team

Example: Developers

node_id string
required

Example: MDQ6VGVhbTE=

organization Organization Full object
required

Organization Full

avatar_url string
required

Example: https://github.com/images/error/octocat_happy.gif

billing_email string<email>
optionalnullable

Example: [email protected]

blog string<uri>
optional

Example: https://github.com/blog

collaborators integer
optionalnullable

Example: 8

company string
optional

Example: GitHub

created_at string<date-time>
required

Example: 2008-01-14T04:33:35Z

default_repository_permission string
optionalnullable
description string
requirednullable

Example: A great organization

disk_usage integer
optionalnullable

Example: 10000

email string<email>
optional

Example: [email protected]

events_url string<uri>
required

Example: https://api.github.com/orgs/github/events

followers integer
required

Example: 20

following integer
required

Example: 0

has_organization_projects boolean
required

Example: true

has_repository_projects boolean
required

Example: true

hooks_url string
required

Example: https://api.github.com/orgs/github/hooks

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

is_verified boolean
optional

Example: true

issues_url string
required

Example: https://api.github.com/orgs/github/issues

location string
optional

Example: San Francisco

login string
required

Example: github

members_allowed_repository_creation_type string
optional

Example: all

members_can_create_internal_repositories boolean
optional

Example: true

members_can_create_pages boolean
optional

Example: true

members_can_create_private_pages boolean
optional

Example: true

members_can_create_private_repositories boolean
optional

Example: true

members_can_create_public_pages boolean
optional

Example: true

members_can_create_public_repositories boolean
optional

Example: true

members_can_create_repositories boolean
optionalnullable

Example: true

members_can_fork_private_repositories boolean
optionalnullable

Example: false

members_url string
required

Example: https://api.github.com/orgs/github/members{/member}

name string
optional

Example: github

node_id string
required

Example: MDEyOk9yZ2FuaXphdGlvbjE=

owned_private_repos integer
optional

Example: 100

plan object
optional
filled_seats integer
optional
name string
required
private_repos integer
required
seats integer
optional
space integer
required
private_gists integer
optionalnullable

Example: 81

public_gists integer
required

Example: 1

public_members_url string
required

Example: https://api.github.com/orgs/github/public_members{/member}

public_repos integer
required

Example: 2

repos_url string<uri>
required

Example: https://api.github.com/orgs/github/repos

total_private_repos integer
optional

Example: 100

twitter_username string
optionalnullable

Example: github

two_factor_requirement_enabled boolean
optionalnullable

Example: true

type string
required

Example: Organization

updated_at string<date-time>
required
url string<uri>
required

Example: https://api.github.com/orgs/github

parent Team Simple object
optionalnullable

Groups of organization members that gives permissions on specified repositories.

description string
requirednullable

Description of the team

Example: A great team.

html_url string<uri>
required

Example: https://github.com/orgs/rails/teams/core

id integer
required

Unique identifier of the team

Example: 1

ldap_dn string
optional

Distinguished Name (DN) that team maps to within LDAP environment

Example: uid=example,ou=users,dc=github,dc=com

members_url string
required

Example: https://api.github.com/organizations/1/team/1/members{/member}

name string
required

Name of the team

Example: Justice League

node_id string
required

Example: MDQ6VGVhbTE=

permission string
required

Permission that the team will have for its repositories

Example: admin

privacy string
optional

The level of privacy this team should have

Example: closed

repositories_url string<uri>
required

Example: https://api.github.com/organizations/1/team/1/repos

slug string
required

Example: justice-league

url string<uri>
required

URL for the team

Example: https://api.github.com/organizations/1/team/1

permission string
required

Permission that the team will have for its repositories

Example: push

privacy string
optional

The level of privacy this team should have

Example: closed

repos_count integer
required

Example: 10

repositories_url string<uri>
required

Example: https://api.github.com/organizations/1/team/1/repos

slug string
required

Example: justice-league

updated_at string<date-time>
required

Example: 2017-08-17T12:37:15Z

url string<uri>
required

URL for the team

Example: https://api.github.com/organizations/1/team/1

application/json Basic Error object

Forbidden

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Basic Error object

Resource not found

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required