DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}
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.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
[!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
andteam_id
using the routeDELETE /organizations/{org_id}/team/{team_id}/memberships/{username}
.
Servers
- https://api.github.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
username |
String | Yes |
The handle for the GitHub user account. |
team_slug |
String | Yes |
The slug of the team name. |
org |
String | Yes |
The organization name. The name is not case sensitive. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.