PATCH
/orgs/{org}/teams/{team_slug}Update a team
To edit a team, the authenticated user must either be an organization owner or a team maintainer.
[!NOTE] You can also specify a team by
org_idandteam_idusing the routePATCH /organizations/{org_id}/team/{team_id}.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
team_slugstringrequired
The slug of the team name.
namestringoptional
The name of the team.
descriptionstringoptional
The description of the team.
privacystringoptional
The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. 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.
notification_settingstringoptional
The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are:
* `notifications_enabled` - team members receive notifications when the team is @mentioned.
* `notifications_disabled` - no one receives notifications.
permissionstringoptional
**Closing down notice**. The permission that new repositories will be added to the team with when none is specified.
parent_team_idintegeroptional
The ID of a team to set as the parent team.
parent_team_slugstringoptional
The slug of a team to set as the parent team. Ignored when `parent_team_id` is also provided.
200Response when the updated information already exists
idintegerrequired
Unique identifier of the team
node_idstringrequired
urlstringrequired
URL for the team
html_urlstringrequired
namestringrequired
Name of the team
slugstringrequired
descriptionstringrequired
privacystringoptional
The level of privacy this team should have
notification_settingstringoptional
The notification setting the team has set
permissionstringrequired
Permission that the team will have for its repositories
members_urlstringrequired
repositories_urlstringrequired
parentobjectoptional
Groups of organization members that gives permissions on specified repositories.
members_countintegerrequired
repos_countintegerrequired
created_atstringrequired
updated_atstringrequired
organizationobjectrequired
Team Organization
ldap_dnstringoptional
The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.
typestringrequired
The ownership type of the team
organization_idintegeroptional
Unique identifier of the organization to which this team belongs
enterprise_idintegeroptional
Unique identifier of the enterprise to which this team belongs
201Response
idintegerrequired
Unique identifier of the team
node_idstringrequired
urlstringrequired
URL for the team
html_urlstringrequired
namestringrequired
Name of the team
slugstringrequired
descriptionstringrequired
privacystringoptional
The level of privacy this team should have
notification_settingstringoptional
The notification setting the team has set
permissionstringrequired
Permission that the team will have for its repositories
members_urlstringrequired
repositories_urlstringrequired
parentobjectoptional
Groups of organization members that gives permissions on specified repositories.
members_countintegerrequired
repos_countintegerrequired
created_atstringrequired
updated_atstringrequired
organizationobjectrequired
Team Organization
ldap_dnstringoptional
The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.
typestringrequired
The ownership type of the team
organization_idintegeroptional
Unique identifier of the organization to which this team belongs
enterprise_idintegeroptional
Unique identifier of the enterprise to which this team belongs
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.