# Update dashboard preferences

Merges the body into the caller’s stored preference bag key by key and returns the whole merged bag. A key sent as `null` is deleted; keys left out keep their value. The merged bag may hold at most 50 keys of at most 64 characters each and must serialize to at most 16384 bytes. Space IDs in `spaceFavorites` and `spaceOrders` that do not name a live Space are dropped on write. Requires a browser session; read the current bag from `GET /v1/me`.

## PATCH `/v1/me/dashboard-preferences`

### Authorization

`Authorization` Bearer token · header required

\`Authorization: Bearer <token>\` with an API key (\`sfa\_\` prefix), an OAuth access token, a session token, or a Space machine credential (\`sfm\_\` prefix).

### Request body

required `application/json`

Preference keys to merge into the stored bag. A key sent as \`null\` is deleted, any other key is overwritten, and keys left out keep their stored value. The merged bag must stay within 50 keys, 64 characters per key, and 16384 bytes; IDs under \`spaceFavorites\` and \`spaceOrders\` that do not name a live Space are dropped as it is written.

`object`

## Responses

### 200 Response for status 200

`$schema` string <uri>

Canonical JSON Schema URL for this response body. The server also sends it in the \`Link: rel="describedby"\` response header.

`data` object required

One signed-in user's dashboard preferences, as an open key/value bag. Values are arbitrary JSON and each dashboard surface owns the meaning of its own key, so read a key with the schema that surface publishes.

### default Error
Every 4xx and 5xx response is one RFC 9457 problem document served as \`application/problem+json\`.

`$schema` string <uri>

Canonical JSON Schema URL for this response body. The server also sends it in the \`Link: rel="describedby"\` response header.

`type` string required

URL of the documentation page for this error. Derived from \`code\`.

`title` string required

Human-readable name of the error type. Derived from \`code\`.

`status` integer required

HTTP status of the response, repeated in the body.

min -9007199254740991 · max 9007199254740991

`detail` string required

What went wrong in this request.

`code` string required

Stable snake\_case error code. Match on this, not on \`detail\`.

`pointer` string

RFC 6901 JSON Pointer to the request field or batch entry that failed, for example \`/files/37/path\`. Present on validation failures.

`details` object

Machine-readable context keyed by the error code.

`suggestions` string[]

Recovery steps safe to show to a person.

`next` string[]

Commands or API requests to run next, usable as written.

`requestId` string required

ID of this request, from the \`X-Request-Id\` header or generated. Quote it when contacting support.

### Try it

#### Server

Base URL https://api.spacefast.com

#### Authorization

Bearer token Remember on this device Include my values in samples

#### Body application/json

### Request body

Send

### Request

#### cURL
```
curl -X PATCH "https://api.spacefast.com/v1/me/dashboard-preferences" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "property1": null,
  "property2": null
}'
```

#### JavaScript
```
const response = await fetch("https://api.spacefast.com/v1/me/dashboard-preferences", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"property1\": null,\n  \"property2\": null\n}"
});
```

#### Python
```
import requests

response = requests.patch(
    "https://api.spacefast.com/v1/me/dashboard-preferences",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json"
    },
    data="{\n  \"property1\": null,\n  \"property2\": null\n}",
)
```

### Response

#### 200 default
```
{
  "$schema": "http://example.com",
  "data": {
    "property1": null,
    "property2": null
  }
}
```

```
{
  "$schema": "http://example.com",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [\
    "string"\\
  ],
  "next": [\
    "string"\\
  ],
  "requestId": "string"
}
```
