Note: The Nested Teams API is currently available for developers to preview. See the blog post for full details. To access the API, you must provide a custom media type in the Accept header:
application/vnd.github.hellcat-preview+json
Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact your GitHub Enterprise site administrator.
If you pass the hellcat-preview media type, 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.
Status: 200 OK
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "member",
"state": "active"
}
Status: 200 OK
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "maintainer",
"state": "active"
}
Status: 200 OK
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "member",
"state": "pending"
}
Status: 404 Not Found