# Unlink a wallet

Source: https://langbot.ai/docs/api/bots/unlink-wallet

`DELETE /v1/bots/{bot_id}/wallets/{wallet_id}`

Stop attaching a wallet's fills. Fills already attached stay in the bot's history.

**Auth.** An account token (`Authorization: Bearer lb_…`) or a signed-in web session. A report-only token (`lbr_…`) is refused here with `403 scope_denied`.

**Limits.** Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).

## Parameters

### Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `bot_id` | string | yes | The bot id (`bot_…`). |
| `wallet_id` | string | yes | The wallet id (`bw_…`). |

## Request

**curl**

```bash
curl -X DELETE "https://api.langbot.ai/v1/bots/bot_01M6G72RFQRQ8JGNG8T1447GGP/wallets/bw_01M6G72VJ4YE3V9SPJRKD7NK0W" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"
```

**Python**

```python
from langbot import LangbotClient

async with LangbotClient() as lb:  # reads LANGBOT_API_TOKEN
    await lb.bots.unlink_wallet("bot_01M6G72RFQRQ8JGNG8T1447GGP", "bw_01M6G72VJ4YE3V9SPJRKD7NK0W")
```

**TypeScript**

```ts
import { LangbotClient } from "@langbotai/sdk";

const lb = new LangbotClient(); // reads LANGBOT_API_TOKEN
await lb.bots.unlinkWallet("bot_01M6G72RFQRQ8JGNG8T1447GGP", "bw_01M6G72VJ4YE3V9SPJRKD7NK0W");
```

## Response

`204 No Content`

## Errors

| Status | `code` | When |
|---|---|---|
| 404 | `not_found` | No such bot or linked wallet on your account. |
| 401 | `auth_required` | No token was sent. |
| 401 | `token_invalid` | The token was not recognised (mistyped, revoked or expired). |
| 422 | `validation_error` | A parameter failed validation; `detail[].loc` names it. |
| 429 | `rate_limited` | Over your request budget; wait `Retry-After` seconds. |

Every error body is `{"detail": …, "code": "…"}`; branch on `code`. All codes: [Errors](https://langbot.ai/docs/api#errors).
