API
tryapis.com
Find anything
⌘ K
GitHub API Endpoints
actions
activity
apps
billing
checks
code-scanning
codes-of-conduct
emojis
enterprise-admin
gists
git
gitignore
interactions
issues
licenses
markdown
meta
migrations
oauth-authorizations
orgs
packages
projects
pulls
rate-limit
reactions
repos
scim
search
secret-scanning
teams
Get an external group

GET

List external groups in an organization

GET

List IdP groups for an organization

GET

List teams

GET

Create a team

POST

Get a team by name

GET

Update a team

PATCH

Delete a team

DELETE

List discussions

GET

Create a discussion

POST

Get a discussion

GET

Update a discussion

PATCH

Delete a discussion

DELETE

List discussion comments

GET

Create a discussion comment

POST

Get a discussion comment

GET

Update a discussion comment

PATCH

Delete a discussion comment

DELETE

Update the connection between an external group and a team

PATCH

Remove the connection between an external group and a team

DELETE

List pending team invitations

GET

List team members

GET

Get team membership for a user

GET

Add or update team membership for a user

PUT

Remove team membership for a user

DELETE

List team projects

GET

Check team permissions for a project

GET

Add or update team project permissions

PUT

Remove a project from a team

DELETE

List team repositories

GET

Check team permissions for a repository

GET

Add or update team repository permissions

PUT

Remove a repository from a team

DELETE

List IdP groups for a team

GET

Create or update IdP group connections

PATCH

List child teams

GET

Get a team (Legacy)

GET

Update a team (Legacy)

PATCH

Delete a team (Legacy)

DELETE

List discussions (Legacy)

GET

Create a discussion (Legacy)

POST

Get a discussion (Legacy)

GET

Update a discussion (Legacy)

PATCH

Delete a discussion (Legacy)

DELETE

List discussion comments (Legacy)

GET

Create a discussion comment (Legacy)

POST

Get a discussion comment (Legacy)

GET

Update a discussion comment (Legacy)

PATCH

Delete a discussion comment (Legacy)

DELETE

List pending team invitations (Legacy)

GET

List team members (Legacy)

GET

Get team member (Legacy)

GET

Add team member (Legacy)

PUT

Remove team member (Legacy)

DELETE

Get team membership for a user (Legacy)

GET

Add or update team membership for a user (Legacy)

PUT

Remove team membership for a user (Legacy)

DELETE

List team projects (Legacy)

GET

Check team permissions for a project (Legacy)

GET

Add or update team project permissions (Legacy)

PUT

Remove a project from a team (Legacy)

DELETE

List team repositories (Legacy)

GET

Check team permissions for a repository (Legacy)

GET

Add or update team repository permissions (Legacy)

PUT

Remove a repository from a team (Legacy)

DELETE

List IdP groups for a team (Legacy)

GET

Create or update IdP group connections (Legacy)

PATCH

List child teams (Legacy)

GET

List teams for the authenticated user

GET

users

DELETE

https://api.github.com/orgs/org/teams/team_slug/memberships/username

Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.

Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub."

Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}.

Scopes requested: user, public_repo, repo, notifications, gist
Authorization
tryapis.com never stores your requests or responses