Use the REST API to create and manage enterprise teams in your GitHub enterprise.
These endpoints are only available to authenticated members of the enterprise team's enterprise with classic personal access tokens with the read:enterprise scope for GET APIs and admin:enterprise for other APIs.
These endpoints are not compatible with fine-grained personal access tokens or GitHub App access tokens.
GitHub generates the enterprise team's slug from the team name and adds the ent: prefix.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /enterprises/{enterprise}/teams
List all teams in the enterprise for the authenticated user
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
403 - Forbidden
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/teams
Response schema (Status: 200):
Array of Enterprise Team:
id: required, integer, format: int64name: required, stringdescription: stringslug: required, stringurl: required, string, format: urisync_to_organizations: stringorganization_selection_type: stringgroup_id: required, string or nullgroup_name: string or nullhtml_url: required, string, format: urimembers_url: required, stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timenotification_setting: string, enum: notifications_enabled, notifications_disabledPOST /enterprises/{enterprise}/teams
To create an enterprise team, the authenticated user must be an owner of the enterprise.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)name (string) (required)
The name of the team.
description (string or null)
A description of the team.
sync_to_organizations (string)
Retired: this field is no longer supported.
Whether the enterprise team should be reflected in each organization.
This value cannot be set.
Default: disabled
Can be one of: all, disabled
organization_selection_type (string)
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 endpoint.
all: The team is assigned to all current and future organizations in the enterprise.
Default: disabled
Can be one of: disabled, selected, all
group_id (string or null)
The ID of the IdP group to assign team membership with. You can get this value from the REST API endpoints for SCIM.
notification_setting (string)
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
Can be one of: notifications_enabled, notifications_disabled
Request:
curl -L \
-X POST \
https://api.github.com/enterprises/ENTERPRISE/teams \
-d '{
"name": "Justice League",
"description": "A great team.",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021"
}'
Response schema (Status: 201):
id: required, integer, format: int64name: required, stringdescription: stringslug: required, stringurl: required, string, format: urisync_to_organizations: stringorganization_selection_type: stringgroup_id: required, string or nullgroup_name: string or nullhtml_url: required, string, format: urimembers_url: required, stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timenotification_setting: string, enum: notifications_enabled, notifications_disabledGET /enterprises/{enterprise}/teams/{team_slug}
Gets a team using the team's slug. To create the slug, GitHub replaces special characters in the name string, changes all words to lowercase, and replaces spaces with a - separator and adds the "ent:" prefix. For example, "My TEam Näme" would become ent:my-team-name.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
team_slug (string) (required)
The slug of the team name.
200 - OK
403 - Forbidden
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/teams/TEAM_SLUG
Response schema (Status: 200):
id: required, integer, format: int64name: required, stringdescription: stringslug: required, stringurl: required, string, format: urisync_to_organizations: stringorganization_selection_type: stringgroup_id: required, string or nullgroup_name: string or nullhtml_url: required, string, format: urimembers_url: required, stringmembers_count: required, integercreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timenotification_setting: string, enum: notifications_enabled, notifications_disabledPATCH /enterprises/{enterprise}/teams/{team_slug}
To edit a team, the authenticated user must be an enterprise owner.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
team_slug (string) (required)
The slug of the team name.
name (string or null)
A new name for the team.
description (string or null)
A new description for the team.
sync_to_organizations (string)
Retired: this field is no longer supported.
Whether the enterprise team should be reflected in each organization.
This value cannot be changed.
Default: disabled
Can be one of: all, disabled
organization_selection_type (string)
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.
all: The team is assigned to all current and future organizations in the enterprise.
Default: disabled
Can be one of: disabled, selected, all
group_id (string or null)
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_setting (string)
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.
Can be one of: notifications_enabled, notifications_disabled
200 - OK
403 - Forbidden
Request:
curl -L \
-X PATCH \
https://api.github.com/enterprises/ENTERPRISE/teams/TEAM_SLUG \
-d '{
"name": "Justice League",
"description": "A great team.",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021"
}'
Response schema (Status: 200):
Same response schema as Create an enterprise team.
DELETE /enterprises/{enterprise}/teams/{team_slug}
To delete an enterprise team, the authenticated user must be an enterprise owner.
If you are an enterprise owner, deleting an enterprise team will delete all of its IdP mappings as well.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
team_slug (string) (required)
The slug of the team name.
204 - No Content
403 - Forbidden
Request:
curl -L \
-X DELETE \
https://api.github.com/enterprises/ENTERPRISE/teams/TEAM_SLUG
Response schema (Status: 204):