---
title: "Delete a branch"
method: DELETE
path: "/organizations/{organizationID}/projects/{projectID}/branches/{branchID}"
tags: ["Branches"]
---

# Delete a branch

`DELETE /organizations/{organizationID}/projects/{projectID}/branches/{branchID}`

## Request

- Base URL: `https://api.xata.tech`
- URL: `https://api.xata.tech/organizations/{organizationID}/projects/{projectID}/branches/{branchID}`
- Auth: OAuth 2
  - Implicit: `https://auth.xata.io/realms/xata/protocol/openid-connect/auth`
  - Scopes: `branch:write`

Permanently deletes a specific branch by its ID and all associated data. This action cannot be undone.

## Path parameters

- `organizationID` string, required
- `projectID` string, required
- `branchID` string, required

## Response `204`

Branch successfully deleted

## Other responses

- `400`: Generic error response for most error conditions
- `401`: Error response when authentication or authorization fails
- `404`: Generic error response for most error conditions
- `5XX`: Unexpected Error
- `default`: Unexpected Error

---

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