Skip to content

List team members

GET
/orgs/{org}/teams/{team_slug}/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.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

team_slug
required
string

The slug of the team name.

role
string
default: all
Allowed values: member maintainer all

Filters members returned by their role in the team.

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

Response

Media type application/json
Array<object>
Team Member

A user that is a member of a team, including their role on the team and whether the membership is inherited from a child team.

object
name
string
nullable
email
string
nullable
login
required
string
id
required
integer format: int64
node_id
required
string
avatar_url
required
string format: uri
gravatar_id
required
string
nullable
url
required
string format: uri
html_url
required
string format: uri
followers_url
required
string format: uri
following_url
required
string
gists_url
required
string
starred_url
required
string
subscriptions_url
required
string format: uri
organizations_url
required
string format: uri
repos_url
required
string format: uri
events_url
required
string
received_events_url
required
string format: uri
type
required
string
site_admin
required
boolean
starred_at
string
user_view_type
string
role

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.

string
Allowed values: member maintainer
inherited

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.

boolean
Examples
Example default
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false,
"role": "member",
"inherited": false
}
]
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"