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

# Update Account Settings

> This endpoint allows users to update account settings, such as their leaderboard privacy mode.

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

#### Operation Type (for Signing)

| Header Field | Type | Content |
| - | - | - |
| `"type"` | string | `"update_account_settings"` |

#### Request Body

<table><thead><tr><th width="176">Field</th><th width="98">Type</th><th width="95">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>`"account"`</td><td>string</td><td>required</td><td>User's wallet address</td><td>`42trU9A5...`</td></tr><tr><td>`"privacy_mode"`</td><td>string</td><td>required</td><td>Leaderboard privacy level:\
`"none"`\
`"anonymous"`\
`"hidden"`</td><td>`hidden`</td></tr><tr><td>`"timestamp"`</td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td>`1716200000000`</td></tr><tr><td>`"expiry_window"`</td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td>`30000`</td></tr><tr><td>`"agent_wallet"`</td><td>string</td><td>optional</td><td>Agent wallet address</td><td>`69trU9A5...`</td></tr><tr><td>`"signature"`</td><td>string</td><td>required</td><td>Cryptographic signature</td><td>`5j1Vy9Uq...`</td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "privacy_mode": "hidden",
  "timestamp": 1716200000000,
  "expiry_window": 30000,
  "agent_wallet": "69trU9A5...",
  "signature": "5j1Vy9UqY..."
}
```

This endpoint changes only the settings that you send. Settings that you leave out keep their current value. The request must contain at least one setting. `privacy_mode` is currently the only setting, so you must send it.

You can sign this request with the account key or with an [agent wallet](https://docs.pacifica.fi/api-documentation/api/signing/api-agent-keys.md).

**Privacy Modes**

| Value | Leaderboard | Portfolio |
| - | - | - |
| `"none"` | Your row is listed. This is the default. | Public |
| `"anonymous"` | Your row is listed with `privacy_mode: true`. | Private |
| `"hidden"` | Your row is removed from the leaderboard and contest leaderboard responses. | Private |

To read the current value, call [Get account settings](https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-settings.md).

#### Response

* Status 200: Account settings updated successfully

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

* Status 400: Invalid request parameters or signature. A request without a setting returns this error:

```json theme={null}
{
  "success": false,
  "data": null,
  "error": "At least one setting must be provided",
  "code": 400,
  "error_id": "unspecified"
}
```

* Status 500: Internal server error

#### Code Example (Python)

```python theme={null}
import requests

payload = {
    "account": "42trU9A5...",
    "signature": "5j1Vy9Uq...",
    "timestamp": 1716200000000,
    "privacy_mode": "hidden"
}

response = requests.post(
    "/api/v1/account/settings",
    json=payload,
    headers={"Content-Type": "application/json"}
)

data = response.json()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.