> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bland.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Agent Branch

> Abandon an open branch without merging it.

### Overview

Closes an open branch without landing its changes on dev. The branch disappears from [List Agent Branches](https://docs.bland.ai/api-v2/get/agents-id-branches.md) and can no longer be rebased or merged; versions already saved to it are kept for the record. To land the changes instead, use [Merge Agent Branch](https://docs.bland.ai/api-v2/post/agents-id-branches-branch-id-merge.md).

Requires an admin, owner, operator, or prompter role.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

**agent\_id** `string` *required*

The agent's unique identifier.

**branch\_id** `string` *required*

The branch's unique identifier. Returns `404 BRANCH_NOT_FOUND` if the branch does not belong to this agent or has already been merged or deleted.

### Response

**data.deleted** `boolean`

Always `true` on success.

**errors** `null | array`

`null` on success, or a list of error objects if the request failed.

```json Response theme={null}
{
  "data": {
    "deleted": true
  },
  "errors": null
}
```

```json Branch Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "BRANCH_NOT_FOUND",
      "message": "Branch not found"
    }
  ]
}
```

```json Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "NOT_FOUND",
      "message": "Agent not found"
    }
  ]
}
```

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.