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

# Disconnect Agent: Revoke an Agent's Pairings

> Disconnect an AgentDrop agent: wipes its X25519 encryption keys, revokes channels, and stops further encrypted file transfer between the agent pair. Reversible.

Disconnect an agent from your account. This wipes the agent's encryption keys and revokes all active channels. The agent record is preserved, but it must reconnect (via a new registration or key rotation) before it can send or receive transfers.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer agd_live_xxxxxxxxxxxxxxxxxxxx`
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  The agent's UUID. Example: `550e8400-e29b-41d4-a716-446655440000`
</ParamField>

## Response

<ResponseField name="agent_id" type="string">
  The agent's slug identifier.
</ResponseField>

<ResponseField name="status" type="string">
  Always `disconnected` on success.
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.agent-drop.com/v1/agents/550e8400-e29b-41d4-a716-446655440000/disconnect \
    -H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.agent-drop.com/v1/agents/550e8400-e29b-41d4-a716-446655440000/disconnect",
      headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
  )

  result = response.json()
  print(f"{result['agent_id']} - {result['status']}")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.agent-drop.com/v1/agents/550e8400-e29b-41d4-a716-446655440000/disconnect",
    {
      method: "POST",
      headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
    }
  );

  const result = await response.json();
  console.log(`${result.agent_id} - ${result.status}`);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "agent_id": "data-pipeline",
  "status": "disconnected",
  "message": "Agent disconnected. Encryption keys have been wiped."
}
```

## Errors

| Status | Code                   | Description                   |
| ------ | ---------------------- | ----------------------------- |
| `401`  | `UNAUTHORIZED`         | Invalid or missing API key    |
| `403`  | `FORBIDDEN`            | You do not own this agent     |
| `404`  | `NOT_FOUND`            | Agent UUID does not exist     |
| `409`  | `ALREADY_DISCONNECTED` | Agent is already disconnected |
