REST API endpoints for enterprise team memberships

Use the REST API to create and manage membership of enterprise teams in your GitHub enterprise.

About enterprise team members

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.

List enterprise teams for a user

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/members/USERNAME/teams

Response schema (Status: 200):

Array of Enterprise Team:

List members in an enterprise team

GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships

Lists all team members in an enterprise team.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships

Response schema (Status: 200):

Array of Simple User:

Bulk add team members

POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add

Add multiple team members to an enterprise team.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

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.

Bulk remove team members

POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove

Remove multiple team members from an enterprise team.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

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 enterprise team membership

GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}

Returns whether the user is a member of the enterprise team.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/USERNAME

Response schema (Status: 200):

Add team member

PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}

Add a team member to an enterprise team.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

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.

Remove team membership

DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}

Remove membership of a specific user from a particular team in an enterprise.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/memberships/USERNAME

Response schema (Status: 204):