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

# Withdraw From Vault

> Redeem vault shares and withdraw funds from a vault.

```http theme={null}
POST /api/v1/lake/withdraw
```

The operation type for signing is `"withdraw_from_lake"`.

Use this endpoint to redeem shares from a vault. Withdrawals are idempotent when an `idempotency_key` is supplied.

#### Request Body

<table><thead><tr><th width="180">Field</th><th width="110">Type</th><th width="90">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"account"</code></td><td>string</td><td>required</td><td>Depositor wallet address</td><td><code>42trU9A5...</code></td></tr><tr><td><code>"signature"</code></td><td>string</td><td>required</td><td>Cryptographic signature</td><td><code>5J3mBbAH...</code></td></tr><tr><td><code>"timestamp"</code></td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td><code>1716200000000</code></td></tr><tr><td><code>"lake"</code></td><td>string</td><td>required</td><td>Vault address</td><td><code>AbCdEfGh123456789...</code></td></tr><tr><td><code>"shares"</code></td><td>decimal string</td><td>required</td><td>Number of shares to redeem</td><td><code>50.00</code></td></tr><tr><td><code>"idempotency\_key"</code></td><td>UUID string</td><td>optional</td><td>Client-generated key to prevent duplicate withdrawals</td><td><code>550e8400-e29b-41d4-a716-446655440000</code></td></tr><tr><td><code>"agent\_wallet"</code></td><td>string</td><td>optional</td><td>Agent wallet address</td><td><code>69trU9A5...</code></td></tr><tr><td><code>"expiry\_window"</code></td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td><code>30000</code></td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "signature": "5J3mBbAH...",
  "timestamp": 1716200000000,
  "lake": "AbCdEfGh123456789...",
  "shares": "50.00",
  "idempotency_key": "550e8400-e29b-41d4-a716-446655440000"
}
```

#### Response

* Status 200: Withdrawal successful

```json theme={null}
{
  "success": true,
  "data": {
    "amount_withdrawn": "500.00"
  },
  "error": null,
  "code": null
}
```

| Field                | Type           | Description                    |
| -------------------- | -------------- | ------------------------------ |
| `'amount_withdrawn'` | decimal string | USDC returned to the depositor |

* Status 400: Invalid request parameters
* Status 401: Unauthorized access
* Status 409: Duplicate idempotency key
* Status 500: Internal server error
