Use the REST API to create and manage membership of 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}/members/{username}/teams
Lists all enterprise teams that a user is a member of. This endpoint is available only for
enterprises using the new enterprise teams experience.
The authenticated user must be an enterprise owner or have the enterprise_teams:read permission.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
username (string) (required)
The handle for the GitHub user account.
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
401 - Requires authentication
403 - Forbidden
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/members/USERNAME/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_disabledGET /enterprises/{enterprise}/teams/{enterprise-team}/memberships
Lists all team members in an enterprise team.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
enterprise-team (string) (required)
The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
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
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships
Response schema (Status: 200):
Array of Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringPOST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add
Add multiple team members to an enterprise team.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
enterprise-team (string) (required)
The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
usernames (array of strings) (required)Request:
curl -L \
-X POST \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/add \
-d '{
"usernames": [
"monalisa",
"octocat"
]
}'
Response schema (Status: 200):
Same response schema as List members in an enterprise team.
POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove
Remove multiple team members from an enterprise team.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
enterprise-team (string) (required)
The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
usernames (array of strings) (required)Request:
curl -L \
-X POST \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/remove \
-d '{
"usernames": [
"monalisa",
"octocat"
]
}'
Response schema (Status: 200):
Same response schema as List members in an enterprise team.
GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}
Returns whether the user is a member of the enterprise team.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
enterprise-team (string) (required)
The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
username (string) (required)
The handle for the GitHub user account.
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/USERNAME
Response schema (Status: 200):
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringPUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}
Add a team member to an enterprise team.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
enterprise-team (string) (required)
The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
username (string) (required)
The handle for the GitHub user account.
Request:
curl -L \
-X PUT \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/USERNAME
Response schema (Status: 201):
Same response schema as Get enterprise team membership.
DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}
Remove membership of a specific user from a particular team in an enterprise.
accept (string)application/vnd.github+json is recommended.enterprise (string) (required)
The slug version of the enterprise name.
enterprise-team (string) (required)
The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
username (string) (required)
The handle for the GitHub user account.
204 - No Content
403 - Forbidden
Request:
curl -L \
-X DELETE \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/USERNAME
Response schema (Status: 204):