# Replace workspace preferences key

Publish one shared default for the whole workspace as {"value": <json>}; JSON null clears it. The key must be namespaced ('table:leads', 'setting:theme') and an oversized value is refused. ADMIN ONLY, unlike the read beside it — a member setting their own override uses PUT /v1/preferences/:key.

Access class: `workspace:admin`.

## Endpoint

`PUT /v1/workspace/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",
    "updatedBy": 1,
    "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"
}
```
