Get team membership for a user (Legacy)
Deprecated GET
/teams/{team_id}/memberships/{username} https://api.github.com
[!WARNING] Endpoint closing down notice: This endpoint route is closing down 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.
Parameters
path Path Parameters
| Name | Type |
|---|---|
team_id
required
The unique identifier of the team. | number |
username
required
The handle for the GitHub user account. | string |
Responses
200 application/json
Response
interface TeamMembership {
url: string;
role: "member" | "maintainer";
state: "active" | "pending";
}
url: string;
role: "member" | "maintainer";
state: "active" | "pending";
}
Client Errors
404 application/json
Resource not found
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}