---
title: "Update a workout"
method: PUT
path: "/api/workout/{id}"
---

# Update a workout

`PUT /api/workout/{id}`

## Request

- Base URL: `https://healthpartner.shrynshjn.com`
- URL: `https://healthpartner.shrynshjn.com/api/workout/{id}`
- Auth: none declared

## Path parameters

- `id` string, required

## Request body

- WorkoutRequest
  - `user_input` string
  - `name` string, required
  - `type` 'yoga' | 'running' | 'walking' | 'cycling' | 'gym', required
  - `startTime` string, date-time, required: ISO 8601 with timezone offset.
  - `duration` number, required: milliseconds
  - `endTime` string, date-time
  - `calories` number
  - `location` 'indoor' | 'outdoor' | 'gym'
  - `description` string
  - `intensity` 'low' | 'medium' | 'high'
  - `avgHeartRate` number
  - `source` string
  - `idempotencyKey` string
  - `media` string[]
  - `naturalText` string

## Response `200`

Updated

- UpdateResult
  - `message` string
  - `updatedAt` string, date-time

---

[API](https://skmtc.dev/shrynshjn/apis/health-partner-api.md) · [All operations](https://skmtc.dev/shrynshjn/apis/health-partner-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shrynshjn/apis/health-partner-api/revisions/687e966e4267?raw)
