v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2023-07-147873273.9 MB
teams

Get team membership for a user (Legacy)

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 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.

get/teams/{team_id}/memberships/{username}

Path parameters

team_idinteger required

The unique identifier of the team.

usernamestring required

The handle for the GitHub user account.

Response

Response

urlstring uri required
role'member' | 'maintainer' required

The role of the user in the team.

state'active' | 'pending' required

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

Example response

{
  "role": "member"
}