---
title: "Delete a branch restriction rule"
method: DELETE
path: "/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}"
tags: ["Branch restrictions"]
---

# Delete a branch restriction rule

`DELETE /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}`

## Request

- Base URL: `https://api.bitbucket.org/2.0`
- URL: `https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://bitbucket.org/site/oauth2/authorize`
    - Token URL: `https://bitbucket.org/site/oauth2/access_token` scopes: `repository:admin`
  - HTTP basic
  - API key in header `Authorization`

Deletes an existing branch restriction rule.

## Response `204`

## Other responses

- `401`: If the request was not authenticated
- `403`: If the authenticated user does not have admin access to the repository
- `404`: If the repository or branch restriction id does not exist

---

[API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) - [All operations](https://skmtc.dev/atlassian/apis/bitbucket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/atlassian/apis/bitbucket-api/revisions/6ae783fa75da?raw)
