---
title: "DELETE /repos/{repo_id}/branches/{branch_id}"
method: DELETE
path: "/repos/{repo_id}/branches/{branch_id}"
tags: ["Repository Branch Manipulation"]
---

# DELETE /repos/{repo_id}/branches/{branch_id}

`DELETE /repos/{repo_id}/branches/{branch_id}`

## Request

- Base URL: `https://api.diversion.dev/v0`
- URL: `https://api.diversion.dev/v0/repos/{repo_id}/branches/{branch_id}`
- Auth: OAuth 2
  - Implicit: `https://auth.diversion.dev/oauth2/authorize`
  - Scopes: `coreapi/write`
- TypeScript: <https://skmtc.dev/diversion/apis/diversion-core-api/docs/repos/:repo_id/branches/:branch_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete a branch

## Response `204`

Request completed successfully

## Other responses

- `400`: The request does not meet the required conditions
- `default`: An error occurred

---

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