@thebriangao/totem 1.4.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dev.vars.example +5 -0
- package/.dockerignore +5 -0
- package/.env.example +29 -20
- package/CHANGELOG.md +99 -1
- package/CONTRIBUTING.md +48 -116
- package/Dockerfile +46 -12
- package/README.md +172 -498
- package/SECURITY.md +36 -59
- package/TOOLS.md +448 -311
- package/WHOOP.md +497 -2659
- package/assets/brand/SOURCES.md +38 -0
- package/assets/brand/totem.png +0 -0
- package/assets/brand/totem.svg +13 -0
- package/assets/fonts/Manrope-OFL.txt +93 -0
- package/assets/fonts/manrope-latin.woff2 +0 -0
- package/dist/build_info.js +5 -0
- package/dist/build_info.js.map +1 -0
- package/dist/cli/app.js +675 -0
- package/dist/cli/app.js.map +1 -0
- package/dist/cli/auth.js +297 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/auth_flow.js +268 -0
- package/dist/cli/auth_flow.js.map +1 -0
- package/dist/cli/browser_login.js +368 -0
- package/dist/cli/browser_login.js.map +1 -0
- package/dist/cli/clients.js +403 -0
- package/dist/cli/clients.js.map +1 -0
- package/dist/cli/deploy_record.js +96 -0
- package/dist/cli/deploy_record.js.map +1 -0
- package/dist/cli/index.js +39 -575
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/links.js +28 -0
- package/dist/cli/links.js.map +1 -0
- package/dist/cli/logo.js +63 -0
- package/dist/cli/logo.js.map +1 -0
- package/dist/cli/setup.js +1157 -1017
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/spawn.js +80 -0
- package/dist/cli/spawn.js.map +1 -0
- package/dist/cli/sys.js +219 -0
- package/dist/cli/sys.js.map +1 -0
- package/dist/cli/ui.js +712 -463
- package/dist/cli/ui.js.map +1 -1
- package/dist/cli/update.js +425 -282
- package/dist/cli/update.js.map +1 -1
- package/dist/cloudflare/token_store.js +48 -0
- package/dist/cloudflare/token_store.js.map +1 -0
- package/dist/cloudflare/worker.js +155 -0
- package/dist/cloudflare/worker.js.map +1 -0
- package/dist/data/behaviors.js +2733 -617
- package/dist/data/behaviors.js.map +1 -1
- package/dist/data/endpoint_catalog.js +2681 -0
- package/dist/data/endpoint_catalog.js.map +1 -0
- package/dist/data/exercises.js +373 -4859
- package/dist/data/exercises.js.map +1 -1
- package/dist/data/garments.js +19 -0
- package/dist/data/garments.js.map +1 -0
- package/dist/data/sports.js +219 -208
- package/dist/data/sports.js.map +1 -1
- package/dist/lib/activity_list.js +123 -0
- package/dist/lib/activity_list.js.map +1 -0
- package/dist/lib/activity_records.js +195 -0
- package/dist/lib/activity_records.js.map +1 -0
- package/dist/lib/activity_results.js +44 -0
- package/dist/lib/activity_results.js.map +1 -0
- package/dist/lib/activity_types.js +164 -0
- package/dist/lib/activity_types.js.map +1 -0
- package/dist/lib/brand.js +63 -0
- package/dist/lib/brand.js.map +1 -0
- package/dist/lib/clock.js +24 -0
- package/dist/lib/clock.js.map +1 -0
- package/dist/lib/coach_session.js +345 -0
- package/dist/lib/coach_session.js.map +1 -0
- package/dist/lib/concurrency.js.map +1 -1
- package/dist/lib/dates.js +19 -0
- package/dist/lib/dates.js.map +1 -1
- package/dist/lib/env_file.js +195 -0
- package/dist/lib/env_file.js.map +1 -0
- package/dist/lib/health_plans_write.js +44 -0
- package/dist/lib/health_plans_write.js.map +1 -0
- package/dist/lib/heart_rate.js +34 -0
- package/dist/lib/heart_rate.js.map +1 -0
- package/dist/lib/highlight.js +81 -0
- package/dist/lib/highlight.js.map +1 -0
- package/dist/lib/install_links.js +47 -0
- package/dist/lib/install_links.js.map +1 -0
- package/dist/lib/instant.js +50 -0
- package/dist/lib/instant.js.map +1 -0
- package/dist/lib/journal_behaviors.js +382 -0
- package/dist/lib/journal_behaviors.js.map +1 -0
- package/dist/lib/lift_catalog.js +218 -0
- package/dist/lib/lift_catalog.js.map +1 -0
- package/dist/lib/lift_history.js +66 -0
- package/dist/lib/lift_history.js.map +1 -0
- package/dist/lib/lift_sets.js +146 -0
- package/dist/lib/lift_sets.js.map +1 -0
- package/dist/lib/lift_tool.js +20 -0
- package/dist/lib/lift_tool.js.map +1 -0
- package/dist/lib/profile_settings.js +101 -0
- package/dist/lib/profile_settings.js.map +1 -0
- package/dist/lib/screen_content.js +44 -0
- package/dist/lib/screen_content.js.map +1 -0
- package/dist/lib/timezone.js +48 -6
- package/dist/lib/timezone.js.map +1 -1
- package/dist/lib/walk.js +6 -1
- package/dist/lib/walk.js.map +1 -1
- package/dist/lib/weight_readings.js +61 -0
- package/dist/lib/weight_readings.js.map +1 -0
- package/dist/projections/activities.js +193 -0
- package/dist/projections/activities.js.map +1 -0
- package/dist/projections/alarm_schedule.js +102 -0
- package/dist/projections/alarm_schedule.js.map +1 -0
- package/dist/projections/coach.js +203 -0
- package/dist/projections/coach.js.map +1 -0
- package/dist/projections/community.js +165 -0
- package/dist/projections/community.js.map +1 -0
- package/dist/projections/health_features.js +167 -0
- package/dist/projections/health_features.js.map +1 -0
- package/dist/projections/hormonal_insights.js +239 -0
- package/dist/projections/hormonal_insights.js.map +1 -0
- package/dist/projections/journal_v2.js +157 -0
- package/dist/projections/journal_v2.js.map +1 -0
- package/dist/projections/lift_cards.js +115 -0
- package/dist/projections/lift_cards.js.map +1 -0
- package/dist/projections/lift_exercise_v2.js +131 -0
- package/dist/projections/lift_exercise_v2.js.map +1 -0
- package/dist/projections/lift_library_v2.js +67 -0
- package/dist/projections/lift_library_v2.js.map +1 -0
- package/dist/projections/lift_sessions.js +211 -0
- package/dist/projections/lift_sessions.js.map +1 -0
- package/dist/projections/memory.js +95 -0
- package/dist/projections/memory.js.map +1 -0
- package/dist/projections/milestones.js +119 -0
- package/dist/projections/milestones.js.map +1 -0
- package/dist/projections/profile_v2.js +150 -0
- package/dist/projections/profile_v2.js.map +1 -0
- package/dist/projections/settings_v2.js +153 -0
- package/dist/projections/settings_v2.js.map +1 -0
- package/dist/projections/sleep.js +4 -21
- package/dist/projections/sleep.js.map +1 -1
- package/dist/projections/v2/calendar.js +43 -0
- package/dist/projections/v2/calendar.js.map +1 -0
- package/dist/projections/v2/core_common.js +86 -0
- package/dist/projections/v2/core_common.js.map +1 -0
- package/dist/projections/v2/core_home.js +136 -0
- package/dist/projections/v2/core_home.js.map +1 -0
- package/dist/projections/v2/core_sleep_need.js +23 -0
- package/dist/projections/v2/core_sleep_need.js.map +1 -0
- package/dist/projections/v2/day.js +92 -0
- package/dist/projections/v2/day.js.map +1 -0
- package/dist/projections/v2/heart_rate.js +54 -0
- package/dist/projections/v2/heart_rate.js.map +1 -0
- package/dist/projections/v2/history.js +140 -0
- package/dist/projections/v2/history.js.map +1 -0
- package/dist/projections/v2/now.js +39 -0
- package/dist/projections/v2/now.js.map +1 -0
- package/dist/projections/v2/recovery.js +77 -0
- package/dist/projections/v2/recovery.js.map +1 -0
- package/dist/projections/v2/sleep.js +218 -0
- package/dist/projections/v2/sleep.js.map +1 -0
- package/dist/projections/v2/strain.js +39 -0
- package/dist/projections/v2/strain.js.map +1 -0
- package/dist/projections/v2/stress.js +92 -0
- package/dist/projections/v2/stress.js.map +1 -0
- package/dist/projections/v2/trend.js +205 -0
- package/dist/projections/v2/trend.js.map +1 -0
- package/dist/projections/weekly_plan.js +66 -0
- package/dist/projections/weekly_plan.js.map +1 -0
- package/dist/projections/weight_readings.js +57 -0
- package/dist/projections/weight_readings.js.map +1 -0
- package/dist/projections/workout.js +37 -15
- package/dist/projections/workout.js.map +1 -1
- package/dist/schemas/activities.js +123 -0
- package/dist/schemas/activities.js.map +1 -0
- package/dist/schemas/alarm_schedule.js +62 -0
- package/dist/schemas/alarm_schedule.js.map +1 -0
- package/dist/schemas/coach.js +76 -8
- package/dist/schemas/coach.js.map +1 -1
- package/dist/schemas/community.js +70 -0
- package/dist/schemas/community.js.map +1 -0
- package/dist/schemas/health.js +36 -0
- package/dist/schemas/health.js.map +1 -0
- package/dist/schemas/hormonal_insights.js +90 -0
- package/dist/schemas/hormonal_insights.js.map +1 -0
- package/dist/schemas/journal.js +4 -0
- package/dist/schemas/journal.js.map +1 -1
- package/dist/schemas/journal_v2.js +106 -0
- package/dist/schemas/journal_v2.js.map +1 -0
- package/dist/schemas/memory.js +42 -0
- package/dist/schemas/memory.js.map +1 -0
- package/dist/schemas/milestones.js +39 -0
- package/dist/schemas/milestones.js.map +1 -0
- package/dist/schemas/profile_v2.js +60 -0
- package/dist/schemas/profile_v2.js.map +1 -0
- package/dist/schemas/settings_v2.js +56 -0
- package/dist/schemas/settings_v2.js.map +1 -0
- package/dist/schemas/sleep.js +8 -1
- package/dist/schemas/sleep.js.map +1 -1
- package/dist/schemas/strength.js +10 -1
- package/dist/schemas/strength.js.map +1 -1
- package/dist/schemas/strength_v2.js +190 -0
- package/dist/schemas/strength_v2.js.map +1 -0
- package/dist/schemas/v2/calendar.js +8 -0
- package/dist/schemas/v2/calendar.js.map +1 -0
- package/dist/schemas/v2/core_common.js +42 -0
- package/dist/schemas/v2/core_common.js.map +1 -0
- package/dist/schemas/v2/day.js +73 -0
- package/dist/schemas/v2/day.js.map +1 -0
- package/dist/schemas/v2/now.js +25 -0
- package/dist/schemas/v2/now.js.map +1 -0
- package/dist/schemas/v2/recovery.js +35 -0
- package/dist/schemas/v2/recovery.js.map +1 -0
- package/dist/schemas/v2/sleep.js +44 -0
- package/dist/schemas/v2/sleep.js.map +1 -0
- package/dist/schemas/v2/strain.js +16 -0
- package/dist/schemas/v2/strain.js.map +1 -0
- package/dist/schemas/v2/stress.js +20 -0
- package/dist/schemas/v2/stress.js.map +1 -0
- package/dist/schemas/v2/trend.js +42 -0
- package/dist/schemas/v2/trend.js.map +1 -0
- package/dist/schemas/weekly_plan.js +31 -0
- package/dist/schemas/weekly_plan.js.map +1 -0
- package/dist/schemas/weight.js +28 -0
- package/dist/schemas/weight.js.map +1 -0
- package/dist/scripts/build_behaviors.js +114 -0
- package/dist/scripts/build_behaviors.js.map +1 -0
- package/dist/scripts/cognito_bootstrap.js +9 -277
- package/dist/scripts/cognito_bootstrap.js.map +1 -1
- package/dist/scripts/gen_activity_catalogs.js +104 -0
- package/dist/scripts/gen_activity_catalogs.js.map +1 -0
- package/dist/server-admin.js +156 -0
- package/dist/server-admin.js.map +1 -0
- package/dist/server-http.js +270 -48
- package/dist/server-http.js.map +1 -1
- package/dist/server.js +136 -23
- package/dist/server.js.map +1 -1
- package/dist/tools/annotations.js +15 -0
- package/dist/tools/annotations.js.map +1 -0
- package/dist/tools/define.js +31 -0
- package/dist/tools/define.js.map +1 -0
- package/dist/tools/register.js +59 -94
- package/dist/tools/register.js.map +1 -1
- package/dist/tools/resources.js +70 -0
- package/dist/tools/resources.js.map +1 -0
- package/dist/tools/slim_schema.js +90 -0
- package/dist/tools/slim_schema.js.map +1 -0
- package/dist/tools/v2/activity_delete.js +63 -17
- package/dist/tools/v2/activity_delete.js.map +1 -1
- package/dist/tools/v2/activity_edit.js +396 -0
- package/dist/tools/v2/activity_edit.js.map +1 -0
- package/dist/tools/v2/activity_log.js +152 -0
- package/dist/tools/v2/activity_log.js.map +1 -0
- package/dist/tools/v2/calendar.js +19 -21
- package/dist/tools/v2/calendar.js.map +1 -1
- package/dist/tools/v2/coach_ask.js +74 -110
- package/dist/tools/v2/coach_ask.js.map +1 -1
- package/dist/tools/v2/coach_history.js +120 -0
- package/dist/tools/v2/coach_history.js.map +1 -0
- package/dist/tools/v2/community.js +124 -0
- package/dist/tools/v2/community.js.map +1 -0
- package/dist/tools/v2/cycle.js +63 -15
- package/dist/tools/v2/cycle.js.map +1 -1
- package/dist/tools/v2/cycle_log.js +289 -32
- package/dist/tools/v2/cycle_log.js.map +1 -1
- package/dist/tools/v2/day.js +126 -24
- package/dist/tools/v2/day.js.map +1 -1
- package/dist/tools/v2/health.js +116 -0
- package/dist/tools/v2/health.js.map +1 -0
- package/dist/tools/v2/hr_zones_set.js +134 -34
- package/dist/tools/v2/hr_zones_set.js.map +1 -1
- package/dist/tools/v2/journal.js +75 -17
- package/dist/tools/v2/journal.js.map +1 -1
- package/dist/tools/v2/journal_log.js +306 -65
- package/dist/tools/v2/journal_log.js.map +1 -1
- package/dist/tools/v2/lift_exercise.js +125 -22
- package/dist/tools/v2/lift_exercise.js.map +1 -1
- package/dist/tools/v2/lift_exercise_set.js +291 -0
- package/dist/tools/v2/lift_exercise_set.js.map +1 -0
- package/dist/tools/v2/lift_library.js +51 -12
- package/dist/tools/v2/lift_library.js.map +1 -1
- package/dist/tools/v2/lift_log.js +309 -72
- package/dist/tools/v2/lift_log.js.map +1 -1
- package/dist/tools/v2/lift_sessions.js +248 -0
- package/dist/tools/v2/lift_sessions.js.map +1 -0
- package/dist/tools/v2/lift_template.js +232 -0
- package/dist/tools/v2/lift_template.js.map +1 -0
- package/dist/tools/v2/memory.js +45 -0
- package/dist/tools/v2/memory.js.map +1 -0
- package/dist/tools/v2/memory_set.js +107 -0
- package/dist/tools/v2/memory_set.js.map +1 -0
- package/dist/tools/v2/milestones.js +50 -0
- package/dist/tools/v2/milestones.js.map +1 -0
- package/dist/tools/v2/now.js +49 -0
- package/dist/tools/v2/now.js.map +1 -0
- package/dist/tools/v2/preferences.js +51 -0
- package/dist/tools/v2/preferences.js.map +1 -0
- package/dist/tools/v2/preferences_set.js +388 -0
- package/dist/tools/v2/preferences_set.js.map +1 -0
- package/dist/tools/v2/profile.js +54 -22
- package/dist/tools/v2/profile.js.map +1 -1
- package/dist/tools/v2/profile_update.js +167 -55
- package/dist/tools/v2/profile_update.js.map +1 -1
- package/dist/tools/v2/raw.js +91 -34
- package/dist/tools/v2/raw.js.map +1 -1
- package/dist/tools/v2/recovery.js +37 -23
- package/dist/tools/v2/recovery.js.map +1 -1
- package/dist/tools/v2/sleep.js +52 -16
- package/dist/tools/v2/sleep.js.map +1 -1
- package/dist/tools/v2/smart_alarm.js +54 -20
- package/dist/tools/v2/smart_alarm.js.map +1 -1
- package/dist/tools/v2/smart_alarm_set.js +264 -86
- package/dist/tools/v2/smart_alarm_set.js.map +1 -1
- package/dist/tools/v2/strain.js +15 -15
- package/dist/tools/v2/strain.js.map +1 -1
- package/dist/tools/v2/stress.js +17 -15
- package/dist/tools/v2/stress.js.map +1 -1
- package/dist/tools/v2/trend.js +56 -20
- package/dist/tools/v2/trend.js.map +1 -1
- package/dist/tools/v2/weekly_plan.js +30 -0
- package/dist/tools/v2/weekly_plan.js.map +1 -0
- package/dist/tools/v2/weekly_plan_set.js +134 -0
- package/dist/tools/v2/weekly_plan_set.js.map +1 -0
- package/dist/tools/v2/weight.js +56 -0
- package/dist/tools/v2/weight.js.map +1 -0
- package/dist/tools/v2/weight_log.js +188 -0
- package/dist/tools/v2/weight_log.js.map +1 -0
- package/dist/tools/v2/workouts.js +159 -25
- package/dist/tools/v2/workouts.js.map +1 -1
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/dist/whoop/bff.js +94 -0
- package/dist/whoop/bff.js.map +1 -0
- package/dist/whoop/client.js +392 -18
- package/dist/whoop/client.js.map +1 -1
- package/dist/whoop/cognito.js +106 -79
- package/dist/whoop/cognito.js.map +1 -1
- package/dist/whoop/connect_page.js +165 -0
- package/dist/whoop/connect_page.js.map +1 -0
- package/dist/whoop/consent_font.js +287 -0
- package/dist/whoop/consent_font.js.map +1 -0
- package/dist/whoop/consent_logos.js +22 -0
- package/dist/whoop/consent_logos.js.map +1 -0
- package/dist/whoop/consent_page.js +291 -0
- package/dist/whoop/consent_page.js.map +1 -0
- package/dist/whoop/constants.js +5 -1
- package/dist/whoop/constants.js.map +1 -1
- package/dist/whoop/device.js +4 -4
- package/dist/whoop/device.js.map +1 -1
- package/dist/whoop/errors.js +85 -4
- package/dist/whoop/errors.js.map +1 -1
- package/dist/whoop/init_timezone.js +57 -17
- package/dist/whoop/init_timezone.js.map +1 -1
- package/dist/whoop/installation.js +15 -10
- package/dist/whoop/installation.js.map +1 -1
- package/dist/whoop/json_out.js +52 -6
- package/dist/whoop/json_out.js.map +1 -1
- package/dist/whoop/oauth_provider.js +81 -78
- package/dist/whoop/oauth_provider.js.map +1 -1
- package/dist/whoop/token_lock.js +331 -0
- package/dist/whoop/token_lock.js.map +1 -0
- package/dist/whoop/token_manager.js +536 -42
- package/dist/whoop/token_manager.js.map +1 -1
- package/dist/whoop/token_store.js +303 -36
- package/dist/whoop/token_store.js.map +1 -1
- package/dist/whoop/units.js +28 -0
- package/dist/whoop/units.js.map +1 -0
- package/package.json +29 -13
- package/scripts/build-mcpb.mjs +72 -0
- package/scripts/embed-consent-font.mjs +34 -0
- package/scripts/readme-media.ts +195 -0
- package/scripts/tools-md.ts +89 -0
- package/scripts/whoop-md.ts +119 -0
- package/src/build_info.ts +4 -0
- package/src/cli/app.ts +696 -0
- package/src/cli/auth.ts +350 -0
- package/src/cli/auth_flow.ts +356 -0
- package/src/cli/browser_login.ts +402 -0
- package/src/cli/clients.ts +467 -0
- package/src/cli/deploy_record.ts +100 -0
- package/src/cli/index.ts +41 -583
- package/src/cli/links.ts +43 -0
- package/src/cli/logo.ts +64 -0
- package/src/cli/setup.ts +1147 -979
- package/src/cli/spawn.ts +88 -0
- package/src/cli/sys.ts +267 -0
- package/src/cli/ui.ts +778 -436
- package/src/cli/update.ts +436 -274
- package/src/cloudflare/runtime.d.ts +27 -0
- package/src/cloudflare/token_store.ts +57 -0
- package/src/cloudflare/worker.ts +174 -0
- package/src/data/behaviors.ts +2760 -622
- package/src/data/endpoint_catalog.ts +2695 -0
- package/src/data/exercises.ts +379 -4861
- package/src/data/garments.ts +28 -0
- package/src/data/sports.ts +239 -211
- package/src/lib/activity_list.ts +150 -0
- package/src/lib/activity_records.ts +213 -0
- package/src/lib/activity_results.ts +51 -0
- package/src/lib/activity_types.ts +176 -0
- package/src/lib/brand.ts +71 -0
- package/src/lib/clock.ts +16 -0
- package/src/lib/coach_session.ts +434 -0
- package/src/lib/dates.ts +18 -0
- package/src/lib/env_file.ts +191 -0
- package/src/lib/health_plans_write.ts +53 -0
- package/src/lib/heart_rate.ts +42 -0
- package/src/lib/highlight.ts +71 -0
- package/src/lib/install_links.ts +61 -0
- package/src/lib/instant.ts +54 -0
- package/src/lib/journal_behaviors.ts +453 -0
- package/src/lib/lift_catalog.ts +258 -0
- package/src/lib/lift_history.ts +75 -0
- package/src/lib/lift_sets.ts +164 -0
- package/src/lib/lift_tool.ts +25 -0
- package/src/lib/profile_settings.ts +102 -0
- package/src/lib/screen_content.ts +40 -0
- package/src/lib/timezone.ts +44 -8
- package/src/lib/walk.ts +4 -1
- package/src/lib/weight_readings.ts +82 -0
- package/src/projections/activities.ts +199 -0
- package/src/projections/alarm_schedule.ts +98 -0
- package/src/projections/coach.ts +218 -0
- package/src/projections/community.ts +187 -0
- package/src/projections/health_features.ts +191 -0
- package/src/projections/hormonal_insights.ts +277 -0
- package/src/projections/journal_v2.ts +173 -0
- package/src/projections/lift_cards.ts +131 -0
- package/src/projections/lift_exercise_v2.ts +147 -0
- package/src/projections/lift_library_v2.ts +77 -0
- package/src/projections/lift_sessions.ts +250 -0
- package/src/projections/memory.ts +100 -0
- package/src/projections/milestones.ts +133 -0
- package/src/projections/profile_v2.ts +166 -0
- package/src/projections/settings_v2.ts +179 -0
- package/src/projections/sleep.ts +7 -21
- package/src/projections/v2/calendar.ts +48 -0
- package/src/projections/v2/core_common.ts +95 -0
- package/src/projections/v2/core_home.ts +177 -0
- package/src/projections/v2/core_sleep_need.ts +37 -0
- package/src/projections/v2/day.ts +162 -0
- package/src/projections/v2/heart_rate.ts +73 -0
- package/src/projections/v2/history.ts +153 -0
- package/src/projections/v2/now.ts +59 -0
- package/src/projections/v2/recovery.ts +120 -0
- package/src/projections/v2/sleep.ts +281 -0
- package/src/projections/v2/strain.ts +63 -0
- package/src/projections/v2/stress.ts +111 -0
- package/src/projections/v2/trend.ts +242 -0
- package/src/projections/weekly_plan.ts +79 -0
- package/src/projections/weight_readings.ts +57 -0
- package/src/projections/workout.ts +36 -17
- package/src/schemas/activities.ts +136 -0
- package/src/schemas/alarm_schedule.ts +70 -0
- package/src/schemas/coach.ts +98 -8
- package/src/schemas/community.ts +77 -0
- package/src/schemas/health.ts +36 -0
- package/src/schemas/hormonal_insights.ts +108 -0
- package/src/schemas/journal.ts +4 -0
- package/src/schemas/journal_v2.ts +112 -0
- package/src/schemas/memory.ts +48 -0
- package/src/schemas/milestones.ts +48 -0
- package/src/schemas/profile_v2.ts +63 -0
- package/src/schemas/settings_v2.ts +63 -0
- package/src/schemas/sleep.ts +9 -1
- package/src/schemas/strength.ts +10 -1
- package/src/schemas/strength_v2.ts +210 -0
- package/src/schemas/v2/calendar.ts +8 -0
- package/src/schemas/v2/core_common.ts +50 -0
- package/src/schemas/v2/day.ts +79 -0
- package/src/schemas/v2/now.ts +25 -0
- package/src/schemas/v2/recovery.ts +38 -0
- package/src/schemas/v2/sleep.ts +46 -0
- package/src/schemas/v2/strain.ts +16 -0
- package/src/schemas/v2/stress.ts +20 -0
- package/src/schemas/v2/trend.ts +45 -0
- package/src/schemas/weekly_plan.ts +36 -0
- package/src/schemas/weight.ts +53 -0
- package/src/scripts/build_behaviors.ts +116 -0
- package/src/scripts/cognito_bootstrap.ts +10 -249
- package/src/scripts/gen_activity_catalogs.ts +121 -0
- package/src/server-admin.ts +171 -0
- package/src/server-http.ts +290 -53
- package/src/server.ts +130 -26
- package/src/tools/annotations.ts +25 -0
- package/src/tools/define.ts +53 -0
- package/src/tools/register.ts +64 -94
- package/src/tools/resources.ts +92 -0
- package/src/tools/slim_schema.ts +102 -0
- package/src/tools/v2/activity_delete.ts +61 -23
- package/src/tools/v2/activity_edit.ts +378 -0
- package/src/tools/v2/activity_log.ts +154 -0
- package/src/tools/v2/calendar.ts +22 -21
- package/src/tools/v2/coach_ask.ts +83 -119
- package/src/tools/v2/coach_history.ts +140 -0
- package/src/tools/v2/community.ts +137 -0
- package/src/tools/v2/cycle.ts +78 -20
- package/src/tools/v2/cycle_log.ts +291 -40
- package/src/tools/v2/day.ts +126 -25
- package/src/tools/v2/health.ts +114 -0
- package/src/tools/v2/hr_zones_set.ts +132 -45
- package/src/tools/v2/journal.ts +78 -23
- package/src/tools/v2/journal_log.ts +321 -69
- package/src/tools/v2/lift_exercise.ts +135 -27
- package/src/tools/v2/lift_exercise_set.ts +272 -0
- package/src/tools/v2/lift_library.ts +57 -21
- package/src/tools/v2/lift_log.ts +325 -83
- package/src/tools/v2/lift_sessions.ts +255 -0
- package/src/tools/v2/lift_template.ts +229 -0
- package/src/tools/v2/memory.ts +54 -0
- package/src/tools/v2/memory_set.ts +110 -0
- package/src/tools/v2/milestones.ts +59 -0
- package/src/tools/v2/now.ts +61 -0
- package/src/tools/v2/preferences.ts +61 -0
- package/src/tools/v2/preferences_set.ts +403 -0
- package/src/tools/v2/profile.ts +56 -26
- package/src/tools/v2/profile_update.ts +151 -60
- package/src/tools/v2/raw.ts +89 -36
- package/src/tools/v2/recovery.ts +44 -25
- package/src/tools/v2/sleep.ts +57 -18
- package/src/tools/v2/smart_alarm.ts +62 -24
- package/src/tools/v2/smart_alarm_set.ts +240 -90
- package/src/tools/v2/strain.ts +19 -16
- package/src/tools/v2/stress.ts +22 -17
- package/src/tools/v2/trend.ts +58 -20
- package/src/tools/v2/weekly_plan.ts +38 -0
- package/src/tools/v2/weekly_plan_set.ts +132 -0
- package/src/tools/v2/weight.ts +61 -0
- package/src/tools/v2/weight_log.ts +193 -0
- package/src/tools/v2/workouts.ts +156 -26
- package/src/version.ts +5 -0
- package/src/whoop/bff.ts +84 -0
- package/src/whoop/client.ts +448 -18
- package/src/whoop/cognito.ts +110 -99
- package/src/whoop/connect_page.ts +183 -0
- package/src/whoop/consent_font.ts +289 -0
- package/src/whoop/consent_logos.ts +24 -0
- package/src/whoop/consent_page.ts +326 -0
- package/src/whoop/constants.ts +5 -1
- package/src/whoop/device.ts +4 -4
- package/src/whoop/errors.ts +89 -4
- package/src/whoop/init_timezone.ts +57 -16
- package/src/whoop/installation.ts +16 -7
- package/src/whoop/json_out.ts +51 -6
- package/src/whoop/oauth_provider.ts +84 -91
- package/src/whoop/token_lock.ts +345 -0
- package/src/whoop/token_manager.ts +580 -53
- package/src/whoop/token_store.ts +341 -32
- package/src/whoop/units.ts +35 -0
- package/wrangler.jsonc +17 -0
- package/assets/banner.svg +0 -38
- package/dist/data/endpoints.js +0 -320
- package/dist/data/endpoints.js.map +0 -1
- package/dist/lib/format.js +0 -22
- package/dist/lib/format.js.map +0 -1
- package/dist/lib/stats.js +0 -32
- package/dist/lib/stats.js.map +0 -1
- package/dist/projections/calendar.js +0 -33
- package/dist/projections/calendar.js.map +0 -1
- package/dist/projections/communities.js +0 -105
- package/dist/projections/communities.js.map +0 -1
- package/dist/projections/cycle.js +0 -81
- package/dist/projections/cycle.js.map +0 -1
- package/dist/projections/hr_zones.js +0 -35
- package/dist/projections/hr_zones.js.map +0 -1
- package/dist/projections/journal.js +0 -56
- package/dist/projections/journal.js.map +0 -1
- package/dist/projections/leaderboard.js +0 -37
- package/dist/projections/leaderboard.js.map +0 -1
- package/dist/projections/lift_exercise.js +0 -22
- package/dist/projections/lift_exercise.js.map +0 -1
- package/dist/projections/lift_history.js +0 -133
- package/dist/projections/lift_history.js.map +0 -1
- package/dist/projections/lift_library.js +0 -71
- package/dist/projections/lift_library.js.map +0 -1
- package/dist/projections/lift_progression.js +0 -138
- package/dist/projections/lift_progression.js.map +0 -1
- package/dist/projections/lift_prs.js +0 -20
- package/dist/projections/lift_prs.js.map +0 -1
- package/dist/projections/live_hr.js +0 -19
- package/dist/projections/live_hr.js.map +0 -1
- package/dist/projections/live_state.js +0 -23
- package/dist/projections/live_state.js.map +0 -1
- package/dist/projections/live_stress.js +0 -11
- package/dist/projections/live_stress.js.map +0 -1
- package/dist/projections/performance_assessment.js +0 -15
- package/dist/projections/performance_assessment.js.map +0 -1
- package/dist/projections/profile.js +0 -59
- package/dist/projections/profile.js.map +0 -1
- package/dist/projections/recovery.js +0 -131
- package/dist/projections/recovery.js.map +0 -1
- package/dist/projections/sleep_need.js +0 -32
- package/dist/projections/sleep_need.js.map +0 -1
- package/dist/projections/smart_alarm.js +0 -45
- package/dist/projections/smart_alarm.js.map +0 -1
- package/dist/projections/strain.js +0 -128
- package/dist/projections/strain.js.map +0 -1
- package/dist/projections/stress.js +0 -86
- package/dist/projections/stress.js.map +0 -1
- package/dist/projections/today.js +0 -129
- package/dist/projections/today.js.map +0 -1
- package/dist/projections/trend.js +0 -149
- package/dist/projections/trend.js.map +0 -1
- package/dist/projections/workouts.js +0 -37
- package/dist/projections/workouts.js.map +0 -1
- package/dist/schemas/calendar.js +0 -12
- package/dist/schemas/calendar.js.map +0 -1
- package/dist/schemas/communities.js +0 -51
- package/dist/schemas/communities.js.map +0 -1
- package/dist/schemas/compare.js +0 -15
- package/dist/schemas/compare.js.map +0 -1
- package/dist/schemas/leaderboard.js +0 -25
- package/dist/schemas/leaderboard.js.map +0 -1
- package/dist/schemas/live.js +0 -26
- package/dist/schemas/live.js.map +0 -1
- package/dist/schemas/performance.js +0 -12
- package/dist/schemas/performance.js.map +0 -1
- package/dist/schemas/profile.js +0 -39
- package/dist/schemas/profile.js.map +0 -1
- package/dist/schemas/recovery.js +0 -27
- package/dist/schemas/recovery.js.map +0 -1
- package/dist/schemas/settings.js +0 -26
- package/dist/schemas/settings.js.map +0 -1
- package/dist/schemas/sleep_need.js +0 -15
- package/dist/schemas/sleep_need.js.map +0 -1
- package/dist/schemas/smart_alarm.js +0 -36
- package/dist/schemas/smart_alarm.js.map +0 -1
- package/dist/schemas/strain.js +0 -24
- package/dist/schemas/strain.js.map +0 -1
- package/dist/schemas/stress.js +0 -16
- package/dist/schemas/stress.js.map +0 -1
- package/dist/schemas/today.js +0 -38
- package/dist/schemas/today.js.map +0 -1
- package/dist/schemas/trend.js +0 -50
- package/dist/schemas/trend.js.map +0 -1
- package/dist/schemas/womens_health.js +0 -23
- package/dist/schemas/womens_health.js.map +0 -1
- package/dist/tools/v2/activity_create.js +0 -64
- package/dist/tools/v2/activity_create.js.map +0 -1
- package/dist/tools/v2/behavior_impact.js +0 -36
- package/dist/tools/v2/behavior_impact.js.map +0 -1
- package/dist/tools/v2/communities.js +0 -60
- package/dist/tools/v2/communities.js.map +0 -1
- package/dist/tools/v2/compare.js +0 -67
- package/dist/tools/v2/compare.js.map +0 -1
- package/dist/tools/v2/endpoints.js +0 -28
- package/dist/tools/v2/endpoints.js.map +0 -1
- package/dist/tools/v2/hidden_metric.js +0 -28
- package/dist/tools/v2/hidden_metric.js.map +0 -1
- package/dist/tools/v2/hr_zones.js +0 -24
- package/dist/tools/v2/hr_zones.js.map +0 -1
- package/dist/tools/v2/journal_autopop.js +0 -19
- package/dist/tools/v2/journal_autopop.js.map +0 -1
- package/dist/tools/v2/journal_catalog.js +0 -44
- package/dist/tools/v2/journal_catalog.js.map +0 -1
- package/dist/tools/v2/leaderboard.js +0 -79
- package/dist/tools/v2/leaderboard.js.map +0 -1
- package/dist/tools/v2/lift_catalog.js +0 -47
- package/dist/tools/v2/lift_catalog.js.map +0 -1
- package/dist/tools/v2/lift_custom_exercise.js +0 -108
- package/dist/tools/v2/lift_custom_exercise.js.map +0 -1
- package/dist/tools/v2/lift_history.js +0 -39
- package/dist/tools/v2/lift_history.js.map +0 -1
- package/dist/tools/v2/lift_progression.js +0 -30
- package/dist/tools/v2/lift_progression.js.map +0 -1
- package/dist/tools/v2/lift_prs.js +0 -21
- package/dist/tools/v2/lift_prs.js.map +0 -1
- package/dist/tools/v2/lift_template_save.js +0 -83
- package/dist/tools/v2/lift_template_save.js.map +0 -1
- package/dist/tools/v2/live_hr.js +0 -21
- package/dist/tools/v2/live_hr.js.map +0 -1
- package/dist/tools/v2/live_state.js +0 -21
- package/dist/tools/v2/live_state.js.map +0 -1
- package/dist/tools/v2/live_stress.js +0 -22
- package/dist/tools/v2/live_stress.js.map +0 -1
- package/dist/tools/v2/performance_assessment.js +0 -38
- package/dist/tools/v2/performance_assessment.js.map +0 -1
- package/dist/tools/v2/sleep_need.js +0 -21
- package/dist/tools/v2/sleep_need.js.map +0 -1
- package/dist/tools/v2/sports_catalog.js +0 -26
- package/dist/tools/v2/sports_catalog.js.map +0 -1
- package/dist/tools/v2/symptom_log.js +0 -72
- package/dist/tools/v2/symptom_log.js.map +0 -1
- package/dist/tools/v2/today.js +0 -30
- package/dist/tools/v2/today.js.map +0 -1
- package/dist/tools/v2/workout.js +0 -23
- package/dist/tools/v2/workout.js.map +0 -1
- package/dist/whoop/build_lift_body.js +0 -67
- package/dist/whoop/build_lift_body.js.map +0 -1
- package/dist/whoop/session_state.js +0 -34
- package/dist/whoop/session_state.js.map +0 -1
- package/dist/whoop/types.js +0 -82
- package/dist/whoop/types.js.map +0 -1
- package/src/data/endpoints.ts +0 -319
- package/src/lib/format.ts +0 -27
- package/src/lib/stats.ts +0 -35
- package/src/projections/calendar.ts +0 -46
- package/src/projections/communities.ts +0 -135
- package/src/projections/cycle.ts +0 -85
- package/src/projections/hr_zones.ts +0 -43
- package/src/projections/journal.ts +0 -55
- package/src/projections/leaderboard.ts +0 -49
- package/src/projections/lift_exercise.ts +0 -29
- package/src/projections/lift_history.ts +0 -140
- package/src/projections/lift_library.ts +0 -70
- package/src/projections/lift_progression.ts +0 -138
- package/src/projections/lift_prs.ts +0 -23
- package/src/projections/live_hr.ts +0 -21
- package/src/projections/live_state.ts +0 -28
- package/src/projections/live_stress.ts +0 -13
- package/src/projections/performance_assessment.ts +0 -19
- package/src/projections/profile.ts +0 -71
- package/src/projections/recovery.ts +0 -133
- package/src/projections/sleep_need.ts +0 -36
- package/src/projections/smart_alarm.ts +0 -70
- package/src/projections/strain.ts +0 -131
- package/src/projections/stress.ts +0 -95
- package/src/projections/today.ts +0 -166
- package/src/projections/trend.ts +0 -149
- package/src/projections/workouts.ts +0 -36
- package/src/schemas/calendar.ts +0 -13
- package/src/schemas/communities.ts +0 -56
- package/src/schemas/compare.ts +0 -17
- package/src/schemas/leaderboard.ts +0 -26
- package/src/schemas/live.ts +0 -31
- package/src/schemas/performance.ts +0 -13
- package/src/schemas/profile.ts +0 -40
- package/src/schemas/recovery.ts +0 -28
- package/src/schemas/settings.ts +0 -30
- package/src/schemas/sleep_need.ts +0 -16
- package/src/schemas/smart_alarm.ts +0 -40
- package/src/schemas/strain.ts +0 -25
- package/src/schemas/stress.ts +0 -17
- package/src/schemas/today.ts +0 -39
- package/src/schemas/trend.ts +0 -53
- package/src/schemas/womens_health.ts +0 -26
- package/src/tools/v2/activity_create.ts +0 -74
- package/src/tools/v2/behavior_impact.ts +0 -39
- package/src/tools/v2/communities.ts +0 -65
- package/src/tools/v2/compare.ts +0 -83
- package/src/tools/v2/endpoints.ts +0 -32
- package/src/tools/v2/hidden_metric.ts +0 -33
- package/src/tools/v2/hr_zones.ts +0 -29
- package/src/tools/v2/journal_autopop.ts +0 -26
- package/src/tools/v2/journal_catalog.ts +0 -48
- package/src/tools/v2/leaderboard.ts +0 -92
- package/src/tools/v2/lift_catalog.ts +0 -48
- package/src/tools/v2/lift_custom_exercise.ts +0 -117
- package/src/tools/v2/lift_history.ts +0 -52
- package/src/tools/v2/lift_progression.ts +0 -34
- package/src/tools/v2/lift_prs.ts +0 -26
- package/src/tools/v2/lift_template_save.ts +0 -89
- package/src/tools/v2/live_hr.ts +0 -26
- package/src/tools/v2/live_state.ts +0 -26
- package/src/tools/v2/live_stress.ts +0 -27
- package/src/tools/v2/performance_assessment.ts +0 -44
- package/src/tools/v2/sleep_need.ts +0 -26
- package/src/tools/v2/sports_catalog.ts +0 -32
- package/src/tools/v2/symptom_log.ts +0 -78
- package/src/tools/v2/today.ts +0 -35
- package/src/tools/v2/workout.ts +0 -28
- package/src/whoop/build_lift_body.ts +0 -84
- package/src/whoop/session_state.ts +0 -41
- package/src/whoop/types.ts +0 -89
package/TOOLS.md
CHANGED
|
@@ -1,429 +1,566 @@
|
|
|
1
|
-
# The
|
|
1
|
+
# The 41 tools
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
What totem gives an AI app: 24 tools that read your WHOOP data and 17 that change it.
|
|
4
|
+
This page is written from the tool registry (`npx tsx scripts/tools-md.ts`), so it says exactly what an app sees.
|
|
4
5
|
|
|
6
|
+
- **Changes need a yes.** A tool that writes returns a preview of what it would send, and does nothing until it is called again with `confirm: true`. Your app shows you the preview first.
|
|
7
|
+
- **Small by default.** A call with only its required inputs answers in about 1.5 KB. The heavy parts (a hypnogram, every set of every lift, a heart-rate series) come with `include`.
|
|
8
|
+
- **Your time zone.** Times come back in your WHOOP time zone. A time you give without an offset (`2026-11-20T08:00`) is read on your clock too.
|
|
5
9
|
|
|
6
|
-
|
|
10
|
+
- [Today and any day](#today-and-any-day)
|
|
11
|
+
- [Trends](#trends)
|
|
12
|
+
- [Activities](#activities)
|
|
13
|
+
- [Strength Trainer](#strength-trainer)
|
|
14
|
+
- [Journal](#journal)
|
|
15
|
+
- [WHOOP Coach](#whoop-coach)
|
|
16
|
+
- [Body](#body)
|
|
17
|
+
- [Plans and alarms](#plans-and-alarms)
|
|
18
|
+
- [Health features](#health-features)
|
|
19
|
+
- [Profile, settings and community](#profile-settings-and-community)
|
|
20
|
+
- [Anything else](#anything-else)
|
|
7
21
|
|
|
8
|
-
|
|
22
|
+
## Today and any day
|
|
9
23
|
|
|
10
|
-
|
|
11
|
-
Composite snapshot of today: recovery score + state, sleep performance + stages, day strain so far, current activity state, workouts count.
|
|
24
|
+
Scores, sleep, strain, stress and heart rate for a day, or a table of many days.
|
|
12
25
|
|
|
13
|
-
|
|
14
|
-
- **Source endpoints (3 parallel):** `GET /home-service/v1/home?date=today`, `GET /developer/v2/activity/sleep?limit=5` (light ~1 KB sleep summary — the full per-minute hypnogram is `whoop_sleep`'s job, not the snapshot's), `GET /activities-service/v1/user-state`
|
|
15
|
-
- **Output:** `{date, recovery: {score, state, hrv_ms, rhr_bpm}, sleep: {performance_pct, total_sleep_ms, time_in_bed_ms, efficiency_pct, stages: {rem_ms, light_ms, sws_ms, wake_ms}, started_at, ended_at}, strain: {score, calories, avg_hr_bpm, max_hr_bpm, workouts_count}, current_state: {state, sport_name, started_at}}`
|
|
26
|
+
### `whoop_now`
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
Same composite as `whoop_today` but for any past date. Drops the live state (not relevant for historical days).
|
|
28
|
+
Live snapshot: activity state (idle, workout, sleep…) with sport and minutes so far, when WHOOP last processed strap data and the heart rate at that moment, current stress, and today's recovery, sleep, strain, calories and HRV.
|
|
19
29
|
|
|
20
|
-
|
|
21
|
-
- **Source:** Same as `whoop_today` minus the user-state fetch
|
|
22
|
-
- **Output:** Same as `whoop_today`, with `current_state.*` set to null
|
|
30
|
+
No inputs.
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
Identity + body measurements + privacy state.
|
|
32
|
+
### `whoop_day`
|
|
26
33
|
|
|
27
|
-
-
|
|
28
|
-
- **Source endpoints (4 parallel):** `/users-service/v2/bootstrap`, `/users-service/v1/hidden-metrics/BODY_COMP`, `/users-service/v1/hidden-metrics/HEALTHSPAN`, `/users-service/v1/stealth-mode`
|
|
29
|
-
- **Output:** `{user_id, account_id, email, username, first_name, last_name, birthday, gender, height: {m, cm, ft}, weight: {kg, lb}, city, country, timezone_offset, bio_data: {max_hr_bpm, resting_hr_bpm, min_hr_bpm}, fitness_level, membership: {status, in_effect}, privacy: {stealth_mode, body_comp_hidden, healthspan_hidden}}`
|
|
34
|
+
One cycle day (default today): scores, main sleep, strain, calories, steps, activities and, today, the live state. sleep_plan is today only. hr: heart rate every 10 min, or a window via hr_from/hr_to (1-min steps up to 5 h, 6 s up to 30 min). end_date: a table of daily recovery, HRV, RHR, sleep, strain, calories and HR instead. Scores are null while calibrating. Never reuse the cycle id: sleep edits change it.
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
| Input | Type | Notes |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `date` | string | |
|
|
39
|
+
| `end_date` | string | Table from date: default 30 days, max 180 |
|
|
40
|
+
| `include` | list of `scores`, `sleep`, `strain`, `activities`, `sleep_plan`, `key_stats`, `hr` | Default scores, sleep, strain, activities |
|
|
41
|
+
| `hr_from` | string | With hr_to, max 48 h |
|
|
42
|
+
| `hr_to` | string | |
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
- **Source endpoints (2 parallel):** `/home-service/v1/calendar/overview?date=`, `/home-service/v1/calendar/recovery?date=`
|
|
36
|
-
- **Output:** `{month: "YYYY-MM", days: [{date, recovery_score, recovery_state, sleep_score, day_strain}]}`
|
|
44
|
+
### `whoop_recovery`
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
Recovery for a cycle day (default today): score, state and contributors (HRV, RHR, respiratory rate, sleep performance) vs baseline. Today only: Health Monitor (SpO2, skin temperature as a °F deviation from baseline, RR, RHR, HRV). include assessment adds the weekly and monthly performance assessment.
|
|
39
47
|
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
| Input | Type | Notes |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `date` | string | |
|
|
51
|
+
| `include` | list of `assessment` | |
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
- **Source:** `GET /home-service/v1/deep-dive/recovery?date=`
|
|
45
|
-
- **Output:** `{date, score, state, hrv:{ms,baseline_ms,delta_pct}, rhr:{bpm,baseline_bpm,delta_pct}, respiratory_rate, spo2_pct, skin_temp_c, sleep_performance_pct, contributors:[{name,direction,detail}], calibration_state}`. Full schema in `src/schemas/recovery.ts`. (In the current SCORE_GAUGE/CONTRIBUTORS_TILE shape, `contributors` returns `[]` and `calibration_state` returns `null` — the per-metric data lives in the typed `hrv`/`rhr`/`respiratory_rate`/`spo2_pct`/`skin_temp_c`/`sleep_performance_pct` fields above.)
|
|
46
|
-
- **Walk shape (new):** `SCORE_GAUGE { id: "RECOVERY_SCORE_GAUGE" }.content.score_display` for the score, `CONTRIBUTORS_TILE { id: "RECOVERY_CONTRIBUTORS_TILE" }.content.metrics[]` for each contributor. Each metric carries `status` (today's value) and `status_subtitle` (baseline — API-provided, not computed). Whoop migrated from `GRAPHING_CARD` tiles to this shape in May 2026; the projection was rewritten on 2026-05-26.
|
|
47
|
-
- **Baseline:** unlike the old projection (which computed a 6-day rolling mean), baselines now come straight from the API in `status_subtitle`. Same field on the wire, no client-side math.
|
|
48
|
-
- **SpO2 / skin_temp:** populated only on 4.0+ straps. The new contributors tile includes `CONTRIBUTORS_TILE_SPO2` and `CONTRIBUTORS_TILE_SKIN_TEMPERATURE` when present.
|
|
53
|
+
### `whoop_sleep`
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
Sleep duration, time in bed, efficiency, performance, consistency, all 4 stages (REM / LIGHT / SWS / AWAKE) with ms + percent, the full hypnogram (per-stage timeline), in-sleep heart rate (avg/min), disturbances.
|
|
55
|
+
Sleep for a cycle day (default today = last night's main sleep) or one sleep or nap by activity_id: window, minutes asleep and in bed, efficiency, stages, disturbances, HR and performance, plus the day's naps (with ids) and tonight's sleep need (today only).
|
|
52
56
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
| Input | Type | Notes |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `date` | string | |
|
|
60
|
+
| `activity_id` | string | |
|
|
61
|
+
| `include` | list of `hypnogram`, `need`, `naps` | Default naps, need |
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
### `whoop_strain`
|
|
58
64
|
|
|
59
|
-
|
|
65
|
+
Day strain for a cycle day (default today): score (0–21), target (null while calibrating), contributors vs your 30-day baseline (zone minutes, strength minutes, steps) and the day's CARDIO activities. RECOVERY activities (sauna, meditation) don't count toward strain; see whoop_day.
|
|
60
66
|
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
| Input | Type | Notes |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `date` | string | |
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
- **Source:** `GET /home-service/v1/deep-dive/strain?date=`
|
|
66
|
-
- **Output:** `{date, score, target: {value, optimal_lower, optimal_upper}, calories, avg_hr_bpm, max_hr_bpm, zone_durations: {zone_0_ms..zone_5_ms}, workouts_count, steps, strength_activity_time_ms}`
|
|
67
|
-
- **Strain target:** `target.value` is Whoop's recovery-calibrated daily strain target; `optimal_lower`/`optimal_upper` bound the green zone. The deep-dive response stores these as 0–1 fractions of max strain (21); the projection multiplies by 21 so they're emitted as strain values, not fractions. Lets the AI answer "should I work out today?" with a number.
|
|
68
|
-
- **Walk shape (new):** `SCORE_GAUGE { id: "STRAIN_SCORE_GAUGE" }.content.score_display` for the day strain, `CONTRIBUTORS_TILE { id: "STRAIN_CONTRIBUTORS_TILE" }.content.metrics[]` for time-bucket / step / strength-time contributors. `ACTIVITY` items in the same response represent the day's workouts (count = number of these items). Whoop migrated from `GRAPHING_CARD` tiles in May 2026; rewritten 2026-05-26.
|
|
69
|
-
- **Removed fields:** `calories`, `avg_hr_bpm`, `max_hr_bpm`, and per-zone (zone_0/2/3/5) granularity are no longer in this deep-dive endpoint. They live per-workout — use `whoop_workout` for HR zone breakdown of a specific activity. The schema fields are kept (returning null) so the shape stays compatible if Whoop adds them back.
|
|
70
|
-
- **HR zones:** Whoop now reports only `HR_ZONES_1_3` (low+mid intensity) and `HR_ZONES_4_5` (high intensity) at the day level. We store the 1-3 aggregate in `zone_1_ms` and the 4-5 aggregate in `zone_4_ms`; zones 0/2/3/5 stay null.
|
|
71
|
+
### `whoop_stress`
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
Stress Monitor for a day (default today): state, current level (0–3) and label, min and peak, and minutes in low/medium/high stress. Today's graph covers the last 24 hours. include timeline adds the mean level per 30 minutes.
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
| Input | Type | Notes |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `date` | string | |
|
|
78
|
+
| `include` | list of `timeline` | |
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
- **Source:** `GET /progression-service/v3/trends/{metric}?endDate=`
|
|
79
|
-
- **Output:** `{metric, end_date, segments: [{label: "week"|"month"|"six_month"|"year", start_date, end_date, avg, min, max, delta_pct, unit, points: [{date, value, value_display}]}], cardio_fitness_level}`
|
|
80
|
+
## Trends
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
Averages and changes over weeks and months, and the calendar of scores.
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
Side-by-side comparison of two date windows across recovery / sleep performance / day strain / HRV / RHR.
|
|
84
|
+
### `whoop_trend`
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
- **Source:** 2× `whoop_trend` for each metric in the array
|
|
88
|
-
- **Output:** `{window, a: {start_date, end_date}, b: {start_date, end_date}, metrics: [{metric, a_avg, b_avg, delta_abs, delta_pct, unit}]}`
|
|
86
|
+
Trends for 1–5 metrics over a window ending end_date (default today; week = 7 days, month 30, six_month 180): average, previous-window average, change % and direction. HR-zone and strength-time rows are weekly totals. compare_end_date adds a second window and the deltas.
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
| Input | Type | Notes |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `metrics` (required) | list of `RECOVERY`, `HRV`, `RHR`, `RESPIRATORY_RATE`, `DAY_STRAIN`, `CALORIES`, `STEPS`, `AVERAGE_HR`, `HR_ZONES_1_3`, `HR_ZONES_4_5`, `HR_ZONES_ALL`, `STRENGTH_ACTIVITY_TIME`, `VO2_MAX`, `SLEEP_PERFORMANCE`, `TIME_IN_BED`, `HOURS_V_NEED`, `HOURS_V_NEEDED_PERCENT`, `SLEEP_CONSISTENCY`, `SLEEP_EFFICIENCY`, `RESTORATIVE_SLEEP`, `RESTORATIVE_SLEEP_PERCENT`, `SLEEP_DEBT_POST`, `STRESS`, `STRESS_DURING_SLEEP`, `STRESS_DURING_NON_STRAIN`, `BODY_COMPOSITION`, `WEIGHT` | |
|
|
91
|
+
| `window` | `week`, `month`, `six_month` | |
|
|
92
|
+
| `end_date` | string | |
|
|
93
|
+
| `compare_end_date` | string | |
|
|
94
|
+
| `include_points` | boolean | One value per day or week |
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
Stress for a day: current level (0–3 scale, from the gauge), peak/min, and a downsampled intraday timeline. (`stress_state` on the wire is a string like `"RELAXED"`, not a timeline — the data lives in `gauge` + `stress_graph.graph`.)
|
|
96
|
+
### `whoop_calendar`
|
|
94
97
|
|
|
95
|
-
-
|
|
96
|
-
- **Source:** `GET /health-service/v2/stress-bff/{date}`
|
|
97
|
-
- **Output:** `{date, current_level, baseline_level, peak_level, min_level, calibration_state, timeline: [{started_at, ended_at, level}]}` — the raw graph has ~700 intraday samples; the timeline is evenly downsampled to ≤48 points (timestamps reconstructed from each sample's local clock label).
|
|
98
|
+
Month grid for one pillar: days has one character per day (days[0] = the 1st): H/M/L = high/medium/low, J = journal entry, '-' = data but no score, '.' = no data. No numbers; whoop_day has a day's scores.
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
| Input | Type | Notes |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| `date` | string | Any day in the month |
|
|
103
|
+
| `pillar` | `recovery`, `strain`, `sleep`, `journal` | |
|
|
101
104
|
|
|
102
|
-
|
|
103
|
-
- **Source:** `GET /coaching-service/v2/sleepneed`
|
|
104
|
-
- **Output:** `{recommended_time_in_bed, recommended_time_in_bed_minutes, need_breakdown: {baseline_minutes, debt_minutes, strain_minutes, nap_credit_minutes}, next_schedule_day, smart_alarm_eligible, schedule_state}`
|
|
105
|
+
## Activities
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
Workouts, naps and sleeps: read them, log new ones, fix or remove them.
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
Current heart rate from the strap (if recording).
|
|
109
|
+
### `whoop_workouts`
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
- **Source:** `GET /health-tab-bff/v1/health-tab` (extracts the LIVE_HR section)
|
|
113
|
-
- **Output:** `{current_bpm, hr_zone, is_recording, last_updated_at, show_live_hr}`
|
|
114
|
-
- **Caveat:** `is_recording` is false when the strap isn't streaming. `current_bpm` may be null or stale.
|
|
111
|
+
Activities. List: one cycle day (date) or start_date–end_date (≤31 days; default the last 7), pending and unscored included, as rows of id, type, sport, start, minutes, status and CARDIO strain. With activity_id: strain, calories, HR, zones, distance and MSK summary. Sleeps and naps: whoop_sleep.
|
|
115
112
|
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
| Input | Type | Notes |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `date` | string | |
|
|
116
|
+
| `start_date` | string | |
|
|
117
|
+
| `end_date` | string | |
|
|
118
|
+
| `activity_id` | string | |
|
|
119
|
+
| `include` | list of `hr` | Detail only |
|
|
120
|
+
| `types` | list of `CARDIO`, `RECOVERY`, `SLEEP` | Default CARDIO, RECOVERY |
|
|
121
|
+
| `sport` | string | Substring of the sport's name |
|
|
122
|
+
| `limit` | integer | |
|
|
118
123
|
|
|
119
|
-
|
|
120
|
-
- **Source:** `GET /activities-service/v1/user-state`
|
|
121
|
-
- **Output:** `{state: "workout"|"sleep"|"idle"|"recovery"|"unknown", sport_name, sport_id, activity_id, started_at, duration_so_far_ms, tracked_sleep, latest_metrics_at}`
|
|
124
|
+
### `whoop_activity_log` (changes data)
|
|
122
125
|
|
|
123
|
-
|
|
124
|
-
Current stress level (cheaper than `whoop_stress` if you don't need the timeline).
|
|
126
|
+
Log a past activity, nap or main sleep over start–end (≥1 min, not in the future); WHOOP scores it from strap data. type is an internal_name ("sauna", "nap", "sleep"), display name or sport_id; a miss returns the closest. Overlaps are refused. A main sleep permanently re-cuts the day's cycles. Previews unless confirm:true.
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
| Input | Type | Notes |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| `type` | string | |
|
|
131
|
+
| `sport_id` | integer | Instead of type |
|
|
132
|
+
| `start` (required) | string | |
|
|
133
|
+
| `end` (required) | string | |
|
|
134
|
+
| `gps_enabled` | boolean | |
|
|
135
|
+
| `garment_id` | integer | Strap location id; a miss lists them |
|
|
129
136
|
|
|
130
|
-
|
|
137
|
+
Add `confirm: true` to make the change.
|
|
131
138
|
|
|
132
|
-
|
|
133
|
-
List of recent activities with sport, start, end, duration, strain, HR, calories.
|
|
139
|
+
### `whoop_activity_edit` (changes data)
|
|
134
140
|
|
|
135
|
-
|
|
136
|
-
- **Source:** `GET /developer/v2/activity/workout` (yes, this uses the public-API endpoint — Whoop's iOS app does too)
|
|
137
|
-
- **Output:** `Array<{id, sport_name, start, end, duration_ms, strain, avg_hr_bpm, max_hr_bpm, calories, distance_m}>`
|
|
141
|
+
Change an activity's start/end or type (CARDIO↔RECOVERY, nap→main sleep), or a sleep/nap window, by activity_id or sleep_date (that day's main sleep). Omitted bounds keep their value. An overlapping sleep window needs delete_overlapping = exactly the ids the preview lists (WHOOP DELETES them). merge keeps the earliest over the joint window and DELETES the rest. Previews unless confirm:true.
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
| Input | Type | Notes |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `activity_id` | string | |
|
|
146
|
+
| `sleep_date` | string | |
|
|
147
|
+
| `start` | string | |
|
|
148
|
+
| `end` | string | |
|
|
149
|
+
| `type` | string | internal_name, display name or sport_id |
|
|
150
|
+
| `garment_id` | integer | Activities only |
|
|
151
|
+
| `delete_overlapping` | list of string | Overlapping ids from the preview; WHOOP deletes them |
|
|
152
|
+
| `merge` | list of string | Ids to combine with activity_id |
|
|
141
153
|
|
|
142
|
-
|
|
143
|
-
- **Source:** `GET /core-details-bff/v1/cardio-details?activityId=` (300 KB response)
|
|
144
|
-
- **Output:** `{id, sport_name, start, end, duration_ms, strain, calories, distance_m, avg_hr_bpm, max_hr_bpm, zone_durations: HrZoneDurations, hr_curve: [{at, bpm}], msk: {total_volume_kg, intensity_pct, strain_score, is_strength_workout}}` (`distance_m` is currently always `null` — not extracted from `/cardio-details`)
|
|
145
|
-
- **`hr_curve`:** reconstructed from the graph points — bpm from each point's `value_display`, timestamps from `position_x` × the workout window — then evenly downsampled to ≤120 points.
|
|
146
|
-
- **Caveat:** a just-created/logged activity stays `score_state: "pending"` until Whoop scores it, and this endpoint returns 400 (`"Cannot view details for a pending activity"`) until then — so don't read details of a workout you just logged for a while.
|
|
154
|
+
Add `confirm: true` to make the change.
|
|
147
155
|
|
|
148
|
-
|
|
149
|
-
Create a generic activity (manual entry — for when you did something without wearing the strap, or want to add a record after the fact).
|
|
156
|
+
### `whoop_activity_delete` (changes data)
|
|
150
157
|
|
|
151
|
-
|
|
152
|
-
- **Source:** `POST /core-details-bff/v0/create-activity`
|
|
153
|
-
- **Output (confirm=false):** `{preview: true, will_execute: {...}, set_confirm_true_to_run: true}`
|
|
154
|
-
- **Output (confirm=true):** `{created: true, activity_id, cycle_id, start, end, sport_id}`
|
|
155
|
-
- **Gate:** rejects until `whoop_sports_catalog` has been called once in the session (token-saving lazy-load — see [Bundled catalogs](#bundled-catalogs)). The tool also rejects unknown `sport_id` values before hitting the API.
|
|
156
|
-
- **Caveat:** Whoop rejects activities with < 1 minute duration (422). Common `sport_id` values verified live: `0=Running, 1=Cycling, 17=Basketball, 33=Swimming, 45=Weightlifting, 48=Functional Fitness, 52=Hiking, 63=Walking, 123=Strength Trainer, -1=Activity` (generic). Use `whoop_sports_catalog` to look up the rest of the 203.
|
|
158
|
+
Delete one activity, nap or sleep by activity_id (from whoop_workouts or whoop_sleep) and confirm it's gone. Deleting a main sleep doesn't restore the day's cycles. Previews unless confirm:true.
|
|
157
159
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
| Input | Type | Notes |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| `activity_id` (required) | string | |
|
|
160
163
|
|
|
161
|
-
|
|
162
|
-
- **Source:** `DELETE /core-details-bff/v1/cardio-details?activityId=`
|
|
163
|
-
- **Output:** `{deleted: true, activity_id}` (or preview)
|
|
164
|
+
Add `confirm: true` to make the change.
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
Local lookup over the bundled 203-sport catalog (numeric `sport_id` ↔ display name). Zero network calls. Calling this once unlocks the catalog gate that protects `whoop_activity_create` for the rest of the session.
|
|
166
|
+
## Strength Trainer
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
- **Source:** Bundled `src/data/sports.ts` (203-entry catalog generated from `/activities-service/v1/sports/history?countryCode=US`)
|
|
170
|
-
- **Output:** `{total_in_catalog: 203, matched, truncated, sports: [{id, name}]}`
|
|
168
|
+
Lifting sessions, exercise history and records, the exercise library, logging lifts and templates.
|
|
171
169
|
|
|
172
|
-
###
|
|
170
|
+
### `whoop_lift_sessions`
|
|
173
171
|
|
|
174
|
-
|
|
175
|
-
All Strength Trainer personal records across every exercise, with medals.
|
|
172
|
+
Strength sessions, newest first (default last 14 days, max 60): any activity with Strength Trainer sets. Exercises are rows in exercise_cols order: id, set scheme, top set [weight, reps], volume, medal. Unscored sessions list without exercises: include unscored (or activity_id) reads their sets from exercise history, which is slow. Weights are in unit.
|
|
176
173
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
| Input | Type | Notes |
|
|
175
|
+
|---|---|---|
|
|
176
|
+
| `start_date` | string | |
|
|
177
|
+
| `end_date` | string | |
|
|
178
|
+
| `activity_id` | string | |
|
|
179
|
+
| `limit` | integer | |
|
|
180
|
+
| `include` | list of `sets`, `unscored` | |
|
|
180
181
|
|
|
181
|
-
|
|
182
|
-
Single exercise composite: metadata + recent sessions (every set with reps/weight/medal) + your PRs for that exercise.
|
|
182
|
+
### `whoop_lift_exercise`
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
- **Gate:** rejects until `whoop_lift_catalog` has been called once in the session.
|
|
186
|
-
- **Source (3 parallel):** `/v1/exercise/{id}`, `/v3/exercise/{id}/exercise_history`, `/v3/exercise/{id}/personal_records`
|
|
187
|
-
- **Output:** `{exercise: {id, name, muscle_groups, equipment, movement_pattern, laterality, custom, volume_input_format, instructions, video_url}, recent_sessions: LiftSession[], personal_records: LiftSession[]}`
|
|
184
|
+
One exercise by exercise_id or name: metadata, workout history, medal records and 1RM (manual entries carry the entry_id whoop_lift_exercise_set takes). With neither: your PR list. Weights are in unit. cursor takes a returned next.
|
|
188
185
|
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
| Input | Type | Notes |
|
|
187
|
+
|---|---|---|
|
|
188
|
+
| `exercise_id` | string | e.g. BENCHPRESS_BARBELL |
|
|
189
|
+
| `name` | string | Exact name |
|
|
190
|
+
| `include` | list of `history`, `records`, `one_rep_max`, `progression`, `instructions` | Default history, records, one_rep_max |
|
|
191
|
+
| `cursor` | string | |
|
|
192
|
+
| `end_date` | string | For progression |
|
|
191
193
|
|
|
192
|
-
|
|
193
|
-
- **Gate:** rejects until `whoop_lift_catalog` has been called once in the session.
|
|
194
|
-
- **Source:** `GET /progression-service/v3/exercise/{id}?endDate=`
|
|
195
|
-
- **Output:** `{exercise_id, end_date, segments: [{label, start_date, end_date, avg_volume, delta_pct, unit, points: [{date, volume, reps, top_weight}]}]}` (per-point `reps` and `top_weight` are currently always `null` — the progression graph only exposes volume)
|
|
194
|
+
### `whoop_lift_library`
|
|
196
195
|
|
|
197
|
-
|
|
198
|
-
Recent Strength Trainer workouts with **per-exercise aggregates** (set count, total reps, tonnage, medals). Distinct from `whoop_workouts` which gives a generic activity list with no exercise breakdown.
|
|
196
|
+
Strength Trainer library. No arguments: your templates as [template_key, name] and WHOOP's workouts as [prebuilt_id, title, minutes]. With one of those ids: that workout's exercises, a template's sets as [weight, reps] ([weight, seconds] if timed). search: up to 10 exercises (custom too) by name, muscle or equipment, with the ids whoop_lift_log and whoop_lift_exercise take.
|
|
199
197
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- **Per-set detail (set 1: 10 reps @ 200lbs, set 2: ...) is NOT available** in `/cardio-details` — Whoop only exposes exercise-level aggregates here. For per-set numbers across all your workouts, use `whoop_lift_exercise` which hits `/v3/exercise/{id}/exercise_history`. The `sets` array in this response always returns empty `[]`.
|
|
198
|
+
| Input | Type | Notes |
|
|
199
|
+
|---|---|---|
|
|
200
|
+
| `template_key` | integer | |
|
|
201
|
+
| `prebuilt_id` | string | |
|
|
202
|
+
| `search` | string | e.g. "bench barbell" |
|
|
206
203
|
|
|
207
|
-
|
|
208
|
-
Your saved templates. Returns the list or a single template detail.
|
|
204
|
+
### `whoop_lift_log` (changes data)
|
|
209
205
|
|
|
210
|
-
|
|
211
|
-
- **Source:** `/v3/workout-library` (list) OR `/v2/workout-template/{id}` (single)
|
|
212
|
-
- **Output (list):** `{mode: "list", my_workouts: [...], whoop_workouts: [...]}`
|
|
213
|
-
- **Output (single):** `{mode: "single", template_id, name, exercises: [...]}`
|
|
206
|
+
Log a finished strength workout as a new Strength Trainer activity, or attach the sets to an existing activity (attach_to_activity_id; permanent, WHOOP has no unlink). Weights need unit. Refused: a window overlapping another activity, and weighted sets with 0 reps (WHOOP would award a permanent PR). Previews unless confirm:true.
|
|
214
207
|
|
|
215
|
-
|
|
216
|
-
|
|
208
|
+
| Input | Type | Notes |
|
|
209
|
+
|---|---|---|
|
|
210
|
+
| `exercises` (required) | list of object | |
|
|
211
|
+
| `unit` | `kg`, `lb` | |
|
|
212
|
+
| `start` | string | Default end minus 30 min |
|
|
213
|
+
| `end` | string | Default now |
|
|
214
|
+
| `name` | string | |
|
|
215
|
+
| `rpe` | integer | |
|
|
216
|
+
| `attach_to_activity_id` | string | |
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
- **Source:** Bundled `src/data/exercises.ts`
|
|
220
|
-
- **Output:** `{total_in_catalog: 372, matched, truncated, exercises: [{exercise_id, name, muscle_groups, primary_muscle, equipment, movement_pattern, laterality}]}`
|
|
218
|
+
Add `confirm: true` to make the change.
|
|
221
219
|
|
|
222
|
-
###
|
|
220
|
+
### `whoop_lift_template` (changes data)
|
|
223
221
|
|
|
224
|
-
|
|
225
|
-
Log a finished strength workout. Builds Whoop's full nested `workout_groups → workout_exercises → sets` body shape, denormalizing each exercise from the bundled catalog. Validates that every `exercise_id` exists in `EXERCISES_BY_ID` and fails early with a clear error if not.
|
|
222
|
+
Manage your Strength Trainer templates. create: name and exercises. edit: template_key with a new name and/or exercises (the whole list is replaced). copy: copy_from (your template_key or a WHOOP prebuilt_id) into a new template. delete: template_key. Weights need unit. Keys: whoop_lift_library. Previews unless confirm:true.
|
|
226
223
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
| Input | Type | Notes |
|
|
225
|
+
|---|---|---|
|
|
226
|
+
| `action` (required) | `create`, `edit`, `copy`, `delete` | |
|
|
227
|
+
| `template_key` | integer | |
|
|
228
|
+
| `copy_from` | integer or string | |
|
|
229
|
+
| `name` | string | |
|
|
230
|
+
| `exercises` | list of object | |
|
|
231
|
+
| `unit` | `kg`, `lb` | |
|
|
231
232
|
|
|
232
|
-
|
|
233
|
-
Create or save-as a workout template (e.g. "Push Day", "Heavy Legs").
|
|
233
|
+
Add `confirm: true` to make the change.
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
- **Source:** `POST /weightlifting-service/v3/workout-template`
|
|
237
|
-
- **Output:** `{created: true, template_id, name, exercise_count}` (or preview)
|
|
238
|
-
- **Note:** No delete-template endpoint is wrapped (Whoop's iOS app doesn't expose one either via this URL). Created templates persist.
|
|
235
|
+
### `whoop_lift_exercise_set` (changes data)
|
|
239
236
|
|
|
240
|
-
|
|
241
|
-
Create a custom exercise based on an existing official one. Use this when you want to log a variant Whoop doesn't have (e.g. "Spoto Press" based on "Bench Press").
|
|
237
|
+
Custom exercises and manual 1RM entries. create_custom / edit_custom take custom; without a linked_exercise it stays untracked (no e1RM, no muscle load). delete_custom is soft: its PR tile stays. set_1rm: value with unit, dated today or up to 6 months back; entry_id (from whoop_lift_exercise) edits an entry. delete_1rm: entry_id or date. Previews unless confirm:true.
|
|
242
238
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
239
|
+
| Input | Type | Notes |
|
|
240
|
+
|---|---|---|
|
|
241
|
+
| `action` (required) | `create_custom`, `edit_custom`, `delete_custom`, `set_1rm`, `delete_1rm` | |
|
|
242
|
+
| `exercise_id` | string | |
|
|
243
|
+
| `exercise` | string | Or the exact name |
|
|
244
|
+
| `custom` | object | edit_custom keeps omitted fields |
|
|
245
|
+
| `value` | number | |
|
|
246
|
+
| `date` | string | |
|
|
247
|
+
| `entry_id` | string | |
|
|
248
|
+
| `unit` | `kg`, `lb` | |
|
|
248
249
|
|
|
249
|
-
|
|
250
|
+
Add `confirm: true` to make the change.
|
|
250
251
|
|
|
251
|
-
|
|
252
|
-
Your journal entry for a date — every tracked behavior with its value, magnitude, and resolved title (from the bundled catalog so Claude doesn't have to make a second lookup).
|
|
252
|
+
## Journal
|
|
253
253
|
|
|
254
|
-
|
|
255
|
-
- **Source:** `GET /journal-service/v3/journals/drafts/mobile/{date}` (NOT the misleadingly-named v2 endpoint, which returns the catalog of *enabled* behaviors instead of the day's entries)
|
|
256
|
-
- **Output:** `{date, cycle_id, journal_entry_id, notes, behaviors: [{behavior_tracker_id, title, category, internal_name, answered_yes, magnitude_value, magnitude_label, recorded_at}]}`
|
|
254
|
+
Daily journal answers and what they do to your recovery.
|
|
257
255
|
|
|
258
|
-
|
|
259
|
-
Local lookup over the bundled 308-behavior catalog. Filter by category, magnitude type, or substring search.
|
|
256
|
+
### `whoop_journal`
|
|
260
257
|
|
|
261
|
-
|
|
262
|
-
- **Source:** Bundled `src/data/behaviors.ts`
|
|
263
|
-
- **Output:** `{total_in_catalog: 308, matched, truncated, behaviors: [{behavior_tracker_id, title, question, internal_name, category, magnitude, status}]}`
|
|
264
|
-
- **Categories:** Drugs & Medication, Health & Symptoms, Hormonal Health, Lifestyle, Mental Wellbeing, Nutrition, Recovery, Sleep & Circadian Health, Supplements
|
|
258
|
+
Journal for a date (default today): answered behaviours (yes/no, value, time) and notes. include: unanswered; catalog (your behaviour ids and names, custom too; filter with search or category); magnitudes (ranges and step choices on catalog rows); impact (how behaviours move your recovery). impact_id: one personal impact's detail.
|
|
265
259
|
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
| Input | Type | Notes |
|
|
261
|
+
|---|---|---|
|
|
262
|
+
| `date` | string | |
|
|
263
|
+
| `include` | list of `unanswered`, `catalog`, `magnitudes`, `impact` | |
|
|
264
|
+
| `search` | string | |
|
|
265
|
+
| `category` | string | e.g. Supplements |
|
|
266
|
+
| `impact_id` | string | |
|
|
268
267
|
|
|
269
|
-
|
|
270
|
-
- **Source:** `GET /behavior-impact-service/v1/impact` (list) OR `GET /behavior-impact-service/v2/impact/details/{impact_uuid}` (detail)
|
|
271
|
-
- **Output (list):** `{behaviors: [{impact_uuid, behavior_name, direction: "positive"|"negative"|"neutral"|"insufficient", impact_display, has_sufficient_data}]}`
|
|
272
|
-
- **Output (detail):** `{behavior_id, behavior_name, metrics: [{metric, delta_avg, delta_unit, sample_size, direction}], insight}`
|
|
273
|
-
- **Caveat:** needs journal history — accounts with little/no logged data return an empty list (every behavior `has_sufficient_data: false`). The `impact_uuid` is per-fetch, so always read it from the live list rather than hardcoding.
|
|
268
|
+
### `whoop_journal_log` (changes data)
|
|
274
269
|
|
|
275
|
-
|
|
276
|
-
Save a full journal entry. **Replaces** the existing entry for that date with the new set of behaviors — so read `whoop_journal` first and resend the day's existing entries along with your additions, or they'll be wiped. Use empty `behaviors: []` to clear the entry.
|
|
270
|
+
Log journal answers. Default is a merge: only the listed behaviours change, and a yes row keeps its stored magnitude and time unless you pass new ones (null clears). notes or replace_day:true rewrite the whole day (one date only), keeping current notes and answers unless replaced. Behaviours go by id or name, custom ones included. Previews unless confirm:true.
|
|
277
271
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
272
|
+
| Input | Type | Notes |
|
|
273
|
+
|---|---|---|
|
|
274
|
+
| `date` | string | Default today |
|
|
275
|
+
| `dates` | list of string | Several dates; merge writes only |
|
|
276
|
+
| `behaviors` | list of object | |
|
|
277
|
+
| `unset` | list of integer or string | Ids or names whose answer to clear |
|
|
278
|
+
| `notes` | string | Replaces the day's notes; "" clears them |
|
|
279
|
+
| `replace_day` | boolean | Drops every answer not listed here |
|
|
283
280
|
|
|
284
|
-
|
|
285
|
-
Trigger Whoop's auto-populate engine — it reads your HealthKit data and workout patterns and suggests journal entries for the day.
|
|
281
|
+
Add `confirm: true` to make the change.
|
|
286
282
|
|
|
287
|
-
|
|
288
|
-
- **Source:** `PUT /autopop-service/v1/autopop/JOURNAL/{cycle_id}`
|
|
289
|
-
- **Output:** `{triggered: true, cycle_id}` (or preview)
|
|
283
|
+
## WHOOP Coach
|
|
290
284
|
|
|
291
|
-
|
|
285
|
+
Ask WHOOP's own Coach, read past conversations and the outlook, manage what it remembers.
|
|
292
286
|
|
|
293
|
-
|
|
294
|
-
Current menstrual cycle status — phase, cycle day, typical cycle length, and predicted next-period / ovulation dates.
|
|
287
|
+
### `whoop_coach_ask` (changes data)
|
|
295
288
|
|
|
296
|
-
|
|
297
|
-
- **Source:** `GET /womens-health-service/v1/menstrual-cycle-insights?date=` (a `tiles[]` BFF — `phase`/`cycle_day` from the `HEADER_TILE`, `cycle_length` from the `TYPICAL_CYCLE_TILE` stats, predictions derived from the `CALENDAR_TILE` first-day-of-phase markers)
|
|
298
|
-
- **Output:** `{date, phase, cycle_day, cycle_length, next_period_predicted_date, ovulation_predicted_date, hormonal_mode, contraception_type, is_pregnant}`
|
|
299
|
-
- **Caveats:** requires women's-health tracking enabled on the account — when it isn't, the endpoint still returns 200 and the projection degrades to all-null. `hormonal_mode` / `contraception_type` / `is_pregnant` are account settings this BFF doesn't carry, so they're always null here; `cycle_length` is null until there's enough history; predictions are null when the predicted day falls outside the returned month. **Pass the `date` param** — querying the endpoint without it 404s.
|
|
289
|
+
Ask WHOOP Coach (AI) and wait for the reply (up to ~50 s). One thread per agent per day; thread continues one from whoop_coach_history. Agents daily_outlook and day_in_review generate or open the current cycle's report and take no message. The coach can really create, edit and delete activities when asked (listed in actions); a saved memory shows only in the reply text. Previews unless confirm:true.
|
|
300
290
|
|
|
301
|
-
|
|
302
|
-
|
|
291
|
+
| Input | Type | Notes |
|
|
292
|
+
|---|---|---|
|
|
293
|
+
| `message` | string | |
|
|
294
|
+
| `agent` | `coach`, `sleep`, `recovery`, `strain`, `stress`, `activity`, `daily_outlook`, `day_in_review` | activity needs activity_id |
|
|
295
|
+
| `activity_id` | string | |
|
|
296
|
+
| `thread` | string | From whoop_coach_history |
|
|
297
|
+
| `new_thread` | boolean | |
|
|
298
|
+
| `image_base64` | string | PNG or JPEG, ≤5 MB |
|
|
303
299
|
|
|
304
|
-
|
|
305
|
-
- **Source:** `PUT /womens-health-service/v1/menstrual-cycle-insights/log`
|
|
306
|
-
- **Wire format:** Date encoded as `[YYYY, MM, DD]` integer array (this is Whoop's specific quirk).
|
|
307
|
-
- **Output:** `{logged: true, date}` (or preview)
|
|
300
|
+
Add `confirm: true` to make the change.
|
|
308
301
|
|
|
309
|
-
|
|
310
|
-
Log women's-health symptoms — cervical mucus, menstruation flow, and additional tracker symptoms.
|
|
302
|
+
### `whoop_coach_history`
|
|
311
303
|
|
|
312
|
-
|
|
313
|
-
- **Source:** `POST /womens-health-service/v1/symptom-insights/log/symptoms?requestDate=`
|
|
314
|
-
- **Enums (live-verified):**
|
|
315
|
-
- `menstruation`: `none, spotting, light_flow, medium_flow, heavy_flow` (all 5 accepted)
|
|
316
|
-
- `cervical_mucus`: `vaginal-discharge---egg-white, vaginal-discharge---creamy, vaginal-discharge---sticky, vaginal-discharge---watery, vaginal-discharge---grey` (the triple-hyphen is the actual key format; API rejects `"none"` with 422 — omit the field entirely to clear)
|
|
317
|
-
- **Output:** `{logged: true, date, symptoms_count}` (or preview)
|
|
318
|
-
- **Gate:** when `symptoms` is empty (you're only logging menstruation/cervical_mucus), no gate; otherwise requires `whoop_journal_catalog` once per session because `symptoms[].behavior_tracker_id` references the behaviors catalog.
|
|
304
|
+
Read WHOOP Coach history. list: conversations (fingerprint, title, agent, day), newest first. transcript: a listed thread's turns, with the actions the coach took. outlook: a day's Daily Outlook or Day in Review, only if it already exists (whoop_coach_ask generates one). To reply, pass a fingerprint to whoop_coach_ask as thread.
|
|
319
305
|
|
|
320
|
-
|
|
306
|
+
| Input | Type | Notes |
|
|
307
|
+
|---|---|---|
|
|
308
|
+
| `view` | `list`, `transcript`, `outlook` | |
|
|
309
|
+
| `limit` | integer | Default 10 rows, or the 5 newest turns |
|
|
310
|
+
| `cursor` | string | |
|
|
311
|
+
| `fingerprint` | string | transcript: from view list |
|
|
312
|
+
| `kind` | `daily_outlook`, `day_in_review` | |
|
|
313
|
+
| `date` | string | outlook only |
|
|
321
314
|
|
|
322
|
-
|
|
323
|
-
Ask Whoop Coach a question. Polls up to 30 seconds for the response.
|
|
315
|
+
### `whoop_memory`
|
|
324
316
|
|
|
325
|
-
|
|
326
|
-
- **Source flow:** POST `/ai-conversation-bff/v1/conversation` (create) → POST `/{conv}/turn` (send) → GET `/{conv}/turn/{turn}` (poll)
|
|
327
|
-
- **Output:** `{conversation_id, turn_id, response_text, turn_status, polled_iterations, timed_out}` (or preview)
|
|
328
|
-
- **Note:** Every ask creates a persistent conversation artifact on your Whoop account. The MCP requires `confirm: true` because of this.
|
|
317
|
+
What WHOOP Coach remembers about you: memories with id, title, summary and ACTIVE/INACTIVE status, plus the categories that have items. memory_id opens one memory's detail and marks it seen in the app, so only open it when asked. Memories can't be created here; the coach saves them from chats.
|
|
329
318
|
|
|
330
|
-
|
|
331
|
-
|
|
319
|
+
| Input | Type | Notes |
|
|
320
|
+
|---|---|---|
|
|
321
|
+
| `category` | string | timeline = all, or a key from categories |
|
|
322
|
+
| `limit` | integer | |
|
|
323
|
+
| `memory_id` | string | |
|
|
332
324
|
|
|
333
|
-
|
|
334
|
-
- **Source:** `GET /coaching-service/v1/performance-assessment/{period}/data/{iso_timestamp}`
|
|
335
|
-
- **Output:** `{period, is_assessment_needed, has_assessment, total_recoveries, required_recoveries, recoveries_before_recent_cutoff, expected_assessment_during, next_assessment_during}`
|
|
336
|
-
- **Caveat:** The iOS app sends `YEAR` in some discovery captures, but the API rejects it with `400 "path param reportType must be one of [WEEK, MONTH]"` — so YEAR is documented in the spec but not implemented server-side. We removed it from the enum.
|
|
325
|
+
### `whoop_memory_set` (changes data)
|
|
337
326
|
|
|
338
|
-
|
|
327
|
+
Change what WHOOP Coach remembers: activate or deactivate a memory (inactive ones stop shaping coaching), delete one permanently, or enable_memory / disable_memory for the whole account. With memory off nothing is stored, whatever the coach says. Previews unless confirm:true.
|
|
339
328
|
|
|
340
|
-
|
|
341
|
-
|
|
329
|
+
| Input | Type | Notes |
|
|
330
|
+
|---|---|---|
|
|
331
|
+
| `action` (required) | `activate`, `deactivate`, `delete`, `enable_memory`, `disable_memory` | |
|
|
332
|
+
| `memory_id` | string | From whoop_memory |
|
|
342
333
|
|
|
343
|
-
|
|
344
|
-
- **Source (2 parallel):** `/smart-alarm-bff/v1/schedule/all`, `/smart-alarm-service/v1/smartalarm/preferences`
|
|
345
|
-
- **Output:** `{enabled, preferences: {lower_time_bound, upper_time_bound, goal, weekly_plan_goal_minutes, last_triggered_at}, schedules: [{schedule_id, enabled, days_of_week, latest_wake_time, alarm_mode, sleep_goal, timezone_offset}]}`
|
|
346
|
-
- **Quirk:** The `upper_time_bound` and `goal` are nested inside `alarm_bounds` on the preferences endpoint, NOT at top level. The MCP handles this.
|
|
334
|
+
Add `confirm: true` to make the change.
|
|
347
335
|
|
|
348
|
-
|
|
349
|
-
Update one schedule, the global preferences, or the master enable/disable.
|
|
336
|
+
## Body
|
|
350
337
|
|
|
351
|
-
|
|
352
|
-
- **Source (mode-dispatched):**
|
|
353
|
-
- `schedule` → `PUT /smart-alarm-bff/v1/schedule/{schedule_id}`
|
|
354
|
-
- `preferences` → `PUT /smart-alarm-service/v1/smartalarm/preferences`
|
|
355
|
-
- `master_enable` → `PUT /smart-alarm-service/v1/alarm-schedule/enable`
|
|
356
|
-
- `master_disable` → `PUT /smart-alarm-service/v1/alarm-schedule/disable`
|
|
357
|
-
- **Output:** `{updated: true, mode}` (or preview)
|
|
358
|
-
- **To change the wake time, use `mode=schedule`** (`schedule_id` + `latest_wake_time`) — that's the setting that actually controls when the alarm fires. `mode=preferences` sets the global goal + enable flags, but its `lower/upper_time_bound` are ignored by the server whenever an explicit schedule exists (the PUT returns 200 but the bounds don't change). Read `whoop_smart_alarm` first for the `schedule_id` + current values; schedule/preferences **replace**, they don't merge.
|
|
338
|
+
Weight and body composition, and cycle tracking.
|
|
359
339
|
|
|
360
|
-
###
|
|
340
|
+
### `whoop_weight`
|
|
361
341
|
|
|
362
|
-
|
|
363
|
-
Community leaderboard + your position. Auto-discovers your first community if `community_id` omitted.
|
|
342
|
+
Weight and body-composition readings, newest first, in kg (display_unit is the account's unit). The newest reading is the profile weight. Ids feed whoop_weight_log.
|
|
364
343
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
344
|
+
| Input | Type | Notes |
|
|
345
|
+
|---|---|---|
|
|
346
|
+
| `limit` | integer | |
|
|
347
|
+
| `cursor` | string | |
|
|
369
348
|
|
|
370
|
-
|
|
371
|
-
The communities you're a member of (teams, friend groups), each with member count and — optionally — your rank in it. Complements `whoop_leaderboard`: use this to discover community IDs, then drill into one with `whoop_leaderboard`.
|
|
349
|
+
### `whoop_weight_log` (changes data)
|
|
372
350
|
|
|
373
|
-
-
|
|
374
|
-
- **Source:** `GET /community-service/v1/communities/memberships` (the same endpoint `whoop_leaderboard` uses for auto-discovery)
|
|
375
|
-
- **Output:** `{total_count, offset, team_type_filter, leaderboard_metric, period, communities: [{id, name, avatar_url, banner_url, about, private, member_count, owner_id, team_type, membership: {member_type, notification_setting, unread_count, online, joined_at, last_online}, rank: {rank, score, metric, period} | null}]}`
|
|
376
|
-
- **Schema status:** permissive at the record level — the per-record field set hasn't been captured against a live account yet, so most fields are nullable. A `WhoopProjectionError` from this tool is the signal that Whoop's actual shape differs from the inferred one and the projection needs tightening.
|
|
351
|
+
Add, edit or delete a weight or body-composition reading. weight and lean_mass need unit. add ALWAYS creates a new reading, even on a day that has one; to replace, edit by reading_id (from whoop_weight). The latest reading becomes the profile weight, and deleting a reading never reverts it. No future times. Previews unless confirm:true.
|
|
377
352
|
|
|
378
|
-
|
|
353
|
+
| Input | Type | Notes |
|
|
354
|
+
|---|---|---|
|
|
355
|
+
| `action` (required) | `add`, `edit`, `delete` | |
|
|
356
|
+
| `reading_id` | string | For edit and delete |
|
|
357
|
+
| `weight` | number | Required for add |
|
|
358
|
+
| `unit` | `kg`, `lb` | |
|
|
359
|
+
| `body_fat_pct` | number or null | Percent, e.g. 18.5; on edit null clears body composition |
|
|
360
|
+
| `lean_mass` | number | |
|
|
361
|
+
| `at` | string | Default now; edit keeps it |
|
|
379
362
|
|
|
380
|
-
|
|
381
|
-
Current HR zones + max HR + last updated.
|
|
363
|
+
Add `confirm: true` to make the change.
|
|
382
364
|
|
|
383
|
-
|
|
384
|
-
- **Source (2 parallel):** `/hr-zones-service/v1/bff/zones`, `/hr-zones-service/v1/bff/settings`
|
|
385
|
-
- **Output:** `{max_hr, is_custom, effective_timestamp, zones: [{id: "ZONE_1".."ZONE_5", min, max}]}`
|
|
365
|
+
### `whoop_cycle`
|
|
386
366
|
|
|
387
|
-
|
|
388
|
-
Set max HR (auto-computes 5 zones) OR set custom 5-zone ranges.
|
|
367
|
+
Menstrual cycle / Hormonal Insights for a date (default today): cycle or period day, phase and next-period window. include adds calendar (the date's month), settings, cycles (past cycles), symptoms (patterns) and day_log (the date's flow, mucus and symptoms, with ids). available:false when Hormonal Insights isn't set up.
|
|
389
368
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
- max_hr → `POST /hr-zones-service/v1/maxhr`
|
|
395
|
-
- custom → `POST /hr-zones-service/v1/bff/custom`
|
|
396
|
-
- **Output:** `{updated: true, mode}` (or preview)
|
|
369
|
+
| Input | Type | Notes |
|
|
370
|
+
|---|---|---|
|
|
371
|
+
| `date` | string | |
|
|
372
|
+
| `include` | list of `calendar`, `settings`, `cycles`, `symptoms`, `day_log` | |
|
|
397
373
|
|
|
398
|
-
|
|
399
|
-
Update profile: name, email, birthday, gender, weight, height, country/state, city.
|
|
374
|
+
### `whoop_cycle_log` (changes data)
|
|
400
375
|
|
|
401
|
-
|
|
402
|
-
- **Source:** `PUT /profile-service/v1/profile`
|
|
403
|
-
- **Output:** `{updated: true, fields_updated: string[]}` (or preview)
|
|
404
|
-
- **Live-verified quirks:** Whoop's PUT is NOT a partial update — sending too few fields returns 422. Birthday accepts either `YYYY-MM-DD` or ISO datetime (the MCP auto-trims the time component). Gender enums must be UPPERCASE; `UNSPECIFIED`/`OTHER`/`PREFER_NOT_TO_SAY` are rejected (only `MALE`/`FEMALE`/`NON_BINARY` work). If `country=US`, the API requires `state` to be set too — otherwise 400 `"AdminDivision (state) must be set for US"`.
|
|
376
|
+
Log or undo (yes:false) a date's period (flow 0 light, 1 medium, 2 heavy) or ovulation, and/or its menstruation flow, cervical mucus and symptoms. Not period and ovulation on one date; no future dates. Any menstruation but none also logs a period day; to remove a period fully, also pass menstruation:null. A period on a fresh date creates a cycle that undo won't remove. Previews unless confirm:true.
|
|
405
377
|
|
|
406
|
-
|
|
407
|
-
|
|
378
|
+
| Input | Type | Notes |
|
|
379
|
+
|---|---|---|
|
|
380
|
+
| `date` (required) | string | |
|
|
381
|
+
| `period` | object | |
|
|
382
|
+
| `ovulation` | object | |
|
|
383
|
+
| `menstruation` | `none`, `light_flow`, `medium_flow`, `heavy_flow`, `spotting` or null | null clears it |
|
|
384
|
+
| `cervical_mucus` | `vaginal-dryness`, `vaginal-discharge---egg-white`, `vaginal-discharge---sticky`, `vaginal-discharge---creamy`, `vaginal-discharge---watery`, `cervical_mucus_pink_brown_or_tan`, `vaginal-discharge---grey` or null | null clears it |
|
|
385
|
+
| `symptoms` | list of object | |
|
|
408
386
|
|
|
409
|
-
|
|
410
|
-
- **Source:** `POST /users-service/v1/hidden-metrics/{metric}` (hide) OR `DELETE /users-service/v1/hidden-metrics/{metric}` (show)
|
|
411
|
-
- **Output:** `{updated: true, metric, is_hidden}` (or preview)
|
|
387
|
+
Add `confirm: true` to make the change.
|
|
412
388
|
|
|
413
|
-
|
|
389
|
+
## Plans and alarms
|
|
414
390
|
|
|
415
|
-
|
|
416
|
-
Call any Whoop endpoint directly. The escape hatch for endpoints not yet wrapped.
|
|
391
|
+
The weekly plan and Smart Alarm.
|
|
417
392
|
|
|
418
|
-
|
|
419
|
-
- **Source:** Whatever path you pass
|
|
420
|
-
- **Output:** `{path, method, status, response}` (or preview for mutations)
|
|
421
|
-
- **Pairs with `whoop_endpoints`** — call that first to discover paths, then use `whoop_raw` to hit them.
|
|
393
|
+
### `whoop_weekly_plan`
|
|
422
394
|
|
|
423
|
-
|
|
424
|
-
Search the bundled catalog of 311 deduped endpoint paths.
|
|
395
|
+
The Weekly Plan for the Monday–Sunday week containing a date (default today): plan name, days left, % accomplished and each goal's target (steps/day or minutes/week), days met and running total.
|
|
425
396
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
397
|
+
| Input | Type | Notes |
|
|
398
|
+
|---|---|---|
|
|
399
|
+
| `date` | string | |
|
|
429
400
|
|
|
401
|
+
### `whoop_weekly_plan_set` (changes data)
|
|
402
|
+
|
|
403
|
+
Change Weekly Plan goals. set_goal adds or edits a goal (starting a Custom plan if there is none): STEPS target in steps/day, STRENGTH_TRAINING_TIME in minutes/week, within WHOOP's slider. remove_goal drops one, and removing the last ends the plan. end_plan removes every goal. Previews unless confirm:true.
|
|
404
|
+
|
|
405
|
+
| Input | Type | Notes |
|
|
406
|
+
|---|---|---|
|
|
407
|
+
| `action` (required) | `set_goal`, `remove_goal`, `end_plan` | |
|
|
408
|
+
| `type` | `STEPS`, `STRENGTH_TRAINING_TIME` | |
|
|
409
|
+
| `target` | integer | |
|
|
410
|
+
|
|
411
|
+
Add `confirm: true` to make the change.
|
|
412
|
+
|
|
413
|
+
### `whoop_smart_alarm`
|
|
414
|
+
|
|
415
|
+
Smart Alarm: recurring schedules (id, days, mode, sleep goal, latest wake time, enabled), unscheduled days, the master switch and the next alarm WHOOP will set. Server state only: it doesn't prove the strap has synced.
|
|
416
|
+
|
|
417
|
+
No inputs.
|
|
418
|
+
|
|
419
|
+
### `whoop_smart_alarm_set` (changes data)
|
|
420
|
+
|
|
421
|
+
Change Smart Alarm. create/edit a recurring schedule (edit merges; mode NO_ALARM is off); a day belongs to one schedule, so claiming it moves it off another. enable/disable flip the master switch; disable also turns the next alarm off. single_alarm sets only the next alarm and turns recurring schedules off. Changes reach the strap only after the WHOOP app syncs. Previews unless confirm:true.
|
|
422
|
+
|
|
423
|
+
| Input | Type | Notes |
|
|
424
|
+
|---|---|---|
|
|
425
|
+
| `action` (required) | `create`, `edit`, `delete`, `enable`, `disable`, `single_alarm` | |
|
|
426
|
+
| `schedule_id` | string | For edit and delete |
|
|
427
|
+
| `days` | list of `MON`, `TUE`, `WED`, `THU`, `FRI`, `SAT`, `SUN` | |
|
|
428
|
+
| `mode` | `EXACT_TIME`, `SLEEP_GOAL`, `IN_THE_GREEN`, `NO_ALARM` | |
|
|
429
|
+
| `sleep_goal` | `PEAK`, `PERFORM`, `GET_BY` | Only with mode SLEEP_GOAL |
|
|
430
|
+
| `wake_time` | string | Latest wake time, 24h, e.g. 06:45 |
|
|
431
|
+
| `enabled` | boolean | The schedule's own on/off flag |
|
|
432
|
+
| `goal` | `EXACT_TIME_PERFORM`, `EXACT_TIME_PEAK`, `EXACT_TIME_OPTIMIZE_SLEEP`, `IN_THE_GREEN`, `SLEEP_HEALTH_PEAK`, `SLEEP_HEALTH_PERFORM`, `SLEEP_HEALTH_GET_BY` | single_alarm only; default EXACT_TIME_PERFORM |
|
|
433
|
+
|
|
434
|
+
Add `confirm: true` to make the change.
|
|
435
|
+
|
|
436
|
+
## Health features
|
|
437
|
+
|
|
438
|
+
WHOOP's paid health features. Healthspan is checked on a real account. Blood pressure, AFib history and Advanced Labs are experimental: built without an account that has them, so untested.
|
|
439
|
+
|
|
440
|
+
### `whoop_health`
|
|
441
|
+
|
|
442
|
+
healthspan for a date: WHOOP Age, pace of aging, contributors. EXPERIMENTAL, untested (fields may be missing or misnamed): blood_pressure for a date; afib history (date: a day; cursor: next page); labs: biomarkers and tests (id: one of them).
|
|
443
|
+
|
|
444
|
+
| Input | Type | Notes |
|
|
445
|
+
|---|---|---|
|
|
446
|
+
| `feature` (required) | `healthspan`, `blood_pressure`, `afib`, `labs` | |
|
|
447
|
+
| `date` | string | |
|
|
448
|
+
| `id` | string | |
|
|
449
|
+
| `cursor` | string | |
|
|
450
|
+
|
|
451
|
+
## Profile, settings and community
|
|
452
|
+
|
|
453
|
+
Your profile, heart-rate zones, app settings, milestones and teams.
|
|
454
|
+
|
|
455
|
+
### `whoop_profile`
|
|
456
|
+
|
|
457
|
+
Your profile: name, email, birthday, gender, physiological baseline, height (m), weight (kg), unit system, location, max and resting HR, membership, hidden metrics and stealth mode. include adds hr_zones (bpm), entitlements (features that are off, and why), integrations and community privacy.
|
|
458
|
+
|
|
459
|
+
| Input | Type | Notes |
|
|
460
|
+
|---|---|---|
|
|
461
|
+
| `include` | list of `hr_zones`, `entitlements`, `integrations`, `privacy` | |
|
|
462
|
+
|
|
463
|
+
### `whoop_profile_update` (changes data)
|
|
464
|
+
|
|
465
|
+
Change profile fields; pass only what changes and the rest is kept. Weight is kg or lb (24–272 kg), height m, cm or in (0.91–2.72 m). Changing birthday or country makes WHOOP end the session; totem refreshes the token on the next call. Email can't be changed here. Previews unless confirm:true.
|
|
466
|
+
|
|
467
|
+
| Input | Type | Notes |
|
|
468
|
+
|---|---|---|
|
|
469
|
+
| `first_name` | string | |
|
|
470
|
+
| `last_name` | string | |
|
|
471
|
+
| `birthday` | string | |
|
|
472
|
+
| `gender` | `MALE`, `FEMALE`, `NON_BINARY`, `PREFER_NOT` | |
|
|
473
|
+
| `physiological_baseline` | `MALE`, `FEMALE` | Sex used for physiology baselines |
|
|
474
|
+
| `weight` | number | |
|
|
475
|
+
| `weight_unit` | `kg`, `lb` | Default kg |
|
|
476
|
+
| `height` | number | |
|
|
477
|
+
| `height_unit` | `m`, `cm`, `in` | Default m |
|
|
478
|
+
| `city` | string | |
|
|
479
|
+
| `state` | string | Region code, e.g. CA; required for US |
|
|
480
|
+
| `country` | string | |
|
|
481
|
+
| `unit_system` | `metric`, `imperial` | Display units; also how WHOOP reads lift weights |
|
|
482
|
+
|
|
483
|
+
Add `confirm: true` to make the change.
|
|
484
|
+
|
|
485
|
+
### `whoop_hr_zones_set` (changes data)
|
|
486
|
+
|
|
487
|
+
Set heart-rate zones. max_hr: set max_heart_rate (WHOOP recomputes its default zones; custom zones stay in force). custom: zones as 5 [min, max] bpm pairs Z1..Z5, contiguous (each min = previous max + 1), Z5 max at most your max HR. reset: back to WHOOP's defaults. Previews unless confirm:true.
|
|
488
|
+
|
|
489
|
+
| Input | Type | Notes |
|
|
490
|
+
|---|---|---|
|
|
491
|
+
| `action` (required) | `max_hr`, `custom`, `reset` | |
|
|
492
|
+
| `max_heart_rate` | integer | |
|
|
493
|
+
| `zones` | list of list of integer | |
|
|
494
|
+
|
|
495
|
+
Add `confirm: true` to make the change.
|
|
496
|
+
|
|
497
|
+
### `whoop_preferences`
|
|
498
|
+
|
|
499
|
+
Account preferences: journal flags, notification namespaces (false = blocked), AI coach settings, the home dashboard (2 focus gauges, pinned metrics and the keys to choose from) and how many journal behaviours you track.
|
|
500
|
+
|
|
501
|
+
| Input | Type | Notes |
|
|
502
|
+
|---|---|---|
|
|
503
|
+
| `include` | list of `journal`, `notifications`, `ai`, `dashboard`, `tracked_behaviors` | Default all |
|
|
504
|
+
|
|
505
|
+
### `whoop_preferences_set` (changes data)
|
|
506
|
+
|
|
507
|
+
Change one account setting, picked by setting: hidden_metric (metric, hidden), stealth (enabled), dashboard (gauges and/or pinned; an omitted one is kept), notification (namespace, enabled), journal_prefs (its three flags), tracked_behaviors (track, untrack; untracking only hides a behaviour, its answers stay), clock_format. Previews unless confirm:true.
|
|
508
|
+
|
|
509
|
+
| Input | Type | Notes |
|
|
510
|
+
|---|---|---|
|
|
511
|
+
| `setting` (required) | `hidden_metric`, `stealth`, `dashboard`, `notification`, `journal_prefs`, `tracked_behaviors`, `clock_format` | |
|
|
512
|
+
| `metric` | `BODY_COMP`, `HEALTHSPAN` | |
|
|
513
|
+
| `hidden` | boolean | |
|
|
514
|
+
| `enabled` | boolean | notification: false blocks the namespace |
|
|
515
|
+
| `namespace` | `StressSummary`, `GPS`, `ConversationalCheckIn`, `CheckIn` | |
|
|
516
|
+
| `gauges` | list of string | 2 metric keys; not RECOVERY or DAY_STRAIN |
|
|
517
|
+
| `pinned` | list of string | Metric keys in order; replaces the list |
|
|
518
|
+
| `journal_enabled` | boolean | |
|
|
519
|
+
| `journal_autopop_enabled` | boolean | |
|
|
520
|
+
| `ai_autopop_enabled` | boolean | |
|
|
521
|
+
| `track` | list of integer or string | Behaviour ids or names |
|
|
522
|
+
| `untrack` | list of integer or string | |
|
|
523
|
+
| `clock_format` | `TWELVE_HOUR_FORMAT`, `TWENTY_FOUR_HOUR_FORMAT` | |
|
|
524
|
+
|
|
525
|
+
Add `confirm: true` to make the change.
|
|
526
|
+
|
|
527
|
+
### `whoop_milestones`
|
|
528
|
+
|
|
529
|
+
Milestone badges and the wear streak: totals, the data streak, top earned badges and the closest unearned ones. include badges lists every badge. milestone_type returns one badge's detail: count, progress to the next level and levels earned with dates.
|
|
530
|
+
|
|
531
|
+
| Input | Type | Notes |
|
|
532
|
+
|---|---|---|
|
|
533
|
+
| `milestone_type` | string | e.g. HIGH_STRAIN |
|
|
534
|
+
| `include` | list of `badges` | |
|
|
535
|
+
|
|
536
|
+
### `whoop_community`
|
|
537
|
+
|
|
538
|
+
Community and friends. Returns OTHER PEOPLE'S names and scores, read live (never cached). Views: communities (your teams and rank), leaderboard (a community's ranking plus your row, for a day or a 7/30-day average), following (people you follow and their shared scores), snapshot (one person's daily scores), comments (on a snapshot). No social writes.
|
|
539
|
+
|
|
540
|
+
| Input | Type | Notes |
|
|
541
|
+
|---|---|---|
|
|
542
|
+
| `view` | `communities`, `leaderboard`, `following`, `snapshot`, `comments` | |
|
|
543
|
+
| `community_id` | integer | leaderboard; default your first |
|
|
544
|
+
| `metric` | `recovery`, `sleep`, `strain` | |
|
|
545
|
+
| `window` | `day`, `week`, `month` | |
|
|
546
|
+
| `date` | string | leaderboard: the window's last day |
|
|
547
|
+
| `limit` | integer | |
|
|
548
|
+
| `offset` | integer | |
|
|
549
|
+
| `user_id` | integer | snapshot: from view following; default you |
|
|
550
|
+
| `snapshot_id` | string | comments: from view snapshot |
|
|
551
|
+
|
|
552
|
+
## Anything else
|
|
553
|
+
|
|
554
|
+
Any WHOOP endpoint, for what no tool covers yet.
|
|
555
|
+
|
|
556
|
+
### `whoop_raw` (changes data)
|
|
557
|
+
|
|
558
|
+
Escape hatch: call any WHOOP endpoint when no tool fits (the whoop://catalog/endpoints resource lists verified paths). Writes need allow_write:true and confirm:true; some paths are refused outright (auth, account, purchases, consents, strap, telemetry). Social writes (follow, comment) are only available here.
|
|
559
|
+
|
|
560
|
+
| Input | Type | Notes |
|
|
561
|
+
|---|---|---|
|
|
562
|
+
| `path` (required) | string | e.g. /home-service/v1/home |
|
|
563
|
+
| `method` | `GET`, `POST`, `PUT`, `PATCH`, `DELETE` | |
|
|
564
|
+
| `query` | object | |
|
|
565
|
+
| `body` | any | |
|
|
566
|
+
| `allow_write` | boolean | |
|