---
title: "Delete a repository branch"
method: DELETE
path: "/api/v4/projects/{id}/repository/branches/{branch}"
tags: ["branches"]
---

# Delete a repository branch

`DELETE /api/v4/projects/{id}/repository/branches/{branch}`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/repository/branches/{branch}`
- Auth: none declared

Deletes a specified branch from the repository.

## Path parameters

- `id` string, required
- `branch` string, required

## Response `204`

Delete a repository branch

## Other responses

- `404`: Branch Not Found

---

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