Sample - GitHub REST API
PATCH/enterprises/{enterprise}/teams/{team_slug}

Update an enterprise team

To edit a team, the authenticated user must be an enterprise owner.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 6 body fields
enterprisestringrequired
The slug version of the enterprise name.
team_slugstringrequired
The slug of the team name.
namestringoptional
A new name for the team.
descriptionstringoptional
A new description for the team.
sync_to_organizationsstringoptional
Retired: this field is no longer supported. Whether the enterprise team should be reflected in each organization. This value cannot be changed.
Allowed:alldisabledDefault:disabled
organization_selection_typestringoptional
Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`. `disabled`: The team is not assigned to any organizations. This is the default when you create a new team. `selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments). `all`: The team is assigned to all current and future organizations in the enterprise.
Allowed:disabledselectedallDefault:disabled
group_idstringoptional
The ID of the IdP group to assign team membership with. The new IdP group will replace the existing one, or replace existing direct members if the team isn't currently linked to an IdP group.
notification_settingstringoptional
The notification setting the team is set to. The options are: * `notifications_enabled` - team members receive notifications when the team is @mentioned. * `notifications_disabled` - no one receives notifications.
Allowed:notifications_enablednotifications_disabled

2 status codes
200Response
idintegerrequired
namestringrequired
descriptionstringoptional
slugstringrequired
urlstringrequired
sync_to_organizationsstringoptional
Retired: this field will not be returned with GHEC enterprise teams.
organization_selection_typestringoptional
group_idstringrequired
group_namestringoptional
Retired: this field will not be returned with GHEC enterprise teams.
html_urlstringrequired
members_urlstringrequired
created_atstringrequired
updated_atstringrequired
notification_settingstringoptional
Whether team members will receive notifications when the team is mentioned.
Allowed:notifications_enablednotifications_disabled
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden.