> ## 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

> Soft-delete an agent. Versions and history are kept.

### Overview

Marks the agent deleted. It disappears from [List Agents](https://docs.bland.ai/api-v2/get/agents.md) and returns `404` from [Get Agent](https://docs.bland.ai/api-v2/get/agents-id.md), but its versions, deployments, and history are retained. Alerts scoped to the agent are deleted with it.

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

You can also delete an agent from the dashboard. See [Delete an agent](https://docs.bland.ai/agents/agent-builder.md#delete-an-agent).

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

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

The agent's unique identifier.

### Response

**data.id** `string`

The deleted agent's ID.

**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": {
    "id": "bc526394-c150-4983-bbfb-c84d1d9653f4",
    "deleted": true
  },
  "errors": null
}
```

```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.