---
title: "Set the day's activity (steps, energy, workouts); replaces earlier values for that day"
method: PUT
path: "/days/{day}/activity"
tags: ["records"]
---

# Set the day's activity (steps, energy, workouts); replaces earlier values for that day

`PUT /days/{day}/activity`

## Request

- Base URL: `https://nutri.coghorizon.com/api/v1`
- URL: `https://nutri.coghorizon.com/api/v1/days/{day}/activity`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://nutri.coghorizon.com/oauth/authorize`, token URL `https://nutri.coghorizon.com/oauth/token`, scopes: `records:write`)

## Path parameters

- `day` string, required

## Query parameters

- `profile_id` string

## Request body

- ActivityInput
  - `steps` integer
  - `active_kcal` number: Active energy, kcal (not total)
  - `total_kcal` number: Total energy for the day, kcal, if the tracker shows it
  - `distance_km` number
  - `exercise_minutes` integer
  - `resting_hr` integer: Resting heart rate, bpm
  - `workouts` object[]
    - `type` string, required: Walk, run, strength, yoga...
    - `minutes` integer
    - `kcal` number
  - `source_app` string: Tracker or app the numbers come from; the connected assistant when absent
  - `confidence` number

## Response `200`

Activity

- object

## Other responses

- `400`: Validation failed
- `401`: Missing or invalid token
- `403`: Token lacks the scope
- `404`: Not found
- `429`: Rate limited

---

[API](https://skmtc.dev/coghorizon/apis/top-nutritionist-api.md) · [All operations](https://skmtc.dev/coghorizon/apis/top-nutritionist-api/llms.txt) · [OpenAPI document](https://skmtc.dev/coghorizon/apis/top-nutritionist-api/revisions/928f04d72f8c?raw)
