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

# Remove user access restrictions

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

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.7/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

Removes the ability of a user to push to this branch.

| Type    | Description                                                                                                                                   |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |

## Path parameters

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

## Request body

- union
  - object
    - `users` string[], required — The username for users
  - string[]

## Response `200`

Response

- SimpleUser[]
  - `name` string, nullable
  - `email` string, nullable
  - `login` string, required
  - `id` integer, required
  - `node_id` string, required
  - `avatar_url` string, uri, required
  - `gravatar_id` string, nullable, required
  - `url` string, uri, required
  - `html_url` string, uri, required
  - `followers_url` string, uri, required
  - `following_url` string, required
  - `gists_url` string, required
  - `starred_url` string, required
  - `subscriptions_url` string, uri, required
  - `organizations_url` string, uri, required
  - `repos_url` string, uri, required
  - `events_url` string, required
  - `received_events_url` string, uri, required
  - `type` string, required
  - `site_admin` boolean, required
  - `starred_at` string

## Other responses

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

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-6.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-6/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-6/versions/15db3fa0759b/schema)
