Sample - GitHub REST API
POST/enterprises/{enterprise}/teams

Create an enterprise team

To create an enterprise team, the authenticated user must be an owner of the enterprise.

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

1 parameter · 6 body fields
enterprisestringrequired
The slug version of the enterprise name.
namestringrequired
The name of the team.
descriptionstringoptional
A description of 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 set.
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) endpoint. `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. You can get this value from the [REST API endpoints for SCIM](https://docs.github.com/rest/scim#list-provisioned-scim-groups-for-an-enterprise).
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. Default: `notifications_enabled`
Allowed:notifications_enablednotifications_disabled

1 status code
201Response
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