Skip to main content

Get team membership for a user (Legacy)

Deprecated

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/[email protected]/rest/reference/teams#get-team-membership-for-a-user) endpoint. 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:** 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 [Create a team](https://docs.github.com/[email protected]/rest/reference/teams#create-a-team).

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

Request

Path Parameters
team_id integer
required
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
application/json Basic Error object

Resource not found

documentation_url string
optional
message string
optional
status string
optional
url string
optional