# Disconnect a sender from an agent

> Stop the agent answering on this sender. The agent's primary sender is part of the agent itself and cannot be disconnected here.

`DELETE https://api.zavu.dev/v1/agents/{agentId}/senders/{senderId}`

Stop the agent answering on this sender. The agent's primary sender is part of the agent itself and cannot be disconnected here.

## Parameters

- `agentId` (path, string, required): Agent ID.
- `senderId` (path, string, required)

## Responses

### 204

Sender disconnected.

### 400

That sender is the agent's primary, or is not connected to it.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Agent not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X DELETE "https://api.zavu.dev/v1/agents/agent_abc123/senders/sender_abc123" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

await zavu.agents.senders.disconnect("sender_abc123", {
  agentId: "agent_abc123",
});
```
