Skip to main content

Get team membership for a user

Team members will include the members of child teams. To get a user's membership with 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}/memberships/{username}`. **Note:** The response contains the `state` of the membership and the member's `role`. The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/[email protected]/rest/reference/teams#create-a-team).

GET/orgs/{org}/teams/{team_slug}/memberships/{username}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
org string
required
team_slug string
required

team_slug parameter

username string
required

Responses

application/json Team Membership object

Response

role string
required

The role of the user in the team.

Example: member

state string
required

The state of the user's membership in the team.

url string<uri>
required

if user has no team membership