# Update settings

> Changes your daily targets, display preferences or body measurements. Only what you send changes.

`PATCH /settings`

Needs the **Read and write** permission.

## Body

Send any of `targets`, `preferences` and `body`. A field you leave out keeps its value.

| Field | Type | Description |
| --- | --- | --- |
| `targets` | object | A change to your daily targets, from a day on. |
| `preferences` | object | Display preferences. Only what you send changes; `null` clears a field. |
| `body` | object | Body measurements. Only what you send changes; `null` clears a field. |

## Targets

A change applies from `from`, and earlier days keep their targets. Add `through` to change only those days: the day after it goes back to the targets it had. Send `values` as `null` to have no targets from `from`.

| Field | Type | Description |
| --- | --- | --- |
| `from` | date | Required. The first day the change applies, usually today. Earlier days keep their targets. |
| `values` | object or null | Required. All four targets, or `null` to have no targets from `from`. |
| `through` | date | The last day the change applies, inclusive. Leave out to keep it from then on. |

`values` needs all four targets:

| Field | Type | Description |
| --- | --- | --- |
| `caloriesKcal` | number | Required. Energy, in kcal. |
| `proteinG` | number | Required. Protein, in grams. |
| `carbsG` | number | Required. Carbohydrates, in grams. |
| `fatG` | number | Required. Fat, in grams. |

## Preferences

| Field | Type | Description |
| --- | --- | --- |
| `units` | string or null | The units to show amounts in; `imperial` is US customary. `null` follows the phone. One of `metric`, `imperial` or `uk`. |
| `deviceUnits` | string | The units the phone uses, as the app last reported them. One of `metric`, `imperial` or `uk`. |
| `showTargets` | boolean | Whether the app shows progress towards your targets. |
| `assistantShortcut` | string or null | The assistant the app's shortcut opens, or `off`. One of `claude`, `chatgpt` or `off`. |

## Body measurements

| Field | Type | Description |
| --- | --- | --- |
| `weightKg` | number or null | Weight, in kilograms. |
| `heightCm` | number or null | Height, in centimetres. |
| `age` | integer or null | Age, in years. From 1 to 130. |
| `sex` | string or null | Sex, for estimating energy needs. One of `female`, `male` or `unspecified`. |
| `activity` | string or null | How active a usual day is. One of `sitting`, `somewhat` or `very`. |

## Response

`200` with your [settings](https://splot.health/docs/api/settings/object) after the change.

## Example

```sh
curl -X PATCH https://app.splot.health/v1/settings \
  -H "Authorization: Bearer $SPLOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "targets": { "from": "2026-10-06", "values": { "caloriesKcal": 2000, "proteinG": 130, "carbsG": 220, "fatG": 65 } }
  }'
```
