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

# Toggle Auto-Lending

> This endpoint allows users to enable or disable automatic lending.

```http theme={null}
POST /api/v1/account/settings/auto_lend_disabled
```

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

#### Request Body

<table><thead><tr><th width="200">Field</th><th width="98">Type</th><th width="95">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"account"</code></td><td>string</td><td>required</td><td>User's 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>"disabled"</code></td><td>boolean or null</td><td>optional</td><td>Set to <code>true</code> to disable auto-lending, <code>false</code> to enable, or <code>null</code> to clear (return to default)</td><td><code>true</code></td></tr><tr><td><code>"agent\_wallet"</code></td><td>string</td><td>optional</td><td>Agent wallet address</td><td><code>8zFqj1Kp...</code></td></tr><tr><td><code>"expiry\_window"</code></td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td><code>10000</code></td></tr></tbody></table>

#### Response

* Status 200: Successfully updated auto-lending setting

```json theme={null}
{
  "success": true
}
```

* Status 400: Invalid request parameters
* Status 401: Unauthorized access
* Status 500: Internal server error

#### Code Example (Python)

```python theme={null}
import requests

# Disable auto-lending
payload = {
    "account": "42trU9A5...",
    "signature": "5J3mBbAH...",
    "timestamp": 1716200000000,
    "disabled": True,
}

response = requests.post(
    "/api/v1/account/settings/auto_lend_disabled",
    json=payload,
    headers={"Accept": "*/*"},
)

data = response.json()
```
