← All tags

Enterprise-Team-Memberships API Reference

Endpoints to manage GitHub Enterprise Team memberships.

6 endpoints tagged enterprise-team-memberships, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List members in an enterprise team

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

Lists all team members in an enterprise team.

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.
enterprise-teampathyesThe slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Bulk add team members

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

Add multiple team members to an enterprise team.

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.
enterprise-teampathyesThe slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

Responses

StatusDescriptionHas JSON body
200Successfully added team members.yes

Bulk remove team members

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

Remove multiple team members from an enterprise team.

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.
enterprise-teampathyesThe slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

Responses

StatusDescriptionHas JSON body
200Successfully removed team members.yes

Get enterprise team membership

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

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

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.
enterprise-teampathyesThe slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
usernamepathyesThe handle for the GitHub user account.

Responses

StatusDescriptionHas JSON body
200User is a member of the enterprise team.yes

Add team member

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

Add a team member to an enterprise team.

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.
enterprise-teampathyesThe slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
usernamepathyesThe handle for the GitHub user account.

Responses

StatusDescriptionHas JSON body
201Successfully added team memberyes

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

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.
enterprise-teampathyesThe slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
usernamepathyesThe handle for the GitHub user account.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes