---
title: "Update settings"
method: PATCH
path: "/settings"
tags: ["Settings"]
---

# Update settings

`PATCH /settings`

## Request

- Base URL: `https://app.splot.health/v1`
- URL: `https://app.splot.health/v1/settings`
- Auth: HTTP bearer

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

## Request body

- SettingsChange
  - `targets` object: A change to your daily targets, from a day on.
    - `from` string, date, required: The first day the change applies, usually today. Earlier days keep their targets.
    - `through` string, date: The last day the change applies, inclusive. Leave out to keep it from then on.
    - `values` object, nullable, required: All four targets, or `null` to have no targets from `from`.
      - `caloriesKcal` number, required: Energy, in kcal.
      - `proteinG` number, required: Protein, in grams.
      - `carbsG` number, required: Carbohydrates without fibre, in grams.
      - `fatG` number, required: Fat, in grams.
  - `preferences` object: Display preferences. Only what you send changes; `null` clears a field.
    - `units` 'metric' | 'imperial' | 'uk', nullable: The units to show amounts in; `imperial` is US customary. `null` follows the phone.
    - `deviceUnits` 'metric' | 'imperial' | 'uk': The units the phone uses, as the app last reported them.
    - `showTargets` boolean: Whether the app shows progress towards your targets.
    - `assistantShortcut` 'claude' | 'chatgpt' | 'off', nullable: The assistant the app's shortcut opens, or `off`.
    - `language` 'en' | 'pl' | 'automatic': The language picked in the app, which Splot's web pages use too. `automatic` follows the phone in the app and the browser on the web; `null` means none was picked.
    - `analyticsCards` object, nullable: The Analytics summary: `pinned` card ids in their order, and `hidden` ones that never show. `null` until changed.
      - `pinned` string[], required: Cards kept at the top, in this order.
      - `hidden` string[], required: Cards that never show, and that Splot doesn't mention.
  - `body` object: Body measurements. Only what you send changes; `null` clears a field.
    - `weightKg` number, nullable: Weight, in kilograms.
    - `heightCm` number, nullable: Height, in centimetres.
    - `age` integer, nullable: Age, in years.
    - `sex` 'female' | 'male' | 'unspecified', nullable: Sex, for estimating energy needs.
    - `activity` 'sitting' | 'somewhat' | 'very', nullable: How active a usual day is.

## Response `200`

Your settings after the change.

- Settings
  - `targets` object[], required: Your daily targets over time, oldest first. Each period applies from `startsOn` until the next one.
    - `startsOn` string, date, required: The first day of the period.
    - `values` object, nullable, required: The targets in the period, or `null` for none.
      - `caloriesKcal` number, required: Energy, in kcal.
      - `proteinG` number, required: Protein, in grams.
      - `carbsG` number, required: Carbohydrates without fibre, in grams.
      - `fatG` number, required: Fat, in grams.
  - `preferences` object, required: Display preferences.
    - `units` 'metric' | 'imperial' | 'uk', nullable, required: The units to show amounts in; `imperial` is US customary. `null` follows the phone.
    - `deviceUnits` 'metric' | 'imperial' | 'uk', nullable, required: The units the phone uses, as the app last reported them.
    - `showTargets` boolean, required: Whether the app shows progress towards your targets.
    - `assistantShortcut` 'claude' | 'chatgpt' | 'off', nullable, required: The assistant the app's shortcut opens, or `off`.
    - `language` 'en' | 'pl' | 'automatic', nullable, required: The language picked in the app, which Splot's web pages use too. `automatic` follows the phone in the app and the browser on the web; `null` means none was picked.
    - `analyticsCards` object, nullable, required: The Analytics summary: `pinned` card ids in their order, and `hidden` ones that never show. `null` until changed.
      - `pinned` string[], required: Cards kept at the top, in this order.
      - `hidden` string[], required: Cards that never show, and that Splot doesn't mention.
  - `body` object, required: Body measurements, each `null` until set.
    - `weightKg` number, nullable, required: Weight, in kilograms.
    - `heightCm` number, nullable, required: Height, in centimetres.
    - `age` integer, nullable, required: Age, in years.
    - `sex` 'female' | 'male' | 'unspecified', nullable, required: Sex, for estimating energy needs.
    - `activity` 'sitting' | 'somewhat' | 'very', nullable, required: How active a usual day is.

## Other responses

- `400`: The body or query is invalid; `issues` says which fields. Or the body is not valid JSON.
- `401`: The key is missing, revoked or expired.
- `403`: The key's permission doesn't allow this request, or you haven't yet agreed to how Splot handles health information.
- `429`: Too many requests. Wait for `Retry-After` seconds.

---

[API](https://skmtc.dev/splot/apis/splot-api.md) · [All operations](https://skmtc.dev/splot/apis/splot-api/llms.txt) · [OpenAPI document](https://skmtc.dev/splot/apis/splot-api/revisions/02f2a6340fe9?raw)
