---
search:
  tags:
    - Targets
    - PUT
seo:
  description: >-
    Partially updates the caller's targets; omitted fields are left unchanged.
    Reference for the PUT /api/targets endpoint in the skcal API.
sidebar:
  label: Update goals
  badge: PUT
title: Update goals
type: openapi-operation
---
Partially updates the caller's targets; omitted fields are left unchanged.

`PUT /api/targets`

**Request body** (`application/json`, required)

The fields to change; omitted fields are left unchanged.

- `goalWeightKg` (number) — New target body weight in kilograms.
- `startWeightKg` (number) — New starting body weight in kilograms.
- `dailyKcalTarget` (integer) — New daily calorie target.
- `proteinTargetG` (integer) — New daily protein target in grams.
- `targetDate` (integer<int64>) — New goal date as a Unix epoch in milliseconds.
- `activity` (string) — The user's day-to-day activity level in a few words; stored as their single activity-level memory (replacing any previous one).
- `reason` (string) — Optional context for why the targets changed; not stored.

Request body example:

```json
{
  "goalWeightKg": 70,
  "startWeightKg": 78.4,
  "dailyKcalTarget": 2100,
  "proteinTargetG": 170,
  "targetDate": 1790000000000,
  "activity": "desk job, mostly sitting",
  "reason": "less active after a job change"
}
```

**Responses**

- `200` — The targets were updated.

Response example, 200:

```json
{
  "ok": true
}
```
