# Update Key

> Stores a string value under the given key for the authenticated profile (upsert).
This is a general-purpose key-value store used for per-profile data such as watchlists,
UI preferences, notes, or account-level configuration. Callers may store any text;
JSON-encoded objects are common but not required.
Max body size: 128 KB. Keys must match ^[A-Za-z0-9_\-:#]+$ (max 256 chars).


Source: /trader/api/settings/update-client-setting

## `PUT /settings/{key}`

**Update Key**

Stores a string value under the given key for the authenticated profile (upsert).
This is a general-purpose key-value store used for per-profile data such as watchlists,
UI preferences, notes, or account-level configuration. Callers may store any text;
JSON-encoded objects are common but not required.
Max body size: 128 KB. Keys must match ^[A-Za-z0-9_\-:#]+$ (max 256 chars).


Tags: `Settings`

#### Path parameters

- `key` (string) (required) — Setting key (pattern: ^[A-Za-z0-9_\-:#]+$, max 256 chars)


### Request body

**Content-Type:** `application/json`

Request body for creating or updating a client setting. The value is stored as-is; callers may store any text up to the 128 KB body limit. JSON-encoded objects are a common pattern but the server treats the value as an opaque string.

- `value` (string) (required) — The string value to store. Any text is accepted; callers typically JSON-encode structured data. Max ~128 KB (enforced by body size limit).


### Responses

#### `204` — Setting updated successfully (no body)

#### `400` — Invalid key format or malformed body

**Content-Type:** `application/json`

- `error` (object) (required)
  - `type` (string) (required) — Error type code
  - `message` (string) (required) — Human-readable error message
  - `field` (string) — Field name if error is field-specific

#### `401` — Unauthorized

**Content-Type:** `application/json`



#### `500` — Internal server error

**Content-Type:** `application/json`



