# Replace preferences key

Saves one of the signed-in person's own app preferences. `key` must be namespaced, like `setting:theme` or `table:leads`; body: `{"value": <json>}`, stored opaquely and handed back unread, where a JSON null clears the preference and anything over 64KB is refused. It writes the caller's own row and nobody else's; the workspace-wide default under the same key is `put_workspace_preferences_key`, which is an admin's.

Access class: `workspace`.

## Endpoint

`PUT /v1/preferences/{key}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "value": "string"
  },
  "params": {
    ":key": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "key": "string",
    "updatedAt": "string",
    "value": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
