# Remove team access restrictions

From **GitHub v3 REST API**.

`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/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.

| Type    | Description                                                                                                                                         |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `branch`

- Location: path
- Required: true
- Type: `string`

The name of the branch.

## Request body

- Required: false
### `application/json`

```json
{"oneOf":[{"example":{"teams":["my-team"]},"properties":{"teams":{"description":"teams parameter","items":{"type":"string"},"type":"array"}},"required":["teams"],"type":"object"},{"description":"teams parameter","items":{"type":"string"},"type":"array"}]}
```

## Responses

### `200`

Response

### `application/json`

- Type: `array`

```json
[
  {
    "description": "A great team.",
    "html_url": "https://github.com/orgs/github/teams/justice-league",
    "id": 1,
    "members_url": "https://api.github.com/teams/1/members{/member}",
    "name": "Justice League",
    "node_id": "MDQ6VGVhbTE=",
    "parent": null,
    "permission": "admin",
    "privacy": "closed",
    "repositories_url": "https://api.github.com/teams/1/repos",
    "slug": "justice-league",
    "url": "https://api.github.com/teams/1"
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/team"},"type":"array"}
```

### `422`

Validation failed

### `application/json`

- Type: `object`

Validation Error

```json
{"description":"Validation Error","properties":{"documentation_url":{"type":"string"},"errors":{"items":{"properties":{"code":{"type":"string"},"field":{"type":"string"},"index":{"type":"integer"},"message":{"type":"string"},"resource":{"type":"string"},"value":{"oneOf":[{"nullable":true,"type":"string"},{"nullable":true,"type":"integer"},{"items":{"type":"string"},"nullable":true,"type":"array"}]}},"required":["code"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["message","documentation_url"],"title":"Validation Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request DELETE \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams \
  --header 'content-type: application/json' \
  --data 'string'
```
