---
title: "Remove team access restrictions"
method: DELETE
path: "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
tags: ["repos"]
---

# Remove team access restrictions

`DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams`

Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.8/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

Removes the ability of a team to push to this branch. You can also remove push access for child teams.

## Path parameters

- `owner` string, required
- `repo` string, required
- `branch` string, required

## Request body

- string[] — The slug values for teams

## Response `200`

Response

- Team[]
  - `id` integer, required
  - `node_id` string, required
  - `name` string, required
  - `slug` string, required
  - `description` string, nullable, required
  - `privacy` string
  - `permission` string, required
  - `permissions` object
    - `pull` boolean, required
    - `triage` boolean, required
    - `push` boolean, required
    - `maintain` boolean, required
    - `admin` boolean, required
  - `url` string, uri, required
  - `html_url` string, uri, required
  - `members_url` string, required
  - `repositories_url` string, uri, required
  - `parent` NullableTeamSimple, nullable, required — Groups of organization members that gives permissions on specified repositories.
    - `id` integer, required — Unique identifier of the team
    - `node_id` string, required
    - `url` string, uri, required — URL for the team
    - `members_url` string, required
    - `name` string, required — Name of the team
    - `description` string, nullable, required — Description of the team
    - `permission` string, required — Permission that the team will have for its repositories
    - `privacy` string — The level of privacy this team should have
    - `html_url` string, uri, required
    - `repositories_url` string, uri, required
    - `slug` string, required
    - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment

## Other responses

- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/enterprise-server.md) · [All operations](https://skmtc.net/github/apis/enterprise-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/enterprise-server/revisions/5438365412fe/schema)
