Skip to main content

members

Overview

Namemembers
TypeResource
Idgithub.teams.members

Fields

NameDatatype
idinteger
namestring
avatar_urlstring
emailstring
events_urlstring
followers_urlstring
following_urlstring
gists_urlstring
gravatar_idstring
html_urlstring
loginstring
node_idstring
organizations_urlstring
received_events_urlstring
repos_urlstring
site_adminboolean
starred_atstring
starred_urlstring
subscriptions_urlstring
typestring
urlstring

Methods

NameAccessible byRequired ParamsDescription
list_members_in_orgSELECTorg, team_slugTeam members will include the members of child teams.

To list members in a team, the team must be visible to the authenticated user.
list_members_legacySELECTteam_idDeprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List team members endpoint.

Team members will include the members of child teams.
remove_member_legacyDELETEteam_id, usernameThe "Remove team member" endpoint (described below) is deprecated.

We recommend using the Remove team membership for a user endpoint instead. It allows you to remove both active and pending memberships.

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.

Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub."
add_member_legacyEXECteam_id, usernameThe "Add team member" endpoint (described below) is deprecated.

We recommend using the Add or update team membership for a user endpoint instead. It allows you to invite new organization members to your teams.

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.

Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub."

Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."
get_member_legacyEXECteam_id, usernameThe "Get team member" endpoint (described below) is deprecated.

We recommend using the Get team membership for a user endpoint instead. It allows you to get both active and pending memberships.

To list members in a team, the team must be visible to the authenticated user.