Get team membership

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.

GET /teams/:team_id/memberships/:username

Note: The role for organization owners returns as maintainer. For more information about maintainer roles, see Create team.

Response if user has an active membership with team

Status: 200 OK
{
  "url": "https://api.github.com/teams/1/memberships/octocat",
  "role": "member",
  "state": "active"
}

Response if user is a team maintainer

Status: 200 OK
{
  "url": "https://api.github.com/teams/1/memberships/octocat",
  "role": "maintainer",
  "state": "active"
}

Response if user has a pending membership with team

Status: 200 OK
{
  "url": "https://api.github.com/teams/1/memberships/octocat",
  "role": "member",
  "state": "pending"
}

No membership response

Status: 404 Not Found