Sample - GitHub REST API
GET/orgs/{org}/teams/{team_slug}/members

List team members

Team members will include the members of child teams.

Each member includes their role on the team (member or maintainer) and an inherited flag indicating whether the membership is inherited from a child team (true) or is a direct membership (false). These fields let you read a member's role and direct/inherited status without additional requests.

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

[!NOTE] You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/members.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
orgstringrequired
The organization name. The name is not case sensitive.
team_slugstringrequired
The slug of the team name.
rolestringoptional
Filters members returned by their role in the team.
Allowed:membermaintainerallDefault:all
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1

1 status code
200Response
namestringoptional
emailstringoptional
loginstringrequired
idintegerrequired
node_idstringrequired
avatar_urlstringrequired
gravatar_idstringrequired
urlstringrequired
html_urlstringrequired
followers_urlstringrequired
following_urlstringrequired
gists_urlstringrequired
starred_urlstringrequired
subscriptions_urlstringrequired
organizations_urlstringrequired
repos_urlstringrequired
events_urlstringrequired
received_events_urlstringrequired
typestringrequired
site_adminbooleanrequired
starred_atstringoptional
user_view_typestringoptional
rolestringoptional
The member's role on the team. Only present on the `List team members` endpoint, and only when the feature is enabled for the organization.
Allowed:membermaintainer
inheritedbooleanoptional
Whether the user is a member of the team only through a child team. `true` means the membership is inherited from a child team; `false` means the user is a direct (immediate) member of the team. Only present on the `List team members` endpoint, and only when the feature is enabled for the organization.