Health

Save a workout recorded by the app's live workout screen

Idempotent by the client-generated id: the app keeps an ended workout on the phone and retries until this accepts it, so a replay of a save that already landed answers 200 with created: false. Heart-rate samples are stored with the row and drive the workout's detail chart; avg and max heart rate are computed from them here.

post/api/health/workouts

Request

  • Base URL
    https://api.hiyd.ai
  • Auth
    HTTP bearer

Request body

idstring uuid required
workout_type'running' | 'walking' | 'cycling' | 'swimming' | 'strength' | 'yoga' | 'hiit' | 'other' required
sportstring

Name shown in the app, e.g. Tennis

start_timestring date-time required
end_timestring date-time required
active_secondsinteger

Elapsed time excluding pauses

Response

Already saved under this id or for this session

Changes

No recorded changes to this operation across all 1 revision of this API.