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

# Detach Numbers from Agent

> Stop routing inbound calls on phone numbers to an agent.

### Overview

Removes the agent from the given phone numbers. Only numbers currently attached to this agent are affected; any others in the list are skipped and not counted. Detached numbers have no inbound assignment until you attach them somewhere else. The reverse operation is [Attach Numbers to Agent](https://docs.bland.ai/api-v2/post/agents-id-inbound-attach.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.

### Body Parameters

**inbound\_numbers** `string[]` *required*

Phone numbers to detach, each exactly as it appears on your account (for example `+18005551234`). Must be a non-empty array of non-empty strings; surrounding whitespace is trimmed. Returns `400 INVALID_BODY` otherwise.

### Response

**data.agent\_id** `string`

The agent ID from the request path.

**data.detached\_count** `integer`

How many of the given numbers were attached to this agent and are now detached. `0` when none were, including when the agent has never had numbers attached or the agent ID is unknown. This endpoint does not return `404` for an unknown agent.

**errors** `null | array`

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

```json Response theme={null}
{
  "data": {
    "agent_id": "8a60ad62-9f9e-4d97-817f-ac47ee2639cc",
    "detached_count": 2
  },
  "errors": null
}
```

```json Invalid Body theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "INVALID_BODY",
      "message": "inbound_numbers must be a non-empty array of phone numbers"
    }
  ]
}
```

***

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.