DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teamsRemove team access restrictions
Removes push access for the specified teams from a protected branch. Provide team slugs in teams and identify the repository with owner, repo, and branch; child-team access can also be removed. The response lists the remaining teams with access after removal.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
branchstringrequired
The branch name. Must not contain wildcard characters.
Team access restriction data identifying the teams whose push access to the protected branch should be removed.
teamsarray<string>required
The slug values for teams
200Returns an array of team objects representing the teams that retain push access to the protected branch, including identifiers, names, slugs, permissions, and repository URLs.
idintegerrequired
node_idstringrequired
namestringrequired
slugstringrequired
descriptionstringrequired
privacystringoptional
notification_settingstringoptional
permissionstringrequired
permissionsobjectoptional
urlstringrequired
html_urlstringrequired
members_urlstringrequired
repositories_urlstringrequired
typestringrequired
The ownership type of the team
access_sourcestringoptional
How the team's access to the repository was granted. This property is only
present when the team is returned in a repository context, such as
`GET /repos/{owner}/{repo}/teams`.
organization_idintegeroptional
Unique identifier of the organization to which this team belongs
enterprise_idintegeroptional
Unique identifier of the enterprise to which this team belongs
parentobjectrequired
Groups of organization members that gives permissions on specified repositories.
422Returned when the request fails validation or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 422 is returned when the request fails validation or the endpoint has been spammed. Supply team slugs through teams as either an array or an object containing a teams array. branch must not contain wildcard characters.