{"openapi":"3.0.0","paths":{"/v1/workouts/metadata":{"get":{"description":"\n## Workout categories & difficulties\n\nReturns category ids/names and difficulty strings for filters and AI generate `categoryId`.\n\n**Try it:** `GET /v1/workouts/metadata` with `X-Api-Key`. Optional `locale`.\n\n**Related:** `GET /v1/workouts/equipment/metadata`, `GET /v1/workouts/exercises/metadata`, `POST /v1/orgs/{orgId}/workouts/generate`.\n    ","operationId":"WorkoutsApi_getWorkoutMetadata","parameters":[{"name":"locale","required":false,"in":"query","description":"Preferred language locale (e.g., fr-FR)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved category and difficulty lists.","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","description":"List of all available workout categories.","items":{"type":"object","properties":{"id":{"type":"string","description":"Category ID","example":"615aa3f0dbe7140012c59e94"},"name":{"type":"string","description":"Category display name","example":"HIIT"}},"required":["id","name"]}},"difficulties":{"type":"array","description":"List of all available difficulty levels.","items":{"type":"string","example":"intermediate"}}},"example":{"categories":[{"id":"615aa3f0dbe7140012c59e94","name":"HIIT"},{"id":"615aa3dadbe7140012c59e90","name":"Strength"},{"id":"615aa3e5dbe7140012c59e92","name":"Mobility"}],"difficulties":["beginner","intermediate","advanced"]}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get available workout categories and difficulties","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/metadata' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutMetadata() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/metadata', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/metadata\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/equipment/metadata":{"get":{"description":"\n## Equipment metadata\n\nReturns equipment categories and items for filters and generate `preferredEquipmentCategoryIds`.\n\n**Try it:** `GET /v1/workouts/equipment/metadata` with `X-Api-Key`. Optional `locale`.\n\n**Related:** `GET /v1/workouts/metadata`, `POST /v1/orgs/{orgId}/workouts/generate`.\n    ","operationId":"WorkoutsApi_getEquipmentMetadata","parameters":[{"name":"locale","required":false,"in":"query","description":"Preferred language locale (e.g., fr-FR)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved equipment and category lists.","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","description":"List of all available equipment categories.","items":{"type":"object","properties":{"id":{"type":"string","description":"Category ID","example":"67deb36a6a5e49797c122f56"},"name":{"type":"string","description":"Category display name","example":"Bodyweight"},"category":{"type":"string","description":"Broader category grouping","example":"bodyweight"}},"required":["id","name","category"]}},"equipment":{"type":"array","description":"List of all available equipment items.","items":{"type":"object","properties":{"id":{"type":"string","description":"Equipment ID","example":"60812dea606fc90011eb4405"},"name":{"type":"string","description":"Equipment display name","example":"Dumbbell"},"equipmentCategoryId":{"type":"string","description":"ID of the category this equipment belongs to (optional)","example":"67deb3696a5e49797c122f55","nullable":true}},"required":["id","name"]}}},"example":{"categories":[{"id":"67deb36a6a5e49797c122f56","name":"Bodyweight","category":"bodyweight"},{"id":"67deb3696a5e49797c122f55","name":"Free Weights","category":"free_weights"},{"id":"67deb36a6a5e49797c122f57","name":"Gym Equipment","category":"gym"}],"equipment":[{"id":"60812dea606fc90011eb4405","name":"Dumbbell","equipmentCategoryId":"67deb3696a5e49797c122f55"},{"id":"60812dd5606fc90011eb4404","name":"Kettlebell","equipmentCategoryId":"67deb3696a5e49797c122f55"},{"id":"60812e08606fc90011eb4408","name":"Mat","equipmentCategoryId":"67deb36a6a5e49797c122f56"}]}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get available equipment categories and equipment items","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/equipment/metadata' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getEquipmentMetadata() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/equipment/metadata', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/equipment/metadata\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}":{"get":{"description":"\n## Workout details\n\nFull document for a **persisted** workout id, wrapped as `{ data: { id, name, duration, difficulty, categories, equipment, muscleGroupPercentages, preview, mixBgMusic, videoAudioMode, ... } }`.\n\n**Try it:** `GET /v1/workouts/{workoutId}` with `X-Api-Key`. Optional `locale` for localized display fields.\n\n**Related:** `GET /v1/workouts/{id}/playlist`, `GET /v1/workouts/{id}/music`, `GET /v1/orgs/{orgId}/workouts`.\n    ","operationId":"WorkoutsApi_getWorkout","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout to retrieve.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"locale","required":false,"in":"query","description":"Preferred language locale (e.g., fr-FR)","schema":{"type":"string"}}],"responses":{"200":{"description":"Workout details retrieved successfully.","schema":{"example":{"data":{"id":"12ab3efd45c67c1234566cd1","name":"Full Body HIIT Power","description":"A high-intensity interval training session targeting full body strength and cardiovascular fitness","duration":1800,"difficulty":"intermediate","visibility":"public","locked":false,"createdAt":"2023-10-26T10:00:00.000Z","updatedAt":"2023-10-27T11:30:00.000Z","trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Sarah Johnson"},"categories":[{"id":"615aa3f0dbe7140012c59e94","name":"HIIT"},{"id":"615aa3ebdbe7140012c59e93","name":"Cardio"}],"equipment":[{"id":"60812dea606fc90011eb4405","name":"Dumbbell","equipmentCategoryId":"67deb3696a5e49797c122f55"},{"id":"60812e08606fc90011eb4408","name":"Mat","equipmentCategoryId":"67deb36a6a5e49797c122f56"}],"muscleGroupPercentages":[{"muscleGroupId":"604b0129beaba770c284ff40","muscleGroupName":"Arms","percentage":25.5},{"muscleGroupId":"604b0169076fe2727354d740","muscleGroupName":"Chest","percentage":20},{"muscleGroupId":"604b0177076fe2727354d743","muscleGroupName":"Legs","percentage":30},{"muscleGroupId":"604b0170076fe2727354d741","muscleGroupName":"Core","percentage":24.5}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-thumb.jpg"},"audioIntro":null,"audioOutro":null,"musicPlaylists":{"spotify":{"url":"https://open.spotify.com/playlist/37i9dQZF1DX76Wlfdnj7AP"},"youtube":null,"appleMusic":null,"amazonMusic":null},"shareLink":{"url":"https://app.hyperhuman.cc/workouts/12ab3efd45c67c1234566cd1"},"organization":null,"rating":4.5,"mixBgMusic":true,"presentationStyle":"full","skipWorkoutPreview":false,"skipWorkoutCompletionScreen":false,"videoAudioMode":"full","allowAssessment":false,"assessmentType":null}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutResponse"}}}},"401":{"description":"Authentication failed - API key is missing, invalid, or Bearer token is missing/invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get workout details","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/similar":{"get":{"description":"\n## Similar workouts\n\nRanked workouts from the **same organization** as `workoutId`, matched on categories, duration, difficulty, and muscle focus. No member profile and no AI.\n\n**Try it:** `GET /v1/workouts/{workoutId}/similar?limit=5` with `X-Api-Key`. Optional `visibility` is `public` (default), `private`, or `all`. Optional `locale`.\n\n**Shape:** `{ data, links }`. `links.total` is the number returned (default **5**, max **10**). `links.next` is omitted. Each item is a workout list row plus up to two `matchLabels`.\n\nAn API key from another organization, or a signed-in member who is not an active client of that organization, cannot read `private`; `all` falls back to `public`.\n\n**Related:** `GET /v1/workouts/{id}`, `GET /v1/orgs/{orgId}/workouts`.\n    ","operationId":"WorkoutsApi_getSimilarWorkouts","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The workout to compare against (24-character hex).","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"visibility","required":false,"in":"query","description":"Library visibility to search. Defaults to `public` when omitted so a public detail page does not return private workouts.","schema":{"default":"public","type":"string","enum":["private","public","all"]}},{"name":"limit","required":false,"in":"query","description":"How many similar workouts to return. Default 5, max 10. This is the full ranked set, not a page.","schema":{"minimum":1,"maximum":10,"default":5,"type":"number"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}}],"responses":{"200":{"description":"Ranked similar workouts. Empty data when nothing clears the match floor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarWorkoutListResponse"}}}},"400":{"description":"Invalid query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"visibility=private from an API key outside the source item organization, or from a signed-in member without an active team membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get similar workouts","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/similar' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getSimilarWorkouts() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/similar', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/similar\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/export/video/stream_url":{"get":{"description":"\n## Full workout video export\n\nReturns a presigned URL to the full-workout video export for a persisted workout id.\n\n**Response:** **200** `Content-Type: text/plain` — body is a **single** URL string (not JSON), valid ~**7 days**. Linked asset matches the stored render (commonly MP4). Play that string **verbatim** (same SigV4 rules as playlist `video.url`: no API key on the media request, no query rewrite).\n\n**When a file exists:** a full video is produced when someone uses Generate in Teams, or when the coach who saves has **Full workout video** on under Workout Defaults → Format (off by default). Turning it on does not render workouts already saved. With it off, a studio save removes every locale and this route stays **404**. With it on, the save renders the coach's language. That locale's previous ready file is returned until the new render replaces it. A failed render leaves the previous file. Other locales stay until a later save with the switch off, or a Generate for that locale. A workout that has never been rendered returns **404** until the first render finishes. A full-length workout often takes tens of minutes, plus queue time. A **200** during that window is the previous file. Re-fetch this route; a URL already fetched stays valid until it expires. Poll on the order of minutes. There is no Content API to start a render or read render status. `GET .../playlist` is independent and is not removed by a studio save.\n\n**Locale:** omit → latest ready export (any locale); provide `locale` → latest ready file for that locale only (**404** if none — no English fallback).\n\n**Rate limit:** **10x**. Prefer `/playlist` for interactive segment playback.\n\n**Related:** `GET /v1/workouts/{id}`, `GET /v1/workouts/{id}/playlist`, `GET /v1/workouts/{id}/export/audio/stream_url`.\n    ","operationId":"WorkoutsApi_getExportVideoStream","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier of the workout.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"locale","required":false,"in":"query","description":"Language locale (e.g., de-DE, fr-FR, en-US). When omitted, the latest ready export (any locale) is returned. When provided, only the latest ready file for that exact locale is returned; if none exists the endpoint returns 404 (no en-US/default fallback). An in-progress render does not hide the previous ready file for that locale.","schema":{"example":"en-US","type":"string"}}],"responses":{"200":{"description":"text/plain body: a single presigned HTTPS URL to the full video export (valid 7 days). Format of the linked asset matches the stored render (commonly MP4; see operation description).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Authentication failed - API key is missing, invalid, or Bearer token is missing/invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workout not found, or no ready full-video export for the requested locale. A first render can take tens of minutes; until a ready file exists this route returns 404. A re-render of another locale does not remove this locale. Playlist playback is unaffected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get complete workout video export URL","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/export/video/stream_url' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getExportVideoStream() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/export/video/stream_url', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/export/video/stream_url\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/export/audio/stream_url":{"get":{"description":"\n## Full workout audio export\n\nReturns a presigned URL to the full narrative audio export for a persisted workout id.\n\n**Response:** **200** `Content-Type: text/plain` — body is a **single** URL string (not JSON), valid ~**7 days** (commonly M4A). Play that string **verbatim** (same SigV4 rules as playlist audio).\n\n**Locale:** omit → resolve with the trainer **preferred locale** (language-family fallback within that language; never cross-language). Provide `locale` → exact match, then same-language family; missing / still processing → **404** (not the same as video export’s “latest any locale / exact-or-404”).\n\n**Rate limit:** **10x**.\n\n**Related:** `GET /v1/workouts/{id}/export/video/stream_url`, `GET /v1/workouts/{id}/playlist`, `GET /v1/workouts/{id}`.\n    ","operationId":"WorkoutsApi_getExportAudioStream","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier of the workout.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"locale","required":false,"in":"query","description":"Language locale for audio narration (e.g., de-DE, fr-FR, en-US). When omitted, uses the trainer preferred locale with same-language family fallback. When provided, exact then family match; if none exists → 404 (never falls back to another language). Differs from video export locale rules.","schema":{"example":"en-US","type":"string"}}],"responses":{"200":{"description":"text/plain body: a single presigned HTTPS URL to the full narrative audio export (valid 7 days; commonly M4A/AAC).","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Authentication failed - API key is missing, invalid, or Bearer token is missing/invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workout not found, audio export not available for the requested locale, or audio is still being generated (processing typically takes 1-3 minutes after workout creation).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get audio-only workout export URL","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/export/audio/stream_url' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getExportAudioStream() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/export/audio/stream_url', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/export/audio/stream_url\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/exercises/metadata":{"get":{"description":"\n## Muscle groups & exercise collections\n\nReturns muscle group ids/names and collection names/counts for generate `muscleGroupIds` / `includeExerciseCollections` / `excludeExerciseCollections`. Not gated by the stock-exercises catalog SKU.\n\n**Try it:** `GET /v1/workouts/exercises/metadata` with `X-Api-Key`. Optional `locale`.\n\n**Related:** `GET /v1/workouts/metadata`, `POST /v1/orgs/{orgId}/workouts/generate`.\n    ","operationId":"WorkoutsApi_getExercisesMetadata","parameters":[{"name":"locale","required":false,"in":"query","description":"Preferred language locale (e.g., fr-FR)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of muscle groups and exercise collections.","content":{"application/json":{"schema":{"type":"object","properties":{"muscleGroups":{"type":"array","description":"List of all available muscle groups.","items":{"type":"object","properties":{"id":{"type":"string","description":"Muscle group ID","example":"604b0129beaba770c284ff40"},"name":{"type":"string","description":"Muscle group display name","example":"Arms"}},"required":["id","name"]}},"collections":{"type":"array","description":"List of all available exercise collections with exercise counts.","items":{"type":"object","properties":{"name":{"type":"string","description":"Collection name","example":"Premium - Neutral"},"count":{"type":"number","description":"Number of exercises in this collection","example":808}},"required":["name","count"]}}},"example":{"muscleGroups":[{"id":"604b0129beaba770c284ff40","name":"Arms"},{"id":"604b0169076fe2727354d740","name":"Chest"},{"id":"604b0177076fe2727354d743","name":"Legs"}],"collections":[{"name":"Premium - Neutral","count":808},{"name":"Premium - Industrial","count":200},{"name":"Free - Eclectic Home","count":239}]}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get available muscle groups and exercise collections","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/exercises/metadata' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getExercisesMetadata() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/exercises/metadata', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/exercises/metadata\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/workouts":{"get":{"description":"\n## Organization Workout Library\n\nPaginated list of **published** workouts for your organization (workspace).\n\nThis is the **workspace catalog only**. A new org with nothing added yet returns **200** with `data: []` and `links.total: 0` — that is success, not a missing global library. Pre-made stock workout templates are **not** listed here until someone adds them in the Teams app (**Workouts → Add from stock**). There is **no** Content API to browse or clone the global stock workout catalog. `GET /v1/orgs/{orgId}/stock-exercises` is stock **clips** (Ultra yearly or custom), not workouts. AI generate adds a row here only with `addToTeamContent: true`. Add your own with `POST /v1/orgs/{organizationId}/workouts`.\n\n**Try it (minimal):** `GET /v1/orgs/{organizationId}/workouts?limit=20` with header `X-Api-Key`. Use your organization id from **Settings → Integrations**. Leave optional filters empty on the first call.\n\n**Pagination:** `limit` (default **20**, max **50**). Follow `links.next` in the response to advance pages.\n\n**Optional filters:** `visibility` (`all` default), `difficulty`, `categoryIds` (comma-separated hex ids from `GET /v1/workouts/metadata`), `tags` (comma-separated; match any, case-insensitive exact), `duration` (`min-max` minutes), `q`, `sort` (`+` / `-` prefix, e.g. `-createdAt`), `allowAssessment`, `locale`.\n\n**Related:** `POST /v1/orgs/{orgId}/workouts`, `POST /v1/orgs/{orgId}/workouts/generate`, `POST /v1/orgs/{orgId}/workouts/recommend`, `GET /v1/workouts/{id}`, `GET /v1/workouts/metadata`.\n    ","operationId":"OrganizationWorkoutsApi_getOrganizationWorkouts","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Unique organization (workspace) resource id — opaque 24-character hex string. Use the organization id from Settings → Integrations.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search text","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Fields to sort. Prefix them with - (descending) or + (ascending): +someField,-otherField","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}},{"name":"visibility","required":false,"in":"query","description":"Filter workouts by their visibility status. Defaults to `all` when omitted (private and public).","schema":{"type":"string","enum":["private","public","all"]}},{"name":"difficulty","required":false,"in":"query","description":"Filter workouts by difficulty level.","schema":{"type":"string","enum":["beginner","intermediate","advanced"]}},{"name":"categoryIds","required":false,"in":"query","description":"Filter workouts by one or more workout category IDs (comma-separated 24-character hex DB ids). Discover ids via `GET /v1/workouts/metadata`. Optional tokens prefixed with `custom:` are filtered in memory (e.g. `custom:duration_short`).","schema":{"type":"string"}},{"name":"duration","required":false,"in":"query","description":"Filter workouts by duration range in minutes. Use \"min-max\" (e.g., \"10-30\") or an open-ended range like \"60-\" (60+ min) or \"-30\" (up to 30 min).","schema":{"pattern":"^(\\d+-\\d*|\\d*-\\d+)$","type":"string"}},{"name":"allowAssessment","required":false,"in":"query","description":"Filter workouts by assessment support","schema":{"type":"boolean"}},{"name":"tags","required":false,"in":"query","description":"Filter workouts by one or more tags (comma-separated). Match any tag, case-insensitive exact. Example: hiit,home","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved paginated list of workouts for the organization.","schema":{"example":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Sarah Johnson"},"createdAt":"2025-09-15T10:30:00.000Z","updatedAt":"2025-09-16T08:00:00.000Z","name":"Morning Power HIIT","description":"High-intensity intervals to start your day","duration":1800,"difficulty":"intermediate","visibility":"public","categories":[{"id":"615aa3f0dbe7140012c59e94","name":"HIIT"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/morning-hiit.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/morning-hiit-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/morning-hiit-poster.jpg"},"rating":4.6,"locked":false,"mixBgMusic":true,"presentationStyle":"full","skipWorkoutPreview":false,"skipWorkoutCompletionScreen":false,"videoAudioMode":"full","allowAssessment":false,"assessmentType":null}],"links":{"next":"https://content.api.hyperhuman.cc/v1/orgs/63415bf67a9c7000126616c1/workouts?offset=20&limit=20","total":45}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutListResponse"}}}},"400":{"description":"Invalid pagination or filter parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization, or a signed-in member requested private content without an active team membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified organization ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List organization-specific workouts","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"Minimal","source":"curl -s 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts?limit=20' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"curl","label":"With filters","source":"curl -s 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts?limit=20&visibility=public&difficulty=intermediate&categoryIds=615aa3f0dbe7140012c59e94&duration=20-30&q=HIIT' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationWorkouts() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts?limit=20', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts?limit=20\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"post":{"description":"\n## Create a workout\n\nSaves a workout to your workspace library, owned by your team manager. Same rules as the Teams builder.\n\n**Try it:** send `name`, `difficulty`, `categoryIds` (from `GET /v1/workouts/metadata`) and at least 2 exercises in `instances`. Exercise ids come from `GET /v1/orgs/{organizationId}/video-assets` or `GET /v1/orgs/{organizationId}/stock-exercises`.\n\n**Shape:** `instances[]` uses the workout generate field names: `kind` (`single-exercise` | `rest`), `exercise.id`, `reps` or `durationSeconds`, optional `pace`, `weightLevel`, `rpe`, `amrap`, `skipIntro`. Send only these fields: other keys from a generate body (instance `id`, `exercise.name`, …) return **400**. Start and end with an exercise. Max 100 exercises and 90 minutes.\n\n**Visibility:** defaults to `private`, so nothing reaches members by accident. Send `public` to publish.\n\n**Response:** **201** with the same body as `GET /v1/workouts/{workoutId}`. The workout shows in `GET .../workouts` once processing finishes.\n\n**Needs:** your organization API key (shared app keys cannot write) and enough content minutes.\n\n**Rate limit:** **1x**.\n\n**Related:** `PATCH` / `DELETE /v1/orgs/{organizationId}/workouts/{workoutId}`, `POST .../workouts/generate` with `addToTeamContent`.\n    ","operationId":"OrganizationWorkoutsApi_createOrganizationWorkout","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Unique organization (workspace) resource id for Hyperhuman Teams — opaque 24-character hex string. Use the organization id from Settings → Integrations.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationWorkoutDto"},"examples":{"two-exercises-with-rest":{"value":{"name":"Morning Power HIIT","difficulty":"intermediate","categoryIds":["615aa3f0dbe7140012c59e94"],"tags":["hiit"],"instances":[{"kind":"single-exercise","exercise":{"id":"60812dea606fc90011eb4406"},"reps":12,"weightLevel":"medium"},{"kind":"rest","durationSeconds":15},{"kind":"single-exercise","exercise":{"id":"6a2d0e568d5154001ac3ede8"},"durationSeconds":30,"pace":"medium"}]}}}}}},"responses":{"201":{"description":"Workout saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutResponse"}}}},"400":{"description":"Invalid body, unknown category, exercise not in your library, or Teams builder limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not your organization key, no team manager, not enough content minutes, or a plan feature is missing (private content, premium exercises).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Create a workout in your organization library","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function createOrganizationWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/workouts/{workoutId}":{"patch":{"description":"\n## Update a workout\n\nChanges only the fields you send. `instances`, when sent, replaces the whole list; omit it to keep the exercises. Same rules as create.\n\n**Response:** **200** with the same body as `GET /v1/workouts/{workoutId}`.\n\n**Errors:** **404** for an unknown id or another organization's workout. **403** when the workout is locked by plan limits.\n\n**Rate limit:** **1x**.\n\n**Related:** `POST /v1/orgs/{organizationId}/workouts`, `DELETE /v1/orgs/{organizationId}/workouts/{workoutId}`.\n    ","operationId":"OrganizationWorkoutsApi_updateOrganizationWorkout","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Unique organization (workspace) resource id for Hyperhuman Teams — opaque 24-character hex string. Use the organization id from Settings → Integrations.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"workoutId","required":true,"in":"path","description":"Workout id (24-character hex) from your organization library.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationWorkoutDto"}}}},"responses":{"200":{"description":"Workout updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutResponse"}}}},"400":{"description":"Invalid body or Teams builder limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not your organization key, workout locked, not enough content minutes, or a plan feature is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workout not found in this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workout changed by another save. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Update a workout in your organization library","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function updateOrganizationWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"\n## Delete a workout\n\nRemoves the workout from your library and frees its content minutes.\n\n**Errors:** **409** when the workout is in a program (remove it from those programs first). **404** for an unknown id or another organization's workout.\n\n**Rate limit:** **1x**.\n\n**Related:** `PATCH /v1/orgs/{organizationId}/plans/{planId}` to take a workout out of a program.\n    ","operationId":"OrganizationWorkoutsApi_deleteOrganizationWorkout","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Unique organization (workspace) resource id for Hyperhuman Teams — opaque 24-character hex string. Use the organization id from Settings → Integrations.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"workoutId","required":true,"in":"path","description":"Workout id (24-character hex) from your organization library.","schema":{"type":"string"}}],"responses":{"204":{"description":"Workout deleted."},"403":{"description":"Not your organization key, or the workout is locked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workout not found in this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workout is used in a program.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete a workout from your organization library","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deleteOrganizationWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/workouts/recommend":{"post":{"description":"\n## Recommend workouts from your library\n\nRanks **existing published workouts** in your organization library for a user profile. Use this when your team already creates workouts and you want to pair the best match (e.g. after a quiz). An empty workspace catalog returns **200** `{ workouts: [], reasoning: \"\" }` — not platform stock templates. For a brand-new workout structure, use `POST .../workouts/generate` instead.\n\n**Try it (minimal):** body `{ \"endUserProfileDetails\": { \"age\": 30, \"fitnessLevels\": [\"beginner\"] } }` with header `X-Api-Key`. Response is a bare object `{ workouts, reasoning }` (not wrapped in `data`). Up to **12** workouts; each item includes a `recommendation` text reason (not a numeric score).\n\n**Body:** `endUserProfileDetails`, optional `categoryIds` (hard-filter the public pool), optional `locale` — unknown keys return `400 ValidationError`. Recommend only returns **published + public** workouts; set a workout to `private` to retire it from new recommendations while `GET /v1/workouts/{id}` still plays.\n\n**Rate limit:** counts as **10x** toward hourly/daily limits.\n\n**Related:** `POST /v1/orgs/{orgId}/workouts/generate`, `GET /v1/orgs/{orgId}/workouts`, `GET /v1/workouts/metadata`, `GET /v1/workouts/{id}`.\n        ","operationId":"OrganizationWorkoutRecommendation_getWorkoutRecommendations","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization/Team unique identifier","schema":{"example":"67e2e9d0e23f010013e19dec","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutRecommendationRequestDto"},"examples":{"minimal":{"summary":"Minimal profile","value":{"endUserProfileDetails":{"age":30,"fitnessLevels":["beginner"],"gender":"female"}}},"withCategories":{"summary":"Active pool via categoryIds","value":{"endUserProfileDetails":{"age":30,"fitnessLevels":["intermediate"]},"categoryIds":["615aa3f0dbe7140012c59e94"]}}}}}},"responses":{"200":{"description":"Ranked list of recommended workouts with per-item recommendation text and overall reasoning","schema":{"example":{"workouts":[{"id":"6a3cf00b9fe2d4001a58d605","name":"Beginner Flow & Core Pilates","description":"","duration":1185,"difficulty":"beginner","thumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","recommendation":"Sculpt your core and legs with this beginner-friendly pilates flow.","categories":[{"id":"615aa3f5dbe7140012c59e95","name":"Pilates"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/preview.mp4","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg"}}],"reasoning":"Workouts recommended based on your profile and preferences."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutRecommendationResponseDto"}}}},"401":{"description":"Unauthorized - Invalid API key"},"404":{"description":"Organization/Team not found"}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get workout recommendations from existing library","tags":["ai-recommendation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/recommend' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutRecommendations() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/recommend', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/recommend\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/workouts/generate":{"post":{"description":"\n## Generate a workout\n\nCreates an AI workout from profile, `categoryId`, duration options, and exercise sources. Prefer `POST .../workouts/recommend` when you only need a match from your existing library.\n\n**Playback / storage:** Without `addToTeamContent`, the response is **ephemeral JSON** (`name`, `instances[]` with `kind` `single-exercise`|`rest`, `totalDurationSeconds`, …) with **no top-level persisted workout `id`**. Not listed by `GET /v1/orgs/{orgId}/workouts`. Play via the JSON-receiver embed (`/embed/workout-json-receiver` + `HYPERHUMAN_EMBED_INIT`) or a custom player; the embed resolves media via `GET /v1/video-asset/{exerciseId}`. `durationSeconds` (or `reps × estimatedRepDuration`) is the planned work window — the MP4 is often shorter; loop it when `playsInLoop` is true. Do **not** call `/playlist` or `/music` (need a persisted id). JSON-receiver has **no** PulseMix and **no** session/feedback tracking — use the pre-built `/embed/workout/{id}` for those. Persist the JSON yourself if you need replay/audit later. See API overview **Embedded Player**.\n\n**Save to your library:** add `\"addToTeamContent\": true` (optional `visibility`, default `private`). The workout is saved as your team manager and the response includes its `id`. Needs your organization API key, `categoryId`, max 90 minutes, and enough content minutes — all checked **before** generating. Same 10x call.\n\n**Try it (minimal):** body `{ \"endUserProfileDetails\": { \"age\": 28, \"fitnessLevels\": [\"beginner\"] }, \"exerciseSources\": [\"premium_stock\"], \"durationOptions\": { \"minMinutes\": 10, \"maxMinutes\": 15 }, \"categoryId\": \"<from GET /v1/workouts/metadata>\" }` with `X-Api-Key`.\n\n**Sources:** `premium_stock` (production), `free_stock` (dev/test), `team_exercises` (your catalog). Omit / empty → free+premium stock. Prefer `premium_stock` or `team_exercises` alone in production. Constrained empty (`team_exercises` and/or `premium_stock` only, 0 matching clips) → **`400`** — add a source or publish team exercises. The server does **not** fall back to free stock or a template workout. Collection floor ≥ 10 still applies first when include/exclude is set.\n\n**Exercise collections:** optional `includeExerciseCollections` (allowlist — only these `collectionName` values) or `excludeExerciseCollections` (denylist). Mutually exclusive — both non-empty → `400`. Compose with `exerciseSources` (AND). Prefer **include** to lock trainer/location/brand look; do not simulate include by excluding every other collection. Discover names via `GET /v1/workouts/exercises/metadata`. Filtered pool must have ≥ 10 exercises or request returns `400`.\n\n**Localization:** optional body `locale` (BCP-47). Unsupported → `400`. Additive `*Localized` / `nameTranslations` / `difficultyLabel` when non-English; legacy `name` / `difficulty` stay English.\n\n**Rate limit:** counts as **10x**.\n\n**Body:** free-text is `userRequirements` (not `userGuidance` — that name is adapt-only). Unknown keys → `400` `ValidationError`.\n\n**Programming DNA (opt-in):** optional `methodologyProfileId` from `GET /v1/orgs/{organizationId}/methodologies`. Nothing is applied unless you send that id (no silent team default). Unknown, personal, or inactive ids return `400`. Omit still means none. `userRequirements` still wins over methodology **text** for this request. Hard structured rules and platform bounds (exercise pool, safety, duration window, structure) cannot be overridden by text. Response may include a **Generation Inspector** snapshot: `methodology` and `inspection` (`hardRulesApplied`, `violations`, `complianceStatus`, `generationId`). Store that snapshot yourself — there is no public GET-by-generation-id. Text guidelines are guidance, not a guarantee; hard-rule results in `inspection` are deterministic.\n\n**Client timeout:** keep the HTTP client open at least **120 seconds**. A client abort can leave a completed `200` you never read — do not treat abort as a 500 and do not immediately retry the same generate.\n\n**Related:** `GET /v1/orgs/{organizationId}/methodologies`, `POST /v1/orgs/{orgId}/workouts/generate/preflight`, `POST /v1/orgs/{orgId}/workouts/recommend`, `POST /v1/orgs/{orgId}/workouts/{workoutId}/adapt`, `GET /v1/video-asset/{id}`, `GET /v1/workouts/metadata`, `GET /v1/workouts/exercises/metadata`.\n","operationId":"OrganizationWorkoutGeneration_generateWorkout","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"67e2e9d0e23f010013e19dec","type":"string"}}],"requestBody":{"required":true,"description":"Workout generation request with user profile and preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutGenerationRequestDto"},"examples":{"beginner-hiit-20min":{"summary":"Beginner HIIT - 20 Minutes","description":"Full-body HIIT workout for beginners with minimal equipment","value":{"endUserProfileDetails":{"age":28,"gender":"female","fitnessLevels":["beginner"],"trainingDaysPerWeek":3,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56"]},"exerciseSources":["premium_stock"],"durationOptions":{"minMinutes":15,"maxMinutes":20},"categoryId":"615aa3f0dbe7140012c59e94"}},"advanced-strength-upper-body":{"summary":"Advanced Strength - Upper Body Focus","description":"Advanced strength training targeting chest, arms, and shoulders with free weights","value":{"endUserProfileDetails":{"age":35,"gender":"male","fitnessLevels":["advanced"],"trainingDaysPerWeek":5,"preferredEquipmentCategoryIds":["67deb3696a5e49797c122f55"]},"exerciseSources":["premium_stock"],"durationOptions":{"minMinutes":30,"maxMinutes":45},"categoryId":"615aa3dadbe7140012c59e90","muscleGroupIds":["604b0169076fe2727354d740","604b0129beaba770c284ff40","604b0165076fe2727354d73e"],"excludeExerciseCollections":["Free - Outdoor"]}},"intermediate-mobility-recovery":{"summary":"Intermediate Mobility & Recovery","description":"Low-intensity mobility workout for active recovery","value":{"endUserProfileDetails":{"age":42,"gender":"female","fitnessLevels":["intermediate"],"trainingDaysPerWeek":4,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56"]},"exerciseSources":["premium_stock"],"durationOptions":{"minMinutes":10,"maxMinutes":15},"categoryId":"615aa3e5dbe7140012c59e92","userRequirements":"Focus on low-impact movements. Emphasize flexibility and joint mobility. Avoid high-intensity exercises."}},"team-branded-workout":{"summary":"Custom Team Exercises Only","description":"Use your organization's exercises for complete brand alignment","value":{"endUserProfileDetails":{"age":30,"gender":"male","fitnessLevels":["intermediate"],"trainingDaysPerWeek":3,"preferredEquipmentCategoryIds":["67deb3696a5e49797c122f55"]},"exerciseSources":["team_exercises"],"durationOptions":{"minMinutes":20,"maxMinutes":30},"categoryId":"615aa3f0dbe7140012c59e94"}},"team-branded-single-collection":{"summary":"Same trainer / location (include collections)","description":"Restrict the AI pool to one or more team exercise collections so every clip shares the same trainer and filming location. Prefer includeExerciseCollections over excluding every other collection.","value":{"endUserProfileDetails":{"age":30,"gender":"female","fitnessLevels":["intermediate"],"trainingDaysPerWeek":3,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56"]},"exerciseSources":["team_exercises"],"includeExerciseCollections":["Coach Mia - Loft"],"durationOptions":{"minMinutes":20,"maxMinutes":30},"categoryId":"615aa3f0dbe7140012c59e94"}},"cardio-legs-focus":{"summary":"Cardio with Legs Focus","description":"Cardio workout emphasizing leg muscles","value":{"endUserProfileDetails":{"age":26,"gender":"female","fitnessLevels":["intermediate"],"trainingDaysPerWeek":4,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56"]},"exerciseSources":["premium_stock"],"durationOptions":{"minMinutes":25,"maxMinutes":35},"categoryId":"615aa3ebdbe7140012c59e93","muscleGroupIds":["604b0177076fe2727354d743","604b0173076fe2727354d742"],"excludeExerciseCollections":["Premium - Industrial"]}},"complete-all-parameters":{"summary":"Complete Example - All Parameters","description":"Real-world example with ALL available parameters filled out to demonstrate the full API capability. This shows every possible field that can be included in a workout generation request.","value":{"endUserProfileDetails":{"age":32,"gender":"male","fitnessLevels":["intermediate","advanced"],"goalIds":["63c92926f920a9005c4e619c","63c92926f920a9005c4e619d"],"trainingDaysPerWeek":5,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56","67deb3696a5e49797c122f55"],"endUserId":"64e3bca9d1b7e600141a9712"},"exerciseSources":["premium_stock","team_exercises"],"durationOptions":{"minMinutes":30,"maxMinutes":45},"categoryId":"615aa3dadbe7140012c59e90","muscleGroupIds":["604b0169076fe2727354d740","604b0129beaba770c284ff40","604b0165076fe2727354d73e","604b016c076fe2727354d740","604b0170076fe2727354d741"],"excludeExerciseCollections":["Free - Eclectic Home","Free - Outdoor","Premium - Industrial"],"userRequirements":"Intermediate strength / stimulus, one-sided exercises, rep schemes. Focus on controlled movements suitable for osteoporosis patients. CRITICAL: USE up to 3 unique exercises in the whole workout.","locale":"fr-FR"}},"localized-fr-FR":{"summary":"Localized Workout (French)","description":"Minimal request with locale — returns French AI title and localized exercise metadata via additive *Localized fields.","value":{"endUserProfileDetails":{"age":28,"fitnessLevels":["intermediate"]},"exerciseSources":["premium_stock"],"durationOptions":{"minMinutes":10,"maxMinutes":15},"categoryId":"615aa3f0dbe7140012c59e94","locale":"fr-FR"}}}}}},"responses":{"200":{"description":"Successfully generated workout plan with automatic warm-up and cooldown sections. AI may adjust final difficulty based on exercise availability and safety considerations.","schema":{"example":{"name":"Intermediate Strength Builder","nameTranslations":{"en-US":"Intermediate Strength Builder","fr-FR":"Renforcement Musculaire Intermédiaire"},"totalDurationSeconds":660,"difficulty":"intermediate","difficultyLabel":"Intermédiaire","categoryId":"615aa3f0dbe7140012c59e94","category":{"id":"615aa3f0dbe7140012c59e94","name":"HIIT"},"instances":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","kind":"single-exercise","durationSeconds":30,"skipIntro":false,"pace":"medium","exercise":{"id":"6a2d0e568d5154001ac3ede8","name":"Lateral Hip Opener","nameLocalized":"Lateral Hip Opener","thumbnailUrl":"https://cdn.example.com/exercises/thumbnails/lateral-hip-opener.jpg","videoUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/lateral-hip-opener.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","estimatedRepDuration":1500,"muscleGroups":["Legs","Glutes"],"muscleGroupsLocalized":[{"id":"604b0177076fe2727354d743","name":"Jambes"},{"id":"604b0173076fe2727354d742","name":"fessiers"}],"equipment":["Mat"],"equipmentLocalized":[{"id":"60812e08606fc90011eb4408","name":"Tapis"}]}},{"id":"64f1a2b3c4d5e6f7a8b9c0d2","kind":"rest","durationSeconds":15},{"id":"64f1a2b3c4d5e6f7a8b9c0d3","kind":"single-exercise","reps":12,"skipIntro":true,"weightLevel":"medium","exercise":{"id":"60812dea606fc90011eb4406","name":"Push-ups","nameLocalized":"Pompes","thumbnailUrl":"https://cdn.example.com/exercises/thumbnails/push-ups.jpg","videoUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/push-ups.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","estimatedRepDuration":2000,"muscleGroups":["Chest","Arms","Core"],"muscleGroupsLocalized":[{"id":"604b0169076fe2727354d740","name":"Poitrine"},{"id":"604b0129beaba770c284ff40","name":"Bras"}],"equipment":["Bodyweight"],"equipmentLocalized":[{"id":"67deb36a6a5e49797c122f56","name":"Poids du corps"}]}}]}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutGenerationResponseDto"}}}},"400":{"description":"Bad Request — invalid input, unsupported locale, include+exclude collections together, or filtered exercise pool below 10 after collection/source filters (including 0 matches, e.g. include collections + category with no overlap). Empty/below-floor pools are 400, not 500. Discover collection names via GET /v1/workouts/exercises/metadata.","schema":{"example":{"error":{"code":"BadRequest","message":"Unsupported locale: xx-XX"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid API key.","schema":{"example":{"error":{"code":"Unauthorized","message":"API key is not authorized"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - API key required or insufficient permissions.","schema":{"example":{"error":{"code":"Forbidden","message":"API key is not authorized for this organization"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found - Organization or other resources not found.","schema":{"example":{"error":{"code":"NotFound","message":"Organization with ID 67e2e9d0e23f010013e19dec not found"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error - Failed to generate workout.","schema":{"example":{"error":{"code":"InternalServerError","message":"Failed to generate workout plan due to an internal issue."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable - the AI provider is temporarily overloaded and no template fallback exists for the requested category. Retry with backoff.","schema":{"example":{"error":{"code":"ServiceUnavailable","message":"Workout generation is temporarily unavailable. Please retry shortly."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Generate personalized on-the-fly workouts based on user profile details, duration preferences, and exercise sources.","tags":["ai-generation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/generate' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function generateWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/generate', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/generate\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/workouts/generate/preflight":{"post":{"description":"\n## Workout generate preflight\n\nSame body as `POST .../workouts/generate`. Does **not** create a workout. Returns the resolved team methodology (if `methodologyProfileId` was sent), hard and preferred rules that would apply, the effective request after hard-rule clamps, and `infeasible[]` (empty means the request is feasible).\n\n**Try it:** copy a generate body and add `methodologyProfileId` from `GET /v1/orgs/{organizationId}/methodologies`. If `infeasible` is non-empty, fix duration / collections / sources or pick another profile before generate.\n\n**Opt-in:** omit `methodologyProfileId` → no team methodology is resolved. Recommend and adapt have no preflight.\n\n**Validation:** the body is validated like generate — an unsupported `locale` is **400** here as well, not a feasible preflight.\n\n**Rate limit:** **1x** (this path is not the 10x generate call).\n\n**Related:** `POST /v1/orgs/{organizationId}/workouts/generate`, `GET /v1/orgs/{organizationId}/methodologies`.\n","operationId":"OrganizationWorkoutGeneration_generateWorkoutPreflight","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutGenerationRequestDto"}}}},"responses":{"200":{"description":""}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Dry-run workout generate: resolve methodology and check hard Programming DNA rules","tags":["ai-generation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/generate/preflight' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function generateWorkoutPreflight() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/generate/preflight', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/generate/preflight\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/workouts/{workoutId}/adapt":{"post":{"description":"\n## Adapt a team workout\n\nPersonalizes an existing organization workout (intensity, duration, exercise substitutions) from profile signals, recent session/feedback history, optional wearable context, and `userGuidance` (not `userRequirements` — that name is generate-only). Goals and overall structure intent of the source workout are preserved. The source `{workoutId}` must belong to `{organizationId}` (otherwise `404`).\n\n**Playback / storage:** Same as workout **generate** — ephemeral `{ name, instances[], … }` (no top-level workout `id`). Play via the JSON-receiver **iframe** + `HYPERHUMAN_EMBED_INIT` (media via `GET /v1/video-asset/{exerciseId}`) or a custom player. `durationSeconds` is the work window; loop the (often shorter) clip when `playsInLoop` is true. No `/playlist`, `/music`, or sessions/feedback. Prefer `POST .../workouts/recommend` for a library match. See API overview **Embedded Player**.\n\n**Rate limit:** counts as **10x**.\n\n**Client timeout:** keep the HTTP client open at least **120 seconds**.\n\n**Related:** `POST /v1/orgs/{orgId}/workouts/generate`, `POST /v1/orgs/{orgId}/workouts/recommend`, `GET /v1/orgs/{orgId}/workouts`, `GET /v1/workouts/{id}`.\n        ","operationId":"OrganizationWorkoutAdaptation_adaptWorkout","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization/Team ID","schema":{"example":"67e2e9d0e23f010013e19dec","type":"string"}},{"name":"workoutId","required":true,"in":"path","description":"Workout ID to adapt","schema":{"example":"67e2e9d0e23f010013e19def","type":"string"}}],"requestBody":{"required":true,"description":"Workout adaptation request with user profile and preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutAdaptationRequestDto"},"examples":{"basic-adaptation":{"summary":"Basic Adaptation - Intermediate User","description":"Adapt a workout for an intermediate fitness level user","value":{"endUserProfileDetails":{"age":32,"gender":"female","fitnessLevels":["intermediate"],"trainingDaysPerWeek":4},"exerciseSources":["premium_stock","team_exercises"]}},"injury-adaptation":{"summary":"Adaptation with Injury Guidance","description":"Adapt a workout considering user injury","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":45,"gender":"male","fitnessLevels":["beginner"],"trainingDaysPerWeek":3},"exerciseSources":["premium_stock"],"userGuidance":"I have a slight knee injury. Please avoid high-impact exercises like jumping and running. Prefer low-impact alternatives."}},"full-personalization":{"summary":"Full Personalization with User Data","description":"Adapt using 60-day wearable data and full user profile","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":28,"gender":"female","fitnessLevels":["advanced"],"goalIds":["63c92926f920a9005c4e619c"],"trainingDaysPerWeek":5,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56","67deb3696a5e49797c122f55"]},"exerciseSources":["premium_stock","team_exercises"],"userGuidance":"Training for a 10K run in 2 months. Focus on building endurance. Limited time today, prefer shorter workout."}}}}}},"responses":{"200":{"description":"Adapted workout with personalized adjustments","schema":{"example":{"name":"Adapted: Full Body HIIT Power","totalDurationSeconds":1050,"difficulty":"intermediate","categoryId":"615aa3f0dbe7140012c59e94","adaptationReasoning":"Reduced workout duration from 20 to 17.5 minutes to accommodate your current fitness level. Adjusted rest periods to 20 seconds (from 15) to allow better recovery. Modified exercise intensity by reducing reps for high-impact movements to protect your knee. Substituted jumping exercises with low-impact alternatives.","instances":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","kind":"single-exercise","durationSeconds":30,"skipIntro":false,"pace":"medium","exercise":{"id":"60812dea606fc90011eb4405","name":"Jumping Jacks","description":"Full body cardio warm-up exercise","thumbnailUrl":"https://cdn.example.com/exercises/thumbnails/jumping-jacks.jpg","videoUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/jumping-jacks.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","estimatedRepDuration":1500,"muscleGroups":["Full Body","Cardio"],"equipment":["Bodyweight"],"collectionName":"Premium - Neutral","coach":"female","skillLevel":"beginner","categories":["warmup","cardio"]}},{"id":"64f1a2b3c4d5e6f7a8b9c0d2","kind":"rest","durationSeconds":20},{"id":"64f1a2b3c4d5e6f7a8b9c0d3","kind":"single-exercise","reps":10,"skipIntro":true,"weightLevel":"medium","rpe":7,"exercise":{"id":"60812dea606fc90011eb4406","name":"Modified Push-ups","description":"Upper body strength exercise adapted for lower intensity","thumbnailUrl":"https://cdn.example.com/exercises/thumbnails/push-ups.jpg","videoUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/push-ups.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","estimatedRepDuration":2000,"muscleGroups":["Chest","Arms"],"equipment":["Bodyweight"],"collectionName":"Premium - Neutral","coach":"female","skillLevel":"intermediate","categories":["strength"]}}]}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutAdaptationResponseDto"}}}},"400":{"description":"Invalid request or workout not eligible for adaptation (only team workouts can be adapted)"},"401":{"description":"Unauthorized - Invalid API key"},"404":{"description":"Workout or organization not found"}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Adapt an existing team workout based on user profile and data","tags":["ai-adaptation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>/adapt' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function adaptWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>/adapt', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/workouts/<WORKOUT_ID>/adapt\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/methodologies":{"get":{"description":"\n## List methodology profiles\n\nReturns **team-scoped** Programming DNA profiles created in Hyperhuman Teams (**Set as team guideline**). Use an item `id` as `methodologyProfileId` on workout or plan **generate**. A workspace can publish **up to 10** team profiles. Personal (member-only) profiles are not listed.\n\n**What:** id, name, version, whether it is the team default, applicability (`workoutCategoryIds`, `programGoalIds`), `updatedAt`, and a `ruleSummary` (rule type, hard vs preferred, workout / program / both). **Full guidance text is not returned.**\n\n**Empty list:** `{ \"items\": [] }` when the workspace has no team profiles. That is a successful **200**, not an error and not a feature-off signal.\n\n**Opt-in:** listing never applies a profile. `isTeamDefault` is informational. Generate applies a profile only when you send `methodologyProfileId`. Unknown, personal, or inactive ids on generate return **400**. Recommend, adapt, and chat do not use this list. Generate may return a **Generation Inspector** snapshot (`methodology` / `inspection`) — store it; there is no GET-by-generation-id.\n\n**Rate limit:** **1x**.\n\n**Related:** `POST /v1/orgs/{organizationId}/workouts/generate`, `POST /v1/orgs/{organizationId}/workouts/generate/preflight`, `POST /v1/orgs/{organizationId}/plans/generate`.\n","operationId":"OrganizationMethodologies_list","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List team Programming DNA profiles for this organization","tags":["ai-generation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/methodologies' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function list() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/methodologies', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/methodologies\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot":{"get":{"description":"\n## Content Autopilot Tasks\n\nRetrieves a paginated list of content autopilot tasks for your organization. Autopilot tasks automate the creation, adaptation, and publishing of workouts and programs on a configurable schedule.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Use Cases\n\n- **Dashboard views** - List all scheduled content automation tasks\n- **Status monitoring** - Filter by active/draft to see running vs paused tasks\n- **Content type filtering** - Show only workout or program automation tasks\n- **Audit and review** - Browse task configurations for the organization\n\n---\n\n### Filtering and Pagination\n\n**Filters:**\n- `status` - active, draft\n- `scope` - ai_generate, create_similar, publish_existing\n- `contentType` - workout, program\n\n**Sort:** `sortBy` (updatedAt, createdAt) + `sortOrder` (ascend, descend)\n\n**Pagination:**\n- `limit` - Items per page (default: 20, max: 50)\n- `offset` - Pagination offset (default: 0)\n\n---\n\n### Related Endpoints\n\n- Get Task: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}`\n- Create Task: `POST /v1/orgs/{orgId}/content-autopilot`\n- Task Events: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}/events`\n    ","operationId":"OrganizationContentAutopilotApi_listTasks","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filter by task status","schema":{"enum":["active","draft"],"type":"string"}},{"name":"scope","required":false,"in":"query","description":"Filter by task scope","schema":{"enum":["ai_generate","create_similar","publish_existing"],"type":"string"}},{"name":"contentType","required":false,"in":"query","description":"Filter by content type","schema":{"enum":["workout","program"],"type":"string"}},{"name":"sortBy","required":false,"in":"query","description":"Sort by field","schema":{"enum":["updatedAt","createdAt"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"enum":["ascend","descend"],"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Pagination offset. Defaults to 0.","schema":{"example":0,"type":"number"}}],"responses":{"200":{"description":"Successfully retrieved paginated list of autopilot tasks.","content":{"application/json":{"examples":{"default":{"summary":"List of autopilot tasks","value":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"63415bf67a9c7000126616c1","ownerId":"507f1f77bcf86cd799439011","name":"Daily HIIT Generator","status":"active","scope":"ai_generate","contentType":"workout","difficultyOptions":["beginner","intermediate"],"includeFreeStock":true,"includePremiumStock":false,"includeTeamContent":false,"repeatMode":"daily","nextRunAt":"2026-04-06T10:00:00.000Z","createdAt":"2026-04-01T08:00:00.000Z","updatedAt":"2026-04-05T14:00:00.000Z"}],"links":{"next":null,"total":1},"explanation":"Showing 1 autopilot task for your organization."}}}}}},"400":{"description":"Invalid filter or pagination parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List content autopilot tasks","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listTasks() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"post":{"description":"\n## Create Autopilot Task\n\nCreates a new content autopilot task in `draft` status. Use the activate endpoint to start the scheduling.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Task Scopes\n\n| Scope | Description | Required Fields |\n|-------|-------------|-----------------|\n| `ai_generate` | Generate new content using AI | categoryIds/goalIds, difficultyOptions |\n| `create_similar` | Adapt an existing workout/program | `sourceContentId` |\n| `publish_existing` | Flip visibility to public on schedule | `existingContentId` |\n\n---\n\n### Prompt Guidance Modes\n\n| Mode | Description |\n|------|-------------|\n| `none` | No additional prompt context |\n| `custom` | User-written free text (`customPromptGuidance`) |\n| `ai_tuned` | 30-day analytics context appended to prompt |\n| `ai_driven` | Fully autonomous - AI decides category, difficulty, duration |\n\n---\n\n### Validation\n\n- `contentAutopilotActiveTasksLimit` must not be `0` (Content Autopilot not on plan)\n- `minutesLimit` entitlement must have remaining capacity\n- `premiumStock` entitlement required if `includePremiumStock` is true\n- `sourceContentId` / `existingContentId` must belong to the organization\n\n---\n\n### Related Endpoints\n\n- Activate: `POST /v1/orgs/{orgId}/content-autopilot/{taskId}/activate`\n- Update: `PATCH /v1/orgs/{orgId}/content-autopilot/{taskId}`\n- List: `GET /v1/orgs/{orgId}/content-autopilot`\n    ","operationId":"OrganizationContentAutopilotApi_createTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutopilotTaskDto"},"examples":{"aiGenerate":{"summary":"AI-generated daily workout","value":{"name":"Daily HIIT Generator","scope":"ai_generate","contentType":"workout","categoryIds":["615aa3f0dbe7140012c59e94"],"difficultyOptions":["beginner","intermediate"],"durationMin":15,"durationMax":30,"includeFreeStock":true,"repeatMode":"daily","promptGuidanceMode":"ai_driven"}},"createSimilar":{"summary":"Weekly workout variation","value":{"name":"Monday Strength Variation","scope":"create_similar","contentType":"workout","sourceContentId":"507f1f77bcf86cd799439011","difficultyOptions":["intermediate"],"repeatMode":"weekly"}},"publishExisting":{"summary":"Scheduled publish","value":{"name":"Publish Friday Program","scope":"publish_existing","contentType":"program","existingContentId":"507f1f77bcf86cd799439012","difficultyOptions":["beginner"],"repeatMode":"once","nextRunAt":"2026-04-10T09:00:00.000Z"}}}}}},"responses":{"201":{"description":"Task created in draft status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotTaskResponseDto"}}}},"400":{"description":"Invalid input or missing required fields for scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Entitlement limit exceeded or API key not authorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Create content autopilot task","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function createTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot/events":{"get":{"description":"\n## Organization Autopilot Events\n\nRetrieves execution history across all content autopilot tasks for the organization. Each event records a task execution outcome: success, failure, or skip.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Use Cases\n\n- **Execution dashboard** - View recent automation activity across all tasks\n- **Failure monitoring** - Filter by `failed` to identify issues\n- **Audit trail** - Review content creation history with content IDs\n\n---\n\n### Filtering\n\n- `taskId` - Filter events to a specific task\n- `eventType` - success, failed, skipped_limit, skipped_premium_lost\n\n---\n\n### Related Endpoints\n\n- List Tasks: `GET /v1/orgs/{orgId}/content-autopilot`\n- Task Events: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}/events`\n    ","operationId":"OrganizationContentAutopilotApi_listTeamEvents","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"eventType","required":false,"in":"query","description":"Filter by event type","schema":{"enum":["success","failed","skipped_limit","skipped_premium_lost"],"type":"string"}},{"name":"taskId","required":false,"in":"query","description":"Filter events to a specific task","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Pagination offset. Defaults to 0.","schema":{"example":0,"type":"number"}}],"responses":{"200":{"description":"Successfully retrieved execution events.","content":{"application/json":{"examples":{"default":{"summary":"Execution event list","value":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0e1","taskId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"63415bf67a9c7000126616c1","ownerId":"507f1f77bcf86cd799439011","eventType":"success","resultContentId":"64f1a2b3c4d5e6f7a8b9c0f1","resultContentType":"workout","createdAt":"2026-04-05T10:00:00.000Z"}],"links":{"next":null,"total":1}}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List execution events across all tasks","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/events' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listTeamEvents() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/events', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/events\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot/{taskId}":{"get":{"description":"\n## Autopilot Task Detail\n\nReturns full configuration of a content autopilot task including schedule, content parameters, and prompt guidance settings.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Related Endpoints\n\n- List Tasks: `GET /v1/orgs/{orgId}/content-autopilot`\n- Update Task: `PATCH /v1/orgs/{orgId}/content-autopilot/{taskId}`\n- Task Events: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}/events`\n    ","operationId":"OrganizationContentAutopilotApi_getTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved autopilot task detail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotTaskResponseDto"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get autopilot task by ID","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"patch":{"description":"\n## Update Autopilot Task\n\nPartially updates an autopilot task's configuration. All fields are optional. Fields not included in the request body remain unchanged.\n\nNotable: update `nextRunAt` to reschedule an active task to a different day without affecting its repeat configuration.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Related Endpoints\n\n- Get Task: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}`\n- Activate: `POST /v1/orgs/{orgId}/content-autopilot/{taskId}/activate`\n    ","operationId":"OrganizationContentAutopilotApi_updateTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAutopilotTaskDto"},"examples":{"reschedule":{"summary":"Reschedule to a different date","value":{"nextRunAt":"2026-04-12T09:00:00.000Z"}},"updateConfig":{"summary":"Update difficulty and duration","value":{"difficultyOptions":["intermediate","advanced"],"durationMin":20,"durationMax":40}}}}}},"responses":{"200":{"description":"Task updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotTaskResponseDto"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Update autopilot task configuration","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function updateTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"\n## Delete Autopilot Task\n\nSoft-deletes a content autopilot task. The task will no longer execute and will not appear in list results.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Related Endpoints\n\n- List Tasks: `GET /v1/orgs/{orgId}/content-autopilot`\n    ","operationId":"OrganizationContentAutopilotApi_deleteTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"204":{"description":"Task deleted."},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or already deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete autopilot task (soft delete)","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deleteTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot/{taskId}/activate":{"post":{"description":"\n## Activate Task\n\nSets the task status to `active` and determines the next scheduled execution time.\n\n**Schedule resolution:**\n1. If the task already has a `nextRunAt` in the future, it is preserved.\n2. Otherwise, `nextRunAt` is computed from the task's `repeatMode`.\n3. For `once` mode, defaults to now.\n\nActivating a task that is not already active needs a free slot under the plan's `contentAutopilotActiveTasksLimit` (active tasks per organization); otherwise **403**.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Related Endpoints\n\n- Deactivate: `POST /v1/orgs/{orgId}/content-autopilot/{taskId}/deactivate`\n- Run Now: `POST /v1/orgs/{orgId}/content-autopilot/{taskId}/run-now`\n    ","operationId":"OrganizationContentAutopilotApi_activateTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"200":{"description":"Task activated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotTaskResponseDto"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Active task limit reached for the plan, or API key not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Activate autopilot task","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/activate' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function activateTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/activate', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/activate\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot/{taskId}/deactivate":{"post":{"description":"\n## Deactivate Task\n\nSets the task status to `draft` and clears the `nextRunAt` schedule. The task will stop executing until activated again.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Related Endpoints\n\n- Activate: `POST /v1/orgs/{orgId}/content-autopilot/{taskId}/activate`\n    ","operationId":"OrganizationContentAutopilotApi_deactivateTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"200":{"description":"Task deactivated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotTaskResponseDto"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Deactivate autopilot task","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/deactivate' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deactivateTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/deactivate', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/deactivate\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot/{taskId}/run-now":{"post":{"description":"\n## Run Now\n\nExecutes a content autopilot task immediately, bypassing the cron schedule. Respects all entitlement limits and daily execution caps (max 20 per user per day).\n\nThe task can be in any status (active or draft) -- this allows testing a task configuration before activating it on a schedule.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Rate Limit\n\nThis endpoint triggers AI content generation and counts as 10x API calls toward your hourly and daily limits.\n\n---\n\n### Related Endpoints\n\n- Activate: `POST /v1/orgs/{orgId}/content-autopilot/{taskId}/activate`\n- Task Events: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}/events`\n    ","operationId":"OrganizationContentAutopilotApi_runNow","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"200":{"description":"Task executed successfully."},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Entitlement limit exceeded or API key not authorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Manually trigger task execution","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/run-now' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function runNow() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/run-now', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/run-now\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/content-autopilot/{taskId}/events":{"get":{"description":"\n## Task Execution History\n\nRetrieves the execution event log for a specific autopilot task. Each event records a task run outcome.\n\n**Event types:**\n- `success` - Content created and published successfully. `resultContentId` contains the new content ID.\n- `failed` - Execution failed. `errorMessage` contains the reason.\n- `skipped_limit` - Daily execution limit (20/day) reached. Task retries next day.\n- `skipped_premium_lost` - Premium stock entitlement lost. Schedule advanced.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n\n---\n\n### Related Endpoints\n\n- Get Task: `GET /v1/orgs/{orgId}/content-autopilot/{taskId}`\n- Team Events: `GET /v1/orgs/{orgId}/content-autopilot/events`\n    ","operationId":"OrganizationContentAutopilotApi_listTaskEvents","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the autopilot task.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"eventType","required":false,"in":"query","description":"Filter by event type","schema":{"enum":["success","failed","skipped_limit","skipped_premium_lost"],"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Pagination offset. Defaults to 0.","schema":{"example":0,"type":"number"}}],"responses":{"200":{"description":"Successfully retrieved task execution events.","content":{"application/json":{"examples":{"default":{"summary":"Task execution history","value":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0e1","taskId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"63415bf67a9c7000126616c1","ownerId":"507f1f77bcf86cd799439011","eventType":"success","resultContentId":"64f1a2b3c4d5e6f7a8b9c0f1","resultContentType":"workout","createdAt":"2026-04-05T10:00:00.000Z"},{"id":"64f1a2b3c4d5e6f7a8b9c0e2","taskId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"63415bf67a9c7000126616c1","ownerId":"507f1f77bcf86cd799439011","eventType":"failed","errorMessage":"Content minutes limit reached","createdAt":"2026-04-04T10:00:00.000Z"}],"links":{"next":null,"total":2}}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Task not found or deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List execution events for a task","tags":["content-autopilot"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/events' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listTaskEvents() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/events', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/content-autopilot/<TASKID>/events\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/drops":{"get":{"description":"\n## Organization Social Drops\n\nRetrieves paginated list of ready social drops for your organization. A drop is a publish-ready package (video variants, covers, copy packs) linked to an Exercise, Collection (Micro Workout), Workout, or Program.\n\n**Note:** Only drops with status `ready` are returned. Draft, processing, and failed drops are excluded.\n\n---\n\n### Access and Auth\n\n- **Auth:** API key (X-Api-Key header)\n- **Scope:** Organization (organizationId)\n- **Capabilities:** List ready drops, get drop detail, export channel bundle (video, cover, copy pack)\n\n---\n\n### Use Cases\n\n- **Social scheduling tools** - List drops for content calendar\n- **Content management dashboards** - Browse and export ready assets\n- **Bulk export workflows** - Get video + cover + copy for channel publishing\n- **Channel-specific discovery** - Filter by aspect ratio and duration\n\n---\n\n### Filtering and Pagination\n\n**Filters:**\n- `sourceType` - exercise, exerciseCollection, workout, workoutCollection\n- `sourceId` - Filter by source entity ID (use with sourceType for entity-context views)\n- `aspectRatio` - 9:16, 1:1, 16:9 (drops that have this variant)\n- `duration` - 15, 30, 60 (seconds; drops that have this variant)\n- `q` - Search by drop title (min 3 characters)\n\n**Sort:** Use `sort` with +field (asc) or -field (desc), e.g. `-updatedAt`, `+createdAt`\n\n**Pagination:**\n- `limit` - Items per page (default: 20, max: 50)\n- `offset` - Pagination offset (default: 0)\n\n---\n\n### Best Practices\n\n- **Cache responses** - Drops change when new content is published\n- **Use sourceId** - Filter by source when showing drops in entity-context modals\n- **Handle empty results** - Graceful fallback when no ready drops exist\n\n---\n\n### Related Endpoints\n\n- Get Drop: `GET /v1/orgs/{orgId}/drops/{dropId}` - Full detail with variants and copy packs\n- Export Drop: `POST /v1/orgs/{orgId}/drops/{dropId}/export` - Channel bundle (video, cover, copy)\n    ","operationId":"OrganizationDropsApi_getOrganizationDrops","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search by drop title (min 3 characters)","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Sort: +updatedAt, -createdAt","schema":{"type":"string"}},{"name":"sourceType","required":false,"in":"query","description":"Filter by source type","schema":{"enum":["exercise","exerciseCollection","workout","workoutCollection"],"type":"string"}},{"name":"sourceId","required":false,"in":"query","description":"Filter by source entity ID","schema":{"type":"string"}},{"name":"aspectRatio","required":false,"in":"query","description":"Filter by aspect ratio","schema":{"enum":["9:16","1:1","16:9"],"type":"string"}},{"name":"duration","required":false,"in":"query","description":"Filter by duration in seconds","schema":{"enum":[15,30,60],"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Pagination offset. Defaults to 0.","schema":{"example":0,"type":"number"}}],"responses":{"200":{"description":"Successfully retrieved paginated list of ready drops for the organization.","content":{"application/json":{"examples":{"default":{"summary":"List of ready drops","value":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"63415bf67a9c7000126616c1","sourceType":"exercise","sourceId":"507f1f77bcf86cd799439011","sourceName":"Jumping Jacks","title":"Jumping Jacks","sourceThumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/...","sourceTypeLabel":"Exercise","locale":"en-US","channelPreset":"ig_reels","channelPresetLabel":"Instagram Reels","availableVariants":["9:16_30000","9:16_15000","1:1_30000"],"createdAt":"2025-09-15T10:30:00Z","updatedAt":"2025-09-16T14:20:00Z"},{"id":"64f1a2b3c4d5e6f7a8b9c0d2","organizationId":"63415bf67a9c7000126616c1","sourceType":"workout","sourceId":"12ab3efd45c67c1234566cd1","sourceName":"Morning Power HIIT","title":"Morning Power HIIT","sourceThumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/...","sourceTypeLabel":"Workout","locale":"en-US","channelPreset":"ig_reels","channelPresetLabel":"Instagram Reels","availableVariants":["9:16_60000","1:1_30000"],"createdAt":"2025-09-14T08:00:00Z","updatedAt":"2025-09-15T11:45:00Z"}],"links":{"next":"https://content.api.hyperhuman.cc/v1/orgs/63415bf67a9c7000126616c1/drops?limit=20&offset=20","total":42},"explanation":"Your ready social drops - video variants, covers, and copy packs for channel publishing."}}}}}},"400":{"description":"Invalid filter or pagination parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List organization social drops","tags":["social"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationDrops() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/drops/{dropId}":{"get":{"description":"\n## Drop Detail\n\nReturns full drop detail including video variants with presigned download and poster URLs, and copy packs per channel.\n\n**Response structure:**\n- `copyPack` - Copy pack for the default channel (channelPreset)\n- `copyPacks` - Copy packs per channel; use `copyPacks[viewChannel] ?? copyPack` for channel switching\n- `variants` - Video variants with aspectRatio, duration, downloadLink, posterLink, posterLinksByChannel, size\n\n**URL expiration:** Presigned URLs are valid for 7 days.\n\n---\n\n### Related Endpoints\n\n- List Drops: `GET /v1/orgs/{orgId}/drops` - Browse organization drops\n- Export Drop: `POST /v1/orgs/{orgId}/drops/{dropId}/export` - Get channel bundle\n    ","operationId":"OrganizationDropsApi_getOrganizationDropById","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"dropId","required":true,"in":"path","description":"The unique identifier of the drop.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved drop detail.","content":{"application/json":{"examples":{"default":{"summary":"Drop detail with variants and copy packs","value":{"id":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"63415bf67a9c7000126616c1","sourceType":"exercise","sourceId":"507f1f77bcf86cd799439011","sourceName":"Jumping Jacks","title":"Jumping Jacks","sourceThumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/...","sourceTypeLabel":"Exercise","locale":"en-US","channelPreset":"ig_reels","channelPresetLabel":"Instagram Reels","availableVariants":["9:16_30000","9:16_15000","1:1_30000"],"copyPack":{"hook":"Get fit in 30 seconds!","caption":"30 seconds of Jumping Jacks to get your heart pumping. Perfect for a quick warm-up or standalone cardio burst. Try it now and feel the burn.","hashtags":"#fitness #workout #hiit #cardio","cta":"Link in bio","posterTagline":{"primaryLine":"30s HIIT","secondaryLine":"Jumping Jacks"}},"copyPacks":{"ig_reels":{"hook":"Get fit in 30 seconds!","caption":"30 seconds of Jumping Jacks to get your heart pumping. Perfect for a quick warm-up or standalone cardio burst. Try it now and feel the burn.","hashtags":"#fitness #workout #hiit #cardio","cta":"Link in bio","posterTagline":{"primaryLine":"30s HIIT","secondaryLine":"Jumping Jacks"}},"tiktok":{"hook":"30 sec cardio burst","caption":"Jumping Jacks - no equipment needed. Drop a heart if you finished it.","hashtags":"#fitness #workout #cardio #30secondchallenge","cta":"Full workout in bio","posterTagline":{"primaryLine":"30s HIIT","secondaryLine":"Jumping Jacks"}}},"variants":[{"aspectRatio":"9:16","duration":30000,"downloadLink":"https://hhcontent.s3.../drop_9x16_30.mp4?X-Amz-...","posterLink":"https://hhcontent.s3.../poster.png?X-Amz-...","posterLinksByChannel":{"tiktok":"https://hhcontent.s3.../poster_tiktok.png?X-Amz-..."},"size":1234567},{"aspectRatio":"9:16","duration":15000,"downloadLink":"https://hhcontent.s3.../drop_9x16_15.mp4?X-Amz-...","posterLink":"https://hhcontent.s3.../poster_15.png?X-Amz-...","size":654321},{"aspectRatio":"1:1","duration":30000,"downloadLink":"https://hhcontent.s3.../drop_1x1_30.mp4?X-Amz-...","posterLink":"https://hhcontent.s3.../poster_1x1.png?X-Amz-...","size":987654}],"createdAt":"2025-09-15T10:30:00Z","updatedAt":"2025-09-16T14:20:00Z"}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Drop not found or not ready.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get drop by ID","tags":["social"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops/<DROPID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationDropById() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops/<DROPID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops/<DROPID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/drops/{dropId}/export":{"post":{"description":"\n## Export for Channel Bundle\n\nReturns presigned video download URL, cover image URL, and copy pack for the specified channel. Use for one-click export to Reels, Shorts, TikTok, etc.\n\n**Response contents:**\n- `videoDownloadLink` - Presigned S3 URL for MP4 video (valid 7 days)\n- `coverLink` - Presigned S3 URL for cover/poster image\n- `copyPack` - Hook, caption, hashtags, CTA, poster tagline\n- `ctaUrl` - Optional CTA URL from team settings (when configured)\n\n**Channel presets:** ig_reels, ig_stories, ig_carousel, tiktok, yt_shorts, fb_reels, yt_longform. Each has default aspect ratio and duration; override via body.\n\n---\n\n### Integration Example\n\n```javascript\nconst res = await fetch(\n  `/v1/orgs/${orgId}/drops/${dropId}/export`,\n  {\n    method: 'POST',\n    headers: {\n      'X-Api-Key': apiKey,\n      'Content-Type': 'application/json',\n    },\n    body: JSON.stringify({ channelPreset: 'ig_reels' }),\n  }\n);\nconst { videoDownloadLink, coverLink, copyPack } = await res.json();\n// Download video, copy caption to clipboard\n```\n\n---\n\n### Best Practices\n\n- **Refresh URLs before expiry** - Presigned URLs valid for 7 days\n- **Use channel preset** - Platform-specific defaults (aspect ratio, duration)\n- **Handle 400** - Requested variant may not be available for this drop\n\n---\n\n### Related Endpoints\n\n- Get Drop: `GET /v1/orgs/{orgId}/drops/{dropId}` - Full detail before export\n- List Drops: `GET /v1/orgs/{orgId}/drops` - Browse organization drops\n    ","operationId":"OrganizationDropsApi_exportDrop","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"dropId","required":true,"in":"path","description":"The unique identifier of the drop.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"requestBody":{"required":false,"description":"Optional overrides. Omit to use drop defaults.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportDropDto"},"examples":{"default":{"summary":"Use drop defaults","value":{}},"igReels":{"summary":"Instagram Reels","value":{"channelPreset":"ig_reels"}},"customVariant":{"summary":"Custom variant","value":{"channelPreset":"tiktok","aspectRatio":"9:16","duration":15}}}}}},"responses":{"200":{"description":"Channel bundle with presigned URLs and copy pack.","content":{"application/json":{"examples":{"default":{"summary":"Export bundle for Instagram Reels","value":{"videoDownloadLink":"https://hhcontent.s3.../drop_9x16_30.mp4?X-Amz-...","coverLink":"https://hhcontent.s3.../cover.png?X-Amz-...","ctaUrl":"https://mybrand.com/fitness","copyPack":{"hook":"Get fit in 30 seconds!","caption":"30 seconds of Jumping Jacks to get your heart pumping. Perfect for a quick warm-up or standalone cardio burst. Try it now and feel the burn.","hashtags":"#fitness #workout #hiit","cta":"Link in bio","posterTagline":{"primaryLine":"30s HIIT","secondaryLine":"Jumping Jacks"}}}}}}}},"400":{"description":"Requested variant not available for this drop.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Drop not found or not ready.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Export drop for channel bundle","tags":["social"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops/<DROPID>/export' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function exportDrop() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops/<DROPID>/export', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/drops/<DROPID>/export\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/social-publish/connected-platforms":{"get":{"description":"Returns which platforms (instagram, tiktok, youtube, facebook) have a stored account id for this organization. Account connection is managed in the Hyperhuman team app, not via this API.","operationId":"OrganizationSocialPublishApi_getConnectedPlatforms","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationConnectedPlatformsResponseDto"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List connected social platforms","tags":["social-publish"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/connected-platforms' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getConnectedPlatforms() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/connected-platforms', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/connected-platforms\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/social-publish":{"get":{"description":"\n## List social publish tasks\n\nPaginated scheduled social-publish automations for this organization (`{ data, links }`).\n\n**Try it:** `GET /v1/orgs/{organizationId}/social-publish?limit=20` with `X-Api-Key`. Optional `status` (`active` | `draft`). Pagination: `limit` (default **20**, max **50**); advance via `links.next`.\n\n**Related:** `GET .../social-publish/connected-platforms`, `POST .../social-publish`, `PATCH .../social-publish/{taskId}`.\n    ","operationId":"OrganizationSocialPublishApi_listTasks","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Number of items to skip before collecting results (zero-based). Prefer the `links.next` cursor for pagination.","schema":{"minimum":0,"default":0,"example":0,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filter by task status","schema":{"type":"string","enum":["active","draft","paused"]}},{"name":"sourceMode","required":false,"in":"query","description":"Filter by source mode","schema":{"type":"string","enum":["manual_fixed","random_ready","ai_insights","content_mix","ai_pick"]}},{"name":"sortBy","required":false,"in":"query","description":"Sort by field","schema":{"type":"string","enum":["updatedAt","createdAt"]}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"type":"string","enum":["ascend","descend"]}},{"name":"search","required":false,"in":"query","description":"Case-insensitive substring match on automation name (min 1 character after trim)","schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSocialPublishTaskListResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List scheduled social publish automations","tags":["social-publish"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listTasks() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"post":{"description":"\n## Create a social publish task\n\nCreates a social-publish automation as **draft** (**201**). Body matches the team internal create-social-publish task shape. OAuth connect, run-now, and per-run event listing are **not** on Content API — use the team app / internal routes.\n\n**Next:** `PATCH .../social-publish/{taskId}` with `{ \"status\": \"active\" }` to schedule (requires connected accounts for target platforms; otherwise **422**).\n\n**Related:** `GET .../social-publish/connected-platforms`, `GET .../social-publish`, `PATCH .../social-publish/{taskId}`.\n    ","operationId":"OrganizationSocialPublishApi_createTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSocialDropPublishTaskDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSocialPublishTaskResponseDto"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Create a social publish automation (draft)","tags":["social-publish"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function createTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/social-publish/{taskId}":{"get":{"description":"\n## Get a social publish task\n\nReturns one automation by `taskId` for this organization (includes schedule fields and last-run outcome when present). **404** if missing or not owned by the org.\n\n**Related:** `GET .../social-publish`, `PATCH .../social-publish/{taskId}`, `DELETE .../social-publish/{taskId}`.\n    ","operationId":"OrganizationSocialPublishApi_getTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the scheduled social publish automation.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSocialPublishTaskResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get one social publish automation","tags":["social-publish"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"patch":{"description":"\n## Update a social publish task\n\nPartial update. `status: active` schedules the task (requires connected accounts for all target platforms; missing accounts / posting base URL → **422**). `status: draft` pauses and clears `nextRunAt`. Other fields follow the same rules as the team internal API.\n\n**Related:** `GET .../social-publish/connected-platforms`, `GET .../social-publish/{taskId}`.\n    ","operationId":"OrganizationSocialPublishApi_patchTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the scheduled social publish automation.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationPatchSocialPublishTaskDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSocialPublishTaskResponseDto"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Update a social publish automation","tags":["social-publish"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function patchTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"\n## Delete a social publish task\n\nSoft-deletes the automation (**204**). Cron will not pick it up afterward; an in-flight run may still finish.\n\n**Related:** `GET .../social-publish`, `PATCH .../social-publish/{taskId}`.\n    ","operationId":"OrganizationSocialPublishApi_deleteTask","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"taskId","required":true,"in":"path","description":"The unique identifier of the scheduled social publish automation.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"responses":{"204":{"description":""}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete a social publish automation (soft delete)","tags":["social-publish"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deleteTask() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/social-publish/<TASKID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/playlist":{"get":{"description":"\n## Workout playlist\n\nOrdered playback segments for a **persisted** workout id. Response: `{ data, presentationStyle?, links? }` where `data` is an array of **single-key** objects keyed by segment kind (`intro`, `exercise`, `multiExercise`, `class`, `promo`, `educational`, `break`, `outro`). Not the AI-generate `instances[]` shape.\n\n**Try it:** `GET /v1/workouts/{workoutId}/playlist` with `X-Api-Key`. Optional `locale` (BCP-47) localizes segment names, equipment, muscle groups, and audio selection (unsupported → English fallback).\n\n**Segments:** `exercise` has timing/prescription + `main.video` / instruction audio (`url`, optional `type` / `locale` / `scriptText`). `class` may include optional `chapters[]` (`startTimeSec` / `endTimeSec` within `main.video`) when analysis ran; chapter text is not re-localized. `multiExercise` is the original-audio block kind (still emitted when present).\n\n**Clip vs duration:** For `kind: exercise`, `duration` is the planned work window (time-based instance duration, or reps × estimatedRepDuration). The MP4 is a short looping demo and is often shorter than `duration` (e.g. ~27s file in a 60s slot). When `main.video.loop` is `-1` (asset `playsInLoop` true, the default), keep looping until that clock elapses. `class` / `multiExercise` / `promo` / `educational` `duration` is the file length instead.\n\n**Media:** Video and audio `url` values are time-limited AWS S3 **presigned HTTPS** links to **progressive MP4** / M4A (typically ~**7 days**). Re-fetch the playlist before expiry; do not treat URLs as durable. Not HLS/DASH/ABR — play with HTML5 `<video>` / AVPlayer / ExoPlayer (no hls.js required). Play each `url` **verbatim**: the `X-Amz-*` query *is* the credential. Do **not** attach `X-Api-Key` to the media request. Do **not** parse and rebuild the URL (re-encoding `%2F` or dropping `x-amz-*` params) — S3 then returns **403**. Byte-range GETs are allowed. Intro, exercise, and music URLs share this contract (no alternate host).\n\n**Posters:** On `exercise` / `class` / `multiExercise` / `promo` / `educational`, `intro.video.poster` and `main.video.poster` (and matching `thumbnail`) are **public unsigned S3 JPEGs** (`Content-Type: image/jpeg`, typically `.../e/{id}/poster_a_720p.jpg`). Fetch them as images — no API key, no `X-Amz-*` query. Do **not** use `video.url` (the MP4) as the poster. **Intro and outro** `video` objects are `{ url }` only (no `poster` / `thumbnail`); do not bind a missing poster to `<img src=\"\">` (the browser then loads the current HTML page). Breaks use `image.url`, not `video.poster`. List/detail `preview.poster` is a separate field (cover / still / clip) — segment posters come from the exercise still (`thumbnailUri`).\n\n**Related:** `GET /v1/workouts/{id}`, `GET /v1/workouts/{id}/music`, `POST /v1/workouts/{id}/sessions/start`, custom-player guide.\n    ","operationId":"WorkoutContentApi_getWorkoutPlaylist","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique workout id (24-character hex DB id) whose playlist is required.","schema":{"example":"a1b2c3d4e5f6a7b8c9d0e1f2","type":"string"}},{"name":"locale","required":false,"in":"query","description":"Language locale for localized content (BCP-47 format). Affects exercise names, equipment names, muscle group names, and audio selection. Supported: en-US, en-GB, en-AU, fr-FR, de-DE, es-ES, it-IT, pt-PT, he-IL, ro-RO, cs-CZ, fi-FI, lt-LT, nl-NL, pl-PL, ar-XA. Falls back to English if unsupported.","schema":{"example":"fr-FR","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the detailed workout playlist structure. `data` is an ordered array; each item is an object with a single key indicating the segment kind (one of `intro`, `exercise`, `multiExercise`, `class`, `promo`, `educational`, `break`, `outro`). The value under that key is the segment payload (see schema for the per-kind shape).","schema":{"example":{"data":[{"intro":{"kind":"workout-intro","id":"intro","duration":5.2,"audio":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/intro.m4a","type":"workoutIntro","locale":"en-US","scriptText":"Welcome to your workout."},"video":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/intro.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=..."}}},{"exercise":{"kind":"exercise","id":"exercise_squats_1","exerciseId":"507f1f77bcf86cd799439011","duration":60,"name":"Bodyweight Squats","reps":12,"pace":"medium","weightLevel":null,"rpe":7,"amrap":false,"equipment":[{"id":"60812e08606fc90011eb4408","name":"Mat"}],"muscleGroups":[{"id":"604b0177076fe2727354d743","name":"Legs"}],"intro":{"audio":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/squat-cue.m4a","type":"exerciseCue","locale":"en-US","scriptText":"Next up, bodyweight squats."},"video":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/squat-intro.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","loop":-1}},"main":{"video":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/squat-main.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","loop":-1},"instructionAudio":[{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/squat-instruction-1.m4a","type":"exerciseInstruction","locale":"en-US","scriptText":"Stand tall with your feet shoulder-width apart. Lower into a squat, keeping your chest up."}]}}},{"class":{"kind":"class","id":"64f1a2b3c4d5e6f7a8b9c0d1","exerciseId":"507f1f77bcf86cd799439013","duration":1200,"name":"Morning Strength Class","equipment":[{"id":"60812e08606fc90011eb4408","name":"Kettlebell"}],"muscleGroups":[{"id":"604b0177076fe2727354d743","name":"Full Body"}],"intro":{"audio":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/class-intro.m4a"},"video":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/class-intro.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","loop":-1}},"skipIntro":false,"main":{"video":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/class-main.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg"}},"chapters":[{"name":"Goblet Squat","startTimeSec":180.5,"endTimeSec":420,"equipment":[{"id":"60812e08606fc90011eb4408","name":"Kettlebell"}],"muscleGroups":[{"id":"604b0177076fe2727354d743","name":"Quadriceps"}]},{"name":"Push Press","startTimeSec":420,"endTimeSec":720,"equipment":[{"id":"60812e08606fc90011eb4408","name":"Kettlebell"}],"muscleGroups":[{"id":"604b0177076fe2727354d744","name":"Shoulders"}]}]}},{"break":{"kind":"break","id":"break_1","duration":30,"video":null}},{"outro":{"kind":"workout-outro","id":"outro","duration":45.5,"audio":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/outro-cooldown.m4a","type":"workoutOutro","locale":"en-US","scriptText":"Great work. See you next time."},"video":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/outro.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=..."}}}],"presentationStyle":"full","links":{}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutPlaylistResponse"}}}},"401":{"description":"Authentication failed. API key or Bearer token is missing, invalid, or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID does not exist or a playlist could not be generated for it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]},{"AccessToken":[]}],"summary":"Retrieve Detailed Workout Playlist Structure","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/playlist' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutPlaylist() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/playlist', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/playlist\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/music":{"get":{"description":"\n## Workout music playlist\n\nReturns the shuffled PulseMix track pool for a **persisted** workout id (`GET /v1/workouts/{workoutId}/music`). Bare response: `{ tracks, totalDuration, workoutDuration }`.\n\n**Requires a real workout id** from your library (or another persisted workout). The embedded **JSON receiver** path (AI-generated / host-built `{ name, instances }` without a saved id) does **not** call this endpoint and has **no** automatic background music.\n\n**Selection:** trainer music preferences and workout categories; stock fallback when unset. `totalDuration` is the summed pool length (not trimmed to the workout). Empty pool → `200` with `tracks: []` and `totalDuration: 0` (not 404). Pre-signed URLs expire in about 7 days. Play `tracks[].url` **verbatim** (same SigV4 contract as playlist video) — no API key on the media request, no query rewrite.\n\nGate playback with the workout's `videoAudioMode` / `mixBgMusic` (see audio policy in the API overview).\n\n**Related:** `GET /v1/workouts/{id}`, `GET /v1/workouts/{id}/playlist`.\n    ","operationId":"WorkoutContentApi_getWorkoutMusic","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier of the workout","schema":{"example":"a1b2c3d4e5f6a7b8c9d0e1f2","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved workout music playlist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutMusicPlaylistResponse"}}}},"401":{"description":"Authentication failed. API key or Bearer token is missing, invalid, or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]},{"AccessToken":[]}],"summary":"Get workout music playlist","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/music' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutMusic() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/music', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/music\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/sessions/start":{"post":{"description":"\n## Start a workout session\n\nCreates a session for a **persisted** workout id (**201**). Key-only calls are **anonymous** (`traineeId: null`) unless you attribute with `endUserId` / `externalUserId` (+ `organizationId` for standard/club keys). A Bearer token, when present, wins. Optional `programPosition` (0-based `positionInPlan`) is stored on this session. It fills that active-program slot on completion only when the workout id there is still this workout.\n\nThis call marks every other in-progress session for the same workout and trainee completed. Those older sessions keep their own progress and any `programPosition` already stored on them. They do **not** receive this call's `programPosition`. One already at progress `>= 0.1` pins that stored slot when the index still holds this workout; otherwise it fills the earliest open copy. When an identity exists, call `GET .../sessions/recent` first and continue that session instead of starting another. Anonymous recent is **404**.\n\n**Lifecycle:** start → PATCH `progressSeconds` every 10–30s → `sessions/end` (keep last progress) or `sessions/complete` (force 100%) → optional feedback. Do not send `programPosition` on PATCH. The **pre-built** embed (`/embed/workout/{id}`) calls this lifecycle; an attributed play reuses the open session. The **JSON-receiver** embed does not (no persisted workout id).\n\n**Related:** `PATCH /v1/workouts/{id}/sessions/{sessionId}`, `POST .../sessions/end`, `POST .../sessions/complete`, `POST .../feedback`, API overview **Embedded Player**.\n    ","operationId":"WorkoutsSessionsApi_startWorkoutSession","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout to start a session for.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":false,"description":"Optional session start body. Omit it (or send `{}`) for an authenticated/anonymous session. To attribute the session to a specific end user with only an API key, send `endUserId` (or `externalUserId`) and, for standard/club keys, `organizationId`. Optional `programPosition` is the 0-based active-program slot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWorkoutSessionBody"},"examples":{"authenticated-user":{"summary":"Authenticated User Session","description":"Standard session start for logged-in user with automatic session management","value":{}},"anonymous-user":{"summary":"Anonymous User Session","description":"Session start without authentication - limited tracking capabilities","value":{}},"attributed-end-user":{"summary":"Attributed End-User Session (API key)","description":"Attribute the session to a specific end user without a member token. Resolved against the API key team.","value":{"endUserId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"a1b2c3d4e5f6a7b8c9d0e1f2"}},"program-slot":{"summary":"Active-program slot","description":"Name the slot the member opened. Ignored unless that index is still this workout.","value":{"programPosition":2}}}}}},"responses":{"201":{"description":"Workout session successfully started. Any previous incomplete sessions for this workout are automatically closed.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d1","createdAt":"2025-01-10T08:30:00.000Z","updatedAt":"2025-01-10T08:30:00.000Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSegmentId":"intro","status":"started","duration":0,"progress":0}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSessionResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Start workout session","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/start' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function startWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/start', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/start\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/sessions/{sessionId}":{"patch":{"description":"\n## Update session progress\n\nPATCH an active session with `progressSeconds` (actual playback time, pauses excluded) and/or `workoutSegmentId`. Duration is capped at 2× expected workout length. Prefer PATCH every 10–30s and on segment changes; final PATCH before end/complete. Do not send `programPosition` here — unknown fields are rejected. Send it on start, end, or complete.\n\nOptional `logDraft` (`{ weightUnit?, exerciseData[] }`, same rules as feedback `exerciseData`) keeps in-player weight / reps on the session until the check-in. Send it with `progressSeconds` (a draft-only PATCH leaves progress as is) and send back only `weightUnit` + `exerciseData`. `null` clears it. Feedback, `sessions/complete`, and `sessions/start` (when it closes older open sessions) clear it.\n\nPATCH writes only while the session is open: a PATCH that races a completion is **409**.\n\n**Related:** `POST .../sessions/start`, `POST .../sessions/end`, `POST .../sessions/complete`.\n    ","operationId":"WorkoutsSessionsApi_patchWorkoutSession","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout associated with the session.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"sessionId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout session to update.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"description":"Update session progress. Send progressSeconds to track actual playback time. For a key-only attributed session, re-send the same end-user fields used on start (`endUserId` or `externalUserId`, plus `organizationId` for standard/club keys) so the lookup stays scoped to that end user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchWorkoutSessionBody"},"examples":{"updateProgress":{"summary":"Update playback progress (recommended)","description":"Track actual playback time. This is the primary method for accurate duration tracking.","value":{"workoutSegmentId":"seg-exercise-2","progressSeconds":125.5}},"updateSegmentOnly":{"summary":"Update segment only","description":"Track which segment user is on without updating playback time.","value":{"workoutSegmentId":"seg-exercise-3"}},"attributed-end-user":{"summary":"Attributed progress update (API key)","description":"Re-send the end-user attribution alongside progress for a key-only attributed session.","value":{"workoutSegmentId":"seg-exercise-2","progressSeconds":125.5,"endUserId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"a1b2c3d4e5f6a7b8c9d0e1f2"}},"progressWithLogDraft":{"summary":"Progress + in-player logs (logDraft)","description":"Keep the sets logged so far on the session until the check-in. Send the full list each time (it replaces the stored draft). A weight needs weightUnit; one entry per instanceId. Send logDraft: null to clear it.","value":{"progressSeconds":310,"logDraft":{"weightUnit":"metric","exerciseData":[{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d1","weight":12,"reps":10},{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d2","weight":12,"reps":8}]}}}}}}},"responses":{"200":{"description":"Workout session updated successfully.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d1","createdAt":"2025-01-10T08:30:00.000Z","updatedAt":"2025-01-10T08:32:45.500Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSegmentId":"seg-exercise-2","status":"started","duration":125.5,"progress":0.15}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSessionResponse"}}}},"400":{"description":"Invalid data provided in the request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The workout does not exist, or the session does not exist / does not belong to this workout and trainee. Checked before the completed-state 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Session is already completed and cannot be updated (also when a completion, such as the check-in, lands while this PATCH is in flight).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Update a workout session","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/<SESSION_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function patchWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/<SESSION_ID>', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/<SESSION_ID>\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"get":{"description":"\n## Get session by id\n\nReturns one session (`status`, `duration`, `progress`, timestamps). Scoped to caller identity: Bearer wins; for key-only attributed sessions pass `endUserId` / `externalUserId` query fields (+ `organizationId` for standard/club keys).\n\n**Related:** `GET .../sessions/recent`, `PATCH .../sessions/{sessionId}`, `POST .../sessions/end`.\n    ","operationId":"WorkoutsSessionsApi_getWorkoutSession","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout associated with the session.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"sessionId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout session to retrieve.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"endUserId","required":false,"in":"query","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}},{"name":"externalUserId","required":false,"in":"query","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","schema":{"example":"ext-user-12345","type":"string"}},{"name":"organizationId","required":false,"in":"query","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","schema":{"example":"a1b2c3d4e5f6a7b8c9d0e1f2","type":"string"}}],"responses":{"200":{"description":"Workout session details retrieved successfully.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d1","createdAt":"2025-01-10T08:30:00.000Z","updatedAt":"2025-01-10T08:45:30.500Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSegmentId":"seg-exercise-3","status":"started","duration":930,"progress":0.52}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSessionResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID or session ID does not exist (or the session does not belong to the authenticated caller).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get specific workout session details","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/<SESSION_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/<SESSION_ID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/<SESSION_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/sessions/end":{"post":{"description":"\n## End session (keep last progress)\n\nMarks the session completed using duration from the last PATCH (`progressSeconds`). Does **not** force 100% — use `POST .../sessions/complete` for that. If no PATCH ran, duration is `0`. Progress below `0.1` does not fill an active-program slot. Optional `programPosition` fills that slot when the workout id there is still this workout.\n\n**Related:** `PATCH .../sessions/{sessionId}`, `POST .../sessions/complete`, `POST .../feedback`.\n    ","operationId":"WorkoutsSessionsApi_endWorkoutSession","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout associated with the session.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"description":"Data required to end the session. For a key-only attributed session, re-send the same end-user fields used on start (`endUserId` or `externalUserId`, plus `organizationId` for standard/club keys) so the lookup stays scoped to that end user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndWorkoutSessionBody"},"examples":{"endSession":{"summary":"End a session","description":"Ends the session with duration from last PATCH.","value":{"sessionId":"12ab3efd45c67c1234566cd1"}},"attributed-end-user":{"summary":"End an attributed session (API key)","description":"Re-send the end-user attribution for a key-only attributed session.","value":{"sessionId":"12ab3efd45c67c1234566cd1","endUserId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"a1b2c3d4e5f6a7b8c9d0e1f2"}},"program-slot":{"summary":"End on an active-program slot","description":"Same programPosition as start. Below progress 0.1 this does not fill a slot.","value":{"sessionId":"12ab3efd45c67c1234566cd1","programPosition":2}}}}}},"responses":{"200":{"description":"Workout session successfully marked as completed.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d1","createdAt":"2025-01-10T08:30:00.000Z","updatedAt":"2025-01-10T09:15:30.000Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSegmentId":"seg-outro","status":"completed","duration":2730,"progress":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSessionResponse"}}}},"400":{"description":"Invalid request data (e.g., missing sessionId).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The workout does not exist, or the session does not exist / does not belong to this workout and trainee. Checked before the completed-state 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Session is already completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"End a workout session","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/end' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function endWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/end', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/end\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/sessions/complete":{"post":{"description":"\n## Complete a session (force 100%)\n\nMarks the session completed at **100%** progress (full workout duration). Use for \"mark as done\" / offline finish. Prefer `POST .../sessions/end` when you want to keep the last PATCHed `progressSeconds` (abandon or natural stop).\n\nBody requires `sessionId`; re-send attribution fields for key-only attributed sessions. Optional `programPosition` fills that active-program slot when the workout id there is still this workout. Omit it and the earliest open matching slot is filled (a skipped copy only when no open copy is left).\n\n**Related:** `POST .../sessions/start`, `POST .../sessions/end`, `PATCH .../sessions/{sessionId}`, `POST .../feedback`.\n    ","operationId":"WorkoutsSessionsApi_completeWorkoutSession","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout associated with the session.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"description":"Data required to complete the session. For a key-only attributed session, re-send the same end-user fields used on start (`endUserId` or `externalUserId`, plus `organizationId` for standard/club keys) so the lookup stays scoped to that end user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteWorkoutSessionBody"},"examples":{"completeSession":{"summary":"Mark a specific session as 100% completed","description":"Force complete a session for user's workout history","value":{"sessionId":"12ab3efd45c67c1234566cd1"}},"attributed-end-user":{"summary":"Complete an attributed session (API key)","description":"Re-send the end-user attribution for a key-only attributed session.","value":{"sessionId":"12ab3efd45c67c1234566cd1","endUserId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"a1b2c3d4e5f6a7b8c9d0e1f2"}},"program-slot":{"summary":"Complete an active-program slot","description":"Force 100% on the slot the member opened. Ignored unless that index is still this workout.","value":{"sessionId":"12ab3efd45c67c1234566cd1","programPosition":2}}}}}},"responses":{"200":{"description":"Workout session successfully marked as 100% completed.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d1","createdAt":"2025-01-10T08:30:00.000Z","updatedAt":"2025-01-10T09:00:00.000Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSegmentId":"seg-outro","status":"completed","duration":1800,"progress":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSessionResponse"}}}},"400":{"description":"Invalid request data (e.g., missing sessionId).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The workout does not exist, or the session does not exist / does not belong to this workout and trainee. Checked before the completed-state 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The workout session is already marked as completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Complete workout session with 100% progress","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/complete' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function completeWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/complete', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/complete\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/sessions/recent":{"get":{"description":"\n## Most recent in-progress session\n\nReturns the most recent **started** (not completed) session for this workout — resume-first UX. Includes `logDraft` (`{ weightUnit, exerciseData, updatedAt }`, or null) so a resumed session gets its in-player logs back.\n\n**Identity required:** Bearer token **or** `endUserId` / `externalUserId` query fields (+ `organizationId` for standard/club keys). Fully anonymous key-only → **404**.\n\n**Related:** `POST .../sessions/start`, `GET .../sessions/{sessionId}`, `PATCH .../sessions/{sessionId}`.\n    ","operationId":"WorkoutsSessionsApi_getRecentWorkoutSession","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout for which to find the recent session.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"endUserId","required":false,"in":"query","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}},{"name":"externalUserId","required":false,"in":"query","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","schema":{"example":"ext-user-12345","type":"string"}},{"name":"organizationId","required":false,"in":"query","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","schema":{"example":"a1b2c3d4e5f6a7b8c9d0e1f2","type":"string"}}],"responses":{"200":{"description":"Most recent workout session details retrieved successfully.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d1","createdAt":"2025-01-10T08:30:00.000Z","updatedAt":"2025-01-10T08:45:30.500Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSegmentId":"seg-exercise-3","status":"started","duration":930,"progress":0.52}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutSessionResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No in-progress workout session found for this workout and the resolved end user. Also returned when the call is anonymous (no Bearer token and no endUserId/externalUserId to resolve an identity).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get most recent workout session","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/recent' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getRecentWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/recent', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/sessions/recent\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/feedback/options":{"get":{"description":"\n## Feedback options\n\nReturns the rating and difficulty scales for workout feedback. Use the option **ids** (not numeric values) when submitting `POST /v1/workouts/{id}/feedback`.\n\n**Response shape:** `{ \"data\": { \"rating\": [{ id, label, value }], \"difficulty\": [{ id, label, value }] } }`.\n\n**Related:** `POST /v1/workouts/{id}/feedback`, `POST /v1/workouts/{id}/sessions/complete`.\n    ","operationId":"WorkoutsFeedbackApi_getWorkoutFeedbackOptions","parameters":[],"responses":{"200":{"description":"Successfully retrieved feedback options with all available rating scales.","schema":{"example":{"data":{"rating":[{"id":"60af7f618ded6000114c92c0","label":"Awful","value":1},{"id":"60af7f828ded6000114c92c1","label":"Meh","value":2},{"id":"60af7f8a8ded6000114c92c2","label":"So-so","value":3},{"id":"60af7f958ded6000114c92c3","label":"Good","value":4},{"id":"60af7f9d8ded6000114c92c4","label":"Awesome","value":5}],"difficulty":[{"id":"60af7faa8ded6000114c92c5","label":"Very easy","value":1},{"id":"60af7fb28ded6000114c92c6","label":"Easy","value":2},{"id":"60af7fb98ded6000114c92c7","label":"Just right","value":3},{"id":"60af7fc48ded6000114c92c8","label":"Hard","value":4},{"id":"60af7fcb8ded6000114c92c9","label":"Very hard","value":5}]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutFeedbackOptionsResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get workout feedback options","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/feedback/options' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutFeedbackOptions() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/feedback/options', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/workouts/feedback/options\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/workouts/{workoutId}/feedback":{"post":{"description":"\n## Submit workout feedback\n\nSubmit feedback for a completed (or abandoned) session on a **persisted** workout id.\n\n**Body:** `workoutSessionId` (required) plus optional `ratingId` / `difficultyId` (option **ids** from `GET /v1/workouts/feedback/options`, not raw numbers), `comment`, `weightUnit`, `exerciseData[]` (`instanceId` + optional `weight` / `reps`; keep playlist order; omit rest segments). Optional attribution fields (`endUserId` / `externalUserId`, plus `organizationId` for standard/club keys) for key-only attributed sessions.\n\n**Completion:** by default the check-in completes the session at 100% (natural finish, \"Mark as done\"). Send `keepProgress: true` when the member ended early (\"End now\"): an ended session keeps its progress, an open one is ended at its current progress.\n\n**Try it:** end a session, fetch feedback options, then POST with `workoutSessionId` + a `ratingId`.\n\n**Related:** `GET /v1/workouts/feedback/options`, `POST /v1/workouts/{id}/sessions/end`, `POST /v1/workouts/{id}/sessions/complete`.\n    ","operationId":"WorkoutsFeedbackApi_submitWorkoutFeedback","parameters":[{"name":"workoutId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout receiving feedback.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"description":"Workout feedback with ratings, optional comments, and exercise performance data. Use `ratingId` / `difficultyId` option ids from `GET /v1/workouts/feedback/options` (not raw numbers). For a key-only attributed session, send the same end-user fields used on the session (`endUserId` or `externalUserId`, plus `organizationId` for standard/club keys) so the feedback is scoped to that end user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitWorkoutFeedbackBody"},"examples":{"full-feedback":{"summary":"Complete Feedback","description":"Full feedback with rating, difficulty, and comments. Use option ids from GET /v1/workouts/feedback/options.","value":{"workoutSessionId":"64f1a2b3c4d5e6f7a8b9c0d1","ratingId":"60af7f9d8ded6000114c92c4","difficultyId":"60af7fb98ded6000114c92c7","comment":"Great workout! The exercises were challenging but doable. Would love more variety in the warm-up."}},"rating-only":{"summary":"Rating Only","description":"Quick rating without difficulty or comments","value":{"workoutSessionId":"64f1a2b3c4d5e6f7a8b9c0d1","ratingId":"60af7f958ded6000114c92c3"}},"attributed-end-user":{"summary":"Attributed Feedback (API key)","description":"Attribute feedback to a specific end user without a member token. Resolved against the API key team.","value":{"workoutSessionId":"64f1a2b3c4d5e6f7a8b9c0d1","ratingId":"60af7f9d8ded6000114c92c4","difficultyId":"60af7fb98ded6000114c92c7","endUserId":"64f1a2b3c4d5e6f7a8b9c0d1","organizationId":"a1b2c3d4e5f6a7b8c9d0e1f2"}},"anonymous-feedback":{"summary":"Anonymous Feedback","description":"Feedback from non-authenticated user session","value":{"workoutSessionId":"64f1a2b3c4d5e6f7a8b9c0d1","ratingId":"60af7f9d8ded6000114c92c4","difficultyId":"60af7fb98ded6000114c92c7","comment":"Perfect for beginners!"}},"with-exercise-data":{"summary":"Feedback with Exercise Performance Data","description":"Feedback including weights and reps tracking","value":{"workoutSessionId":"64f1a2b3c4d5e6f7a8b9c0d1","ratingId":"60af7f9d8ded6000114c92c4","difficultyId":"60af7fb98ded6000114c92c7","weightUnit":"metric","exerciseData":[{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d2","weight":25.5},{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d3","reps":15},{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d4","weight":20,"reps":12}],"comment":"Great workout!"}}}}}},"responses":{"201":{"description":"Feedback submitted successfully.","schema":{"example":{"data":{"id":"67d1a2b3c4e5f6789abc0d2","createdAt":"2025-01-10T09:30:00.000Z","updatedAt":"2025-01-10T09:30:00.000Z","workoutId":"12ab3efd45c67c1234566cd1","workoutSessionId":"67d1a2b3c4e5f6789abc0d1","rating":{"id":"rating-4-stars","label":"Very Good","value":4},"difficulty":{"id":"difficulty-challenging","label":"Challenging","value":4},"comment":"Great workout! Felt appropriately challenging.","weightUnit":"metric","exerciseData":[{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d2","reps":15},{"instanceId":"64f1a2b3c4d5e6f7a8b9c0d3","weight":25,"reps":12}]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutFeedbackResponse"}}}},"400":{"description":"Invalid feedback data provided (e.g., `ratingId` not one of `data.rating[].id` or `difficultyId` not one of `data.difficulty[].id` from the feedback options endpoint, session from another workout, missing weightUnit when weights provided, invalid instanceIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed (API key invalid or Bearer token invalid if provided).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified workout ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Submit workout feedback","tags":["workouts"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/feedback' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function submitWorkoutFeedback() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/feedback', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/workouts/<WORKOUT_ID>/feedback\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/plans/metadata":{"get":{"description":"\n## Plan metadata\n\nReturns `goals` (`{ id, name }[]`) and `difficulties` for plan filters / `POST .../plans/generate`.\n\n**Try it:** `GET /v1/plans/metadata?locale=en-US` with `X-Api-Key`. Optional `locale` localizes goal names.\n\n**Related:** `POST /v1/orgs/{orgId}/plans/generate`, `POST /v1/orgs/{orgId}/plans/recommend`, `GET /v1/orgs/{orgId}/plans`, `GET /v1/workouts/metadata`, `GET /v1/workouts/equipment/metadata`.\n    ","operationId":"PlansApi_getPlanMetadata","parameters":[{"name":"locale","required":false,"in":"query","description":"Preferred language locale (e.g., fr-FR)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved plan goals and difficulty lists.","content":{"application/json":{"schema":{"type":"object","properties":{"goals":{"type":"array","description":"List of all available plan goals.","items":{"type":"object","properties":{"id":{"type":"string","description":"Goal ID","example":"63c92926f920a9005c4e619c"},"name":{"type":"string","description":"Goal display name","example":"Lose weight"}},"required":["id","name"]}},"difficulties":{"type":"array","description":"List of all available plan difficulty levels.","items":{"type":"string","example":"intermediate"}}},"example":{"goals":[{"id":"63c92926f920a9005c4e619c","name":"Lose weight"},{"id":"63c92926f920a9005c4e619d","name":"Build strength"},{"id":"63c92926f920a9005c4e619e","name":"Improve endurance"}],"difficulties":["beginner","intermediate","advanced"]}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get available plan goals and difficulties","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/plans/metadata' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getPlanMetadata() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/plans/metadata', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/plans/metadata\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/plans/{planId}":{"get":{"description":"\n## Training plan details\n\nReturns one plan: name, description, difficulty, visibility, `durationInWeeks`, `workoutsPerWeek`, goals, trainer, preview, share link, organization (when applicable).\n\n**Try it:** `GET /v1/plans/{planId}?locale=en-US` with `X-Api-Key`. For the workout list, call `GET /v1/plans/{planId}/workouts`.\n\n**Localization:** optional `locale` affects name, description, goal names (unsupported → English fallback).\n\n**Related:** `GET /v1/orgs/{orgId}/plans`, `GET /v1/plans/{id}/workouts`, `GET /v1/plans/metadata`, `POST /v1/orgs/{orgId}/plans/generate`.\n    ","operationId":"PlansApi_getPlan","parameters":[{"name":"planId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout plan to retrieve.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"locale","required":false,"in":"query","description":"Preferred language locale for localized content (e.g., en-US, fr-FR, de-DE). Affects plan name, description, and goal names.","schema":{"type":"string","enum":["en-US","en-GB","en-AU","fr-FR","de-DE","es-ES","it-IT","pt-PT","he-IL","ro-RO","cs-CZ","fi-FI","lt-LT","nl-NL","pl-PL","ar-XA","nb-NO","sv-SE"]}}],"responses":{"200":{"description":"Workout plan details retrieved successfully with duration information.","content":{"application/json":{"examples":{"8-week-program":{"summary":"8-Week Strength Program","description":"Example of an 8-week program with 3 workouts per week","value":{"data":{"id":"64f1a2b3c4d5e6f7a8b9c0d2","name":"8-Week Strength Program","description":"A comprehensive strength building program designed for intermediate fitness levels","difficulty":"intermediate","visibility":"public","durationInWeeks":8,"workoutsPerWeek":3,"goals":[{"id":"64f1a2b3c4d5e6f7a8b9c0d3","name":"Build Strength","nameTranslations":{}}],"trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Sarah Johnson"},"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-thumb.jpg"},"shareLink":{"url":"https://app.hyperhuman.cc/plans/64f1a2b3c4d5e6f7a8b9c0d2"},"organization":{"id":"org-hyperhuman-llc","name":"Hyperhuman LLC","logo":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/logo.png"}}}}},"12-week-program":{"summary":"12-Week Transformation Program","description":"Example of a longer 12-week program with 4 workouts per week","value":{"data":{"id":"64f1a2b3c4d5e6f7a8b9c0d5","name":"12-Week Transformation Program","description":"An intensive 12-week program for advanced fitness levels","difficulty":"advanced","visibility":"public","durationInWeeks":12,"workoutsPerWeek":4,"goals":[{"id":"64f1a2b3c4d5e6f7a8b9c0d6","name":"Weight Loss","nameTranslations":{}},{"id":"64f1a2b3c4d5e6f7a8b9c0d7","name":"Build Muscle","nameTranslations":{}}],"trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d8","name":"Mike Chen"},"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/transformation-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/transformation-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/transformation-thumb.jpg"},"shareLink":{"url":"https://app.hyperhuman.cc/plans/64f1a2b3c4d5e6f7a8b9c0d5"},"organization":null}}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified plan ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get training plan details","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/plans/{planId}/workouts":{"get":{"description":"\n## Plan workouts\n\nReturns **all** workouts in the plan as `{ data, links }`, ordered in program sequence. **No** server-side paging of the array — paginate in the client if the UI needs it. `links.total` is the number of returned slots.\n\nEach item carries `positionInPlan` (0-based slot in the sequence). It matches the position keys of `GET .../endusers/{endUserId}/plans/active/progress` and `schedule.todaysWorkout.position`. The same workout id can appear at several positions; a slot whose workout is no longer available is omitted, so positions may have gaps.\n\n**Try it:** `GET /v1/plans/{planId}/workouts?locale=en-US` with `X-Api-Key`. Optional `locale` localizes workout display fields.\n\n**Related:** `GET /v1/plans/{id}`, `GET /v1/workouts/{id}`, `GET /v1/orgs/{orgId}/plans`, `POST /v1/workouts/{id}/sessions/start`.\n    ","operationId":"PlansApi_getPlanWorkouts","parameters":[{"name":"planId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the workout plan.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"locale","required":false,"in":"query","description":"Preferred language locale (e.g., fr-FR)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved complete list of workouts for the plan, in plan order with `positionInPlan`.","schema":{"example":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","positionInPlan":0,"trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Sarah Johnson"},"createdAt":"2023-10-26T10:00:00.000Z","updatedAt":"2023-10-27T11:30:00.000Z","name":"Upper Body Strength","description":"Focus on chest, shoulders, and arms","duration":2700,"difficulty":"intermediate","visibility":"public","categories":[{"id":"615aa3dadbe7140012c59e90","name":"Strength"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-poster.jpg"},"rating":4.5,"locked":false,"mixBgMusic":true,"presentationStyle":"full","skipWorkoutPreview":false,"skipWorkoutCompletionScreen":false,"videoAudioMode":"full","allowAssessment":false,"assessmentType":null},{"id":"64f1a2b3c4d5e6f7a8b9c0d2","trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Sarah Johnson"},"createdAt":"2023-10-26T10:00:00.000Z","updatedAt":"2023-10-27T11:30:00.000Z","name":"Lower Body Power","description":"Intense leg and glute workout","duration":2400,"difficulty":"intermediate","visibility":"public","categories":[{"id":"615aa3dadbe7140012c59e90","name":"Strength"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-preview-2.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-poster-2.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-poster-2.jpg"},"rating":4.7,"locked":false,"mixBgMusic":true,"presentationStyle":"full","skipWorkoutPreview":false,"skipWorkoutCompletionScreen":false,"videoAudioMode":"full","allowAssessment":false,"assessmentType":null}],"links":{"total":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanWorkoutListResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified plan ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get workouts in training plan","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>/workouts' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getPlanWorkouts() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>/workouts', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>/workouts\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/plans/{planId}/similar":{"get":{"description":"\n## Similar programs\n\nRanked programs from the **same organization** as `planId`, matched on goals, weeks, workouts per week, difficulty, and muscle focus rolled up from each program's workouts. No member profile and no AI.\n\n**Try it:** `GET /v1/plans/{planId}/similar?limit=5` with `X-Api-Key`. Optional `visibility` is `public` (default), `private`, or `all`. Optional `locale`.\n\n**Shape:** `{ data, links }`. `links.total` is the number returned (default **5**, max **10**). `links.next` is omitted. Each item is a plan list row plus up to two `matchLabels`. Member adaptation copies (`end-user-ai-generated`, or any row with `originalProgramId`) are excluded.\n\nAn API key from another organization, or a signed-in member who is not an active client of that organization, cannot read `private`; `all` falls back to `public`.\n\n**Related:** `GET /v1/plans/{id}`, `GET /v1/orgs/{orgId}/plans`.\n    ","operationId":"PlansApi_getSimilarPlans","parameters":[{"name":"planId","required":true,"in":"path","description":"The program to compare against (24-character hex).","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"visibility","required":false,"in":"query","description":"Library visibility to search. Defaults to `public` when omitted so a public detail page does not return private programs.","schema":{"default":"public","type":"string","enum":["private","public","all"]}},{"name":"limit","required":false,"in":"query","description":"How many similar programs to return. Default 5, max 10. This is the full ranked set, not a page.","schema":{"minimum":1,"maximum":10,"default":5,"type":"number"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}}],"responses":{"200":{"description":"Ranked similar programs. Empty data when nothing clears the match floor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarPlanListResponse"}}}},"400":{"description":"Invalid query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"visibility=private from an API key outside the source item organization, or from a signed-in member without an active team membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified plan ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get similar programs","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>/similar' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getSimilarPlans() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>/similar', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/plans/<PLAN_ID>/similar\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/video-assets":{"get":{"description":"\n## Workspace exercise library\n\nPaginated **published workspace-only** exercise videos for catalogs/builders/players (`{ data, links, explanation? }`). Stock / pay-as-you-go are not included. No `visibility` filter.\n\n**Try it:** `GET /v1/orgs/{organizationId}/video-assets?limit=10` with `X-Api-Key`. Pagination: `limit` default **10** (max **50**); advance via `links.next`.\n\n**Filters (AND):** `q` (substring; locale-aware with `?locale=`), `equipmentIds`, `muscleGroupIds`, `kinds`, `skillLevels`, `executionSides`, `coach`, `collectionNames` (CSV plain strings — see DTO). Sort: `date`/`name`/`kind` with `+`/`-` (default `-date`).\n\n**Video type guide (`kinds` CSV):** product **Exercise** → `single-exercise`; **Multi-exercise** → `multi-exercise`; **Class** → `class`; **Promo** → `promo`; **Educational** → `educational`. Allowed values only — unknown tokens → `400`. `playsInLoop` is true by default on smart clips: the preview file is a short looping demo; workout playlist `duration` is the planned work window and may be longer.\n\n**Audio:** `audioInstructions[]` only on `kind: single-exercise` (presigned `assetUri`, optional `scriptText`). Other kinds return `[]`.\n\n**Related:** `GET /v1/orgs/{orgId}/groups`, `GET /v1/workouts/metadata`, `GET /v1/orgs/{orgId}/stock-exercises`.\n    ","operationId":"OrganizationExercisesApi_getOrganizationExercises","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Unique organization (workspace) resource id for Hyperhuman Teams - opaque 24-character hex string.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":10,"example":10,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search text","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Sortable fields (use `+` / `-` prefix, comma-separated for multi-key). Allowed: `date` (alias of `createdAt`), `name`, `kind`. Default: `-date` (newest first). Examples: `-date`, `+name`, `-kind,+name`.","schema":{"example":"-date","type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US). Localizes text and locale-aware media when supported; falls back to English.","schema":{"example":"en-US","type":"string"}},{"name":"equipmentIds","required":false,"in":"query","description":"Comma-separated equipment ids (24-character hex). Returns assets whose `equipment[]` includes ANY of these.","schema":{"example":"60d21b4667d0d8992e610c90,60d21b4667d0d8992e610c91","type":"string"}},{"name":"muscleGroupIds","required":false,"in":"query","description":"Comma-separated muscle-group ids (24-character hex). Returns assets whose `muscleGroups[]` includes ANY of these.","schema":{"example":"60d21b4667d0d8992e610c85","type":"string"}},{"name":"kinds","required":false,"in":"query","description":"Comma-separated video kinds. Allowed: `single-exercise`, `multi-exercise`, `class`, `promo`, `educational`. See the **Video type guide** in the endpoint description for product-name-to-`kind` mapping.","schema":{"example":"single-exercise,educational","type":"string"}},{"name":"skillLevels","required":false,"in":"query","description":"Comma-separated skill levels. Allowed: `beginner`, `intermediate`, `advanced`.","schema":{"example":"beginner,intermediate","type":"string"}},{"name":"executionSides","required":false,"in":"query","description":"Comma-separated execution sides. Allowed: `both`, `left`, `right`, `alternating`.","schema":{"example":"both,alternating","type":"string"}},{"name":"coach","required":false,"in":"query","description":"Coach gender as recorded on the asset.","schema":{"example":"female","type":"string","enum":["male","female"]}},{"name":"collectionNames","required":false,"in":"query","description":"Comma-separated collection names (exact match, case-sensitive). Rows with empty `collectionName` are excluded when this filter is set.","schema":{"example":"Morning cardio,Yoga flow","type":"string"}}],"responses":{"200":{"description":"Paginated workspace exercise videos with previews and metadata.","schema":{"example":{"data":[{"id":"60812dea606fc90011eb4405","createdAt":"2025-09-15T10:30:00Z","name":"Jumping Jacks","kind":"single-exercise","trainer":{"id":"63a1c2b4f0e1a200126616a1","name":"Sarah Johnson"},"muscleGroups":[{"id":"60d21b4667d0d8992e610c85","name":"Full Body"}],"equipment":[{"id":"60d21b4667d0d8992e610c90","name":"Bodyweight"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/ex-60812dea.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea.jpg"},"playsInLoop":true,"organization":{"id":"63415bf67a9c7000126616c1","name":"My Gym","logo":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/logos/org-63415bf67a9c7000126616c1.png"}},"audioInstructions":[{"id":"65a1b2c3d4e5f600126616a1","createdAt":"2025-09-15T10:31:00Z","assetUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/inst-60812dea-en-US.m4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","type":"exerciseInstruction","locale":"en-US","scriptText":"Stand tall with your feet shoulder-width apart. Jump up while raising your arms overhead and spreading your legs out to the sides."},{"id":"65a1b2c3d4e5f600126616a2","createdAt":"2025-09-15T10:31:00Z","assetUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/inst-60812dea-fr-FR.m4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","type":"exerciseInstruction","locale":"fr-FR","scriptText":"Tenez-vous droit, pieds écartés à la largeur des épaules. Sautez en levant les bras au-dessus de la tête et en écartant les jambes sur les côtés."}],"skillLevel":"beginner","tags":["warmup"],"collectionName":"Morning cardio"}],"links":{"next":"https://content.api.hyperhuman.cc/v1/orgs/63415bf67a9c7000126616c1/video-assets?limit=10&offset=10","total":142},"explanation":"Published exercise videos from your workspace."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAssetsListResponse"}}}},"400":{"description":"Request validation failed. `error.code` is `ValidationError`; `error.target` is the DTO class name; `error.details[]` lists the offending fields.","schema":{"example":{"error":{"code":"ValidationError","message":"ValidationError","target":"GetVideoAssetsByOrganizationIdParams","details":[{"code":"ConstraintError","message":"organizationId must be a mongodb id","target":"organizationId"}]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, or unknown `X-Api-Key` header.","schema":{"example":{"error":{"code":"Unauthorized","message":"Unauthorized"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is valid but is not authorized for this `organizationId` (the key belongs to a different workspace, or no API key was sent on a guarded route).","schema":{"example":{"error":{"code":"Forbidden","message":"API key not authorized for this organization"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No workspace exists for the supplied `organizationId`.","schema":{"example":{"error":{"code":"NotFound","message":"Organization not found"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List workspace exercise videos for an organization","tags":["library-exercises"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/video-assets' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationExercises() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/video-assets', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/video-assets\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/stock-exercises":{"get":{"description":"\n## Stock exercise catalog\n\n**Plan gate:** Platform (including trials) and Ultra monthly do **not** include stock-catalog access. A valid key without `stockVideoCatalogApi` (Ultra annual or a custom plan) returns **403**. That plan-gated 403 does **not** consume rate-limit units. Do not retry this route on a trial or monthly Ultra key.\n\nPaginated **published public single-exercise** stock clips (free + premium) for browse/playback. Not AI-generation fuel. Requires Content API access plus stock-catalog entitlement. Response omits `trainer` / `bundle` / `organization`.\n\n**Try it:** `GET /v1/orgs/{organizationId}/stock-exercises?limit=10` with `X-Api-Key` **only if your plan includes catalog access**. Pagination: `limit` default **10** (max **50**); advance via `links.next`. Each call counts as **10x**.\n\n**Filters:** `q` (substring), `equipmentIds`, `muscleGroupIds`, `skillLevels`, `executionSides`, `coach`, `collectionNames`, plus `availability` (`free-stock` | `premium-stock` | `all-stock`). No `kinds` filter (catalog is hard-scoped to `single-exercise` — sending `kinds` → `400`). `playsInLoop` is true: preview files are short looping demos; workout slots may be longer.\n\n**Related:** `GET /v1/orgs/{orgId}/video-assets`, `GET /v1/workouts/exercises/metadata`.\n    ","operationId":"OrganizationStockExercisesApi_getStockExercises","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Unique organization (workspace) resource id for Hyperhuman Teams - opaque 24-character hex string.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":10,"example":10,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search text","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Sortable fields (use `+` / `-` prefix, comma-separated for multi-key). Allowed: `date` (alias of `createdAt`), `name`, `kind`. Default: `-date` (newest first). Examples: `-date`, `+name`.","schema":{"example":"-date","type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US). Localizes text and locale-aware media when supported; falls back to English.","schema":{"example":"en-US","type":"string"}},{"name":"equipmentIds","required":false,"in":"query","description":"Comma-separated equipment ids (24-character hex). Returns assets whose `equipment[]` includes ANY of these.","schema":{"example":"60d21b4667d0d8992e610c90,60d21b4667d0d8992e610c91","type":"string"}},{"name":"muscleGroupIds","required":false,"in":"query","description":"Comma-separated muscle-group ids (24-character hex). Returns assets whose `muscleGroups[]` includes ANY of these.","schema":{"example":"60d21b4667d0d8992e610c85","type":"string"}},{"name":"skillLevels","required":false,"in":"query","description":"Comma-separated skill levels. Allowed: `beginner`, `intermediate`, `advanced`.","schema":{"example":"beginner,intermediate","type":"string"}},{"name":"executionSides","required":false,"in":"query","description":"Comma-separated execution sides. Allowed: `both`, `left`, `right`, `alternating`.","schema":{"example":"both,alternating","type":"string"}},{"name":"coach","required":false,"in":"query","description":"Coach gender as recorded on the asset.","schema":{"example":"female","type":"string","enum":["male","female"]}},{"name":"collectionNames","required":false,"in":"query","description":"Comma-separated collection names (exact match, case-sensitive). Rows with empty `collectionName` are excluded when this filter is set.","schema":{"example":"Premium - Neutral,Free - Eclectic Home","type":"string"}},{"name":"availability","required":false,"in":"query","description":"Stock tier to return. Allowed: `free-stock`, `premium-stock`, `all-stock`. Default: `all-stock` (free and premium).","schema":{"example":"all-stock","type":"string","enum":["free-stock","premium-stock","all-stock"]}}],"responses":{"200":{"description":"Paginated stock single-exercise videos with previews and metadata.","schema":{"example":{"data":[{"id":"60812dea606fc90011eb4405","createdAt":"2025-09-15T10:30:00Z","name":"Jumping Jacks","kind":"single-exercise","playsInLoop":true,"muscleGroups":[{"id":"60d21b4667d0d8992e610c85","name":"Full Body"}],"equipment":[{"id":"60d21b4667d0d8992e610c90","name":"Bodyweight"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/ex-60812dea.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea.jpg"},"collectionName":"Free - Eclectic Home","coach":"female","skillLevel":"beginner","categories":["cardio"],"executionSide":"both","audioInstructions":[{"id":"65a1b2c3d4e5f600126616a1","createdAt":"2025-09-15T10:31:00Z","assetUri":"https://hhcontent.s3.eu-central-1.amazonaws.com/audio/inst-60812dea-en-US.m4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","type":"exerciseInstruction","locale":"en-US","scriptText":"Stand tall with your feet shoulder-width apart. Jump up while raising your arms overhead and spreading your legs out to the sides."}]}],"links":{"next":"https://content.api.hyperhuman.cc/v1/orgs/63415bf67a9c7000126616c1/stock-exercises?limit=10&offset=10","total":2030},"explanation":"Showing 2030 published stock exercise videos."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockVideoAssetsListResponse"}}}},"400":{"description":"Request validation failed. `error.code` is `ValidationError`; `error.target` is the DTO class name; `error.details[]` lists the offending fields.","schema":{"example":{"error":{"code":"ValidationError","message":"ValidationError","target":"GetStockExercisesByOrganizationIdParams","details":[{"code":"ConstraintError","message":"organizationId must be a mongodb id","target":"organizationId"}]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, or unknown `X-Api-Key` header.","schema":{"example":{"error":{"code":"Unauthorized","message":"Unauthorized"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this `organizationId`, OR the plan lacks Content API access, OR the plan lacks stock catalog access (requires Ultra annual or a custom plan with `stockVideoCatalogApi`).","schema":{"example":{"error":{"code":"Forbidden","message":"Stock exercise catalog API requires Ultra (annual) or a custom plan with catalog access. Contact sales for a custom plan."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No workspace exists for the supplied `organizationId`.","schema":{"example":{"error":{"code":"NotFound","message":"Organization not found"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Each call to this endpoint counts as 10x against your Content API limits.","schema":{"example":{"error":{"code":"TooManyRequests","message":"Hourly rate limit exceeded"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List browsable stock exercise catalog","tags":["library-stock-exercises"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/stock-exercises' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getStockExercises() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/stock-exercises', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/stock-exercises\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/groups":{"get":{"description":"\n## Micro Workouts (Exercise Groups)\n\n**Micro workouts** are short, focused exercise collections designed for quick sessions. Use these endpoints to surface them in your app.\n\nRetrieves paginated list of exercise collections (micro workouts) for your organization. Each collection has simple execution details: circuit or sets format, rounds, rest periods, and per-exercise config (time-based or reps-based).\n\n---\n\n### Use Cases\n\n- **White-label Apps** - Show organization micro workouts\n- **Quick Workout Browsing** - Circuit and sets-based collections\n- **Integration with Workouts** - Collections can be used in workout generation (excludeExerciseCollections)\n\n---\n\n### Execution Details (per collection)\n\n- **kind**: circuit | sets\n- **rounds**: Number of rounds\n- **roundBreakDuration**: Rest between rounds (ms)\n- **exerciseBreakDuration**: Rest between exercises (ms)\n- **exerciseConfig**: timeBasedConfig (duration, pace, rpe, amrap) or repsBasedConfig (reps, weightLevel, pace, rpe)\n\n---\n\n### Filtering and Pagination\n\n**Visibility:**\n- `public` - Publicly accessible collections (default)\n- `private` - Organization-only (requires API key for same org)\n- `all` - Both (requires API key for same org)\n\n**Pagination:**\n- `offset` - Pagination offset (default: 0)\n- `limit` - Items per page (default: **10**, max: **50**). `limit=100` (or any value above 50) returns **400** `ValidationError`.\n\n---\n\n### Related Endpoints\n\n- Get Group Detail: `GET /v1/orgs/{orgId}/groups/{groupId}` - Full detail with execution config\n- Get Group Exercises: `GET /v1/orgs/{orgId}/groups/{groupId}/exercises` - Exercises in collection\n- List Workouts: `GET /v1/orgs/{orgId}/workouts` - Organization workouts\n    ","operationId":"OrganizationExerciseGroupsApi_getOrganizationExerciseGroups","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 10, max 50. Values above 50 return 400 ValidationError.","schema":{"minimum":1,"maximum":50,"default":10,"example":10,"type":"number"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}},{"name":"visibility","required":false,"in":"query","description":"Filter groups by their visibility status.","schema":{"enum":["private","public","all"],"type":"string"}},{"name":"offset","required":false,"in":"query","description":"Pagination offset. Defaults to 0.","schema":{"example":0,"type":"number"}}],"responses":{"200":{"description":"Successfully retrieved paginated list of micro workouts (exercise collections).","schema":{"example":{"data":[{"id":"507f1f77bcf86cd799439011","createdAt":"2025-09-15T10:30:00Z","updatedAt":"2025-09-16T14:20:00Z","name":"Quick HIIT Circuit","kind":"circuit","preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/group-507f1f77.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/group-507f1f77.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/group-507f1f77.jpg"},"rounds":3,"roundBreakDuration":10000,"exerciseBreakDuration":0,"exerciseConfig":{"timeBasedConfig":{"kind":"timeBased","duration":30000,"pace":"medium","rpe":7,"amrap":false}},"trainer":{"id":"trainer123","name":"Sarah Johnson"}},{"id":"507f1f77bcf86cd799439012","createdAt":"2025-09-10T08:00:00Z","updatedAt":"2025-09-12T11:15:00Z","name":"Upper Body Sets","kind":"sets","preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/group-507f1f78.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/group-507f1f78.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/group-507f1f78.jpg"},"rounds":2,"roundBreakDuration":60000,"exerciseBreakDuration":15000,"exerciseConfig":{"repsBasedConfig":{"kind":"repsBased","reps":12,"weightLevel":"medium","pace":"medium","rpe":8}},"trainer":{"id":"trainer456","name":"Mike Chen"}}],"links":{"next":"https://content.api.hyperhuman.cc/v1/orgs/63415bf67a9c7000126616c1/groups?limit=10&offset=10","total":24},"explanation":"Your organization micro workouts - circuit and sets-based collections for quick sessions."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupListResponse"}}}},"400":{"description":"Request validation failed. Common cause: `limit` above 50. `error.code` is `ValidationError`; `error.details[]` lists the offending fields.","schema":{"example":{"error":{"code":"ValidationError","message":"ValidationError","target":"GetGroupsByOrganizationIdQuery","details":[{"code":"ConstraintError","message":"limit must not be greater than 50","target":"limit"}]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List organization micro workouts (exercise groups)","tags":["exercise-groups"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationExerciseGroups() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/groups/{groupId}":{"get":{"description":"\n## Micro Workout Detail\n\nReturns full detail for a micro workout (exercise collection) belonging to your organization. Includes execution config (circuit/sets, rounds, rest, time-based or reps-based per exercise).\n\n**Response structure:**\n- `kind` - circuit | sets\n- `rounds`, `roundBreakDuration`, `exerciseBreakDuration`\n- `exerciseConfig` - timeBasedConfig (duration, pace, rpe, amrap) or repsBasedConfig (reps, weightLevel, pace, rpe)\n- `preview` - Video preview URLs\n- `trainer`, `organization`\n\n**Access:** Only collections created by organization trainers. Private collections require API key for the same organization.\n\n---\n\n### Related Endpoints\n\n- List Collections: `GET /v1/orgs/{orgId}/groups` - Browse organization collections\n- Get Exercises: `GET /v1/orgs/{orgId}/groups/{groupId}/exercises` - Exercises in this collection\n    ","operationId":"OrganizationExerciseGroupsApi_getOrganizationExerciseGroupById","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"groupId","required":true,"in":"path","description":"The unique identifier of the exercise collection (group).","schema":{"example":"507f1f77bcf86cd799439011","type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved micro workout (exercise collection) detail.","schema":{"example":{"data":{"id":"507f1f77bcf86cd799439011","createdAt":"2025-09-15T10:30:00Z","updatedAt":"2025-09-16T14:20:00Z","name":"Quick HIIT Circuit","kind":"circuit","preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/group-507f1f77.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/group-507f1f77.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/group-507f1f77.jpg"},"rounds":3,"roundBreakDuration":10000,"exerciseBreakDuration":0,"exerciseConfig":{"timeBasedConfig":{"kind":"timeBased","duration":30000,"pace":"medium","rpe":7,"amrap":false}},"trainer":{"id":"trainer123","name":"Sarah Johnson"},"organization":{"id":"63415bf67a9c7000126616c1","name":"My Gym","logo":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/logos/org-63415bf67a9c7000126616c1.png"}}}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Group not found or not accessible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get micro workout (exercise group) by ID","tags":["exercise-groups"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups/<GROUPID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationExerciseGroupById() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups/<GROUPID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups/<GROUPID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/groups/{groupId}/exercises":{"get":{"description":"\n## Get Micro Workout Exercises\n\nReturns the list of exercises in a micro workout (exercise collection). Each exercise includes video preview, metadata (muscle groups, equipment), and trainer info.\n\n**Use this endpoint to:**\n- Display the exercise sequence for a micro workout\n- Build a preview or playback UI for the collection\n- Get exercise details before starting a session\n\n---\n\n### Related Endpoints\n\n- Get Collection: `GET /v1/orgs/{orgId}/groups/{groupId}` - Collection detail with execution config\n- List Collections: `GET /v1/orgs/{orgId}/groups` - Browse organization collections\n    ","operationId":"OrganizationExerciseGroupsApi_getOrganizationGroupExercises","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"groupId","required":true,"in":"path","description":"The unique identifier of the exercise collection (group) whose exercises are requested.","schema":{"example":"507f1f77bcf86cd799439011","type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of exercises in the micro workout with instance config (reps, duration, pace, rpe).","schema":{"example":{"data":[{"id":"60812dea606fc90011eb4405","createdAt":"2025-09-15T10:30:00Z","name":"Jumping Jacks","kind":"single-exercise","muscleGroups":[{"id":"mg_full_body","name":"Full Body"}],"equipment":[{"id":"eq_bodyweight","name":"Bodyweight"}],"trainer":{"id":"trainer123","name":"Sarah Johnson"},"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/ex-60812dea.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea.jpg"},"duration":30,"reps":null,"pace":"medium","weightLevel":null,"rpe":7,"amrap":false},{"id":"60812dea606fc90011eb4406","createdAt":"2025-09-15T10:30:00Z","name":"Push-ups","kind":"single-exercise","muscleGroups":[{"id":"mg_chest","name":"Chest"}],"equipment":[{"id":"eq_bodyweight","name":"Bodyweight"}],"trainer":{"id":"trainer123","name":"Sarah Johnson"},"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/ex-60812dea6.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea6.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/thumbnails/ex-60812dea6.jpg"},"duration":24,"reps":12,"pace":"medium","weightLevel":"medium","rpe":8}],"links":{"next":null,"total":5}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupExercisesListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Group not found or not accessible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get exercises in micro workout","tags":["exercise-groups"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups/<GROUPID>/exercises' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationGroupExercises() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups/<GROUPID>/exercises', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/groups/<GROUPID>/exercises\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/plans":{"get":{"description":"\n## Organization plan library\n\nPaginated **published** plans for your organization (`public` / `private` only). This is the **workspace catalog only** — empty **200** (`data: []`, `links.total: 0`) until programs exist in this org. Pre-made stock programs are **not** listed until added in the Teams app (**Programs → Add from stock**). There is **no** Content API to browse or clone the global stock program catalog. Persisted AI plans with visibility `end-user-ai-generated` are **not listed** here (even with `visibility=all`) — fetch those via `GET /v1/plans/{id}` using the stored plan id from generate/adapt.\n\n**Try it:** `GET /v1/orgs/{organizationId}/plans?limit=20` with `X-Api-Key`. Pagination: `limit` default **20** (max **50**); advance via `links.next`.\n\n**Optional filters:** `visibility`, `difficulties` (CSV), `goalIds` (CSV hex), `tags` (CSV; match any, case-insensitive exact), `durationInWeeks`, `workoutsPerWeek`, `q` (fuzzy; `sort` ignored while set), `sort`, `locale`.\n\n**Related:** `POST /v1/orgs/{orgId}/plans`, `POST /v1/orgs/{orgId}/plans/recommend`, `POST /v1/orgs/{orgId}/plans/generate`, `GET /v1/plans/{id}`, `GET /v1/plans/metadata`.\n    ","operationId":"OrganizationPlansApi_getOrganizationPlans","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search text","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Fields to sort. Prefix them with - (descending) or + (ascending): +someField,-otherField","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US, fr-FR). Localizes text and locale-aware media when this operation supports it. Falls back to English when unsupported.","schema":{"example":"en-US","type":"string"}},{"name":"visibility","required":false,"in":"query","description":"Filter plans by their visibility status.","schema":{"example":"public","type":"string","enum":["private","public","all"]}},{"name":"difficulty","required":false,"in":"query","description":"Filter plans by difficulty level (single value). DEPRECATED: Use 'difficulties' for multiple values.","deprecated":true,"schema":{"example":"intermediate","type":"string","enum":["beginner","intermediate","advanced"]}},{"name":"difficulties","required":false,"in":"query","description":"Filter plans by one or more difficulty levels (comma-separated). Preferred over 'difficulty'.","schema":{"example":"beginner,intermediate","type":"string"}},{"name":"goalIds","required":false,"in":"query","description":"Filter plans by one or more goal IDs (provide comma-separated values if multiple).","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d3,64f1a2b3c4d5e6f7a8b9c0d7","type":"string"}},{"name":"durationInWeeks","required":false,"in":"query","description":"Filter plans by duration in weeks (1-24)","schema":{"minimum":1,"maximum":24,"example":8,"type":"number"}},{"name":"workoutsPerWeek","required":false,"in":"query","description":"Filter plans by workouts per week (1-7)","schema":{"minimum":1,"maximum":7,"example":3,"type":"number"}},{"name":"tags","required":false,"in":"query","description":"Filter plans by one or more tags (comma-separated). Match any tag, case-insensitive exact. Example: vip,summer","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved paginated list of plans for the organization.","schema":{"example":{"data":[{"id":"64f1a2b3c4d5e6f7a8b9c0d2","name":"8-Week Strength Program","description":"A comprehensive strength building program designed for intermediate fitness levels","difficulty":"intermediate","visibility":"public","durationInWeeks":8,"workoutsPerWeek":3,"createdAt":"2023-10-26T10:00:00.000Z","updatedAt":"2023-10-27T11:30:00.000Z","trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Sarah Johnson"},"goals":[{"id":"64f1a2b3c4d5e6f7a8b9c0d3","name":"Build Strength","nameTranslations":{}}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-thumb.jpg"}},{"id":"64f1a2b3c4d5e6f7a8b9c0d5","name":"12-Week Transformation Program","description":"An intensive 12-week program for advanced fitness levels","difficulty":"advanced","visibility":"public","durationInWeeks":12,"workoutsPerWeek":4,"createdAt":"2023-10-26T10:00:00.000Z","updatedAt":"2023-10-27T11:30:00.000Z","trainer":{"id":"64f1a2b3c4d5e6f7a8b9c0d8","name":"Mike Chen"},"goals":[{"id":"64f1a2b3c4d5e6f7a8b9c0d6","name":"Weight Loss","nameTranslations":{}},{"id":"64f1a2b3c4d5e6f7a8b9c0d7","name":"Build Muscle","nameTranslations":{}}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/transformation-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/transformation-poster.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/transformation-thumb.jpg"}}],"links":{"next":"https://content.api.hyperhuman.cc/v1/orgs/63415bf67a9c7000126616c1/plans?offset=20&limit=20","total":45}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanListResponse"}}}},"400":{"description":"Invalid pagination or filter parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization, or a signed-in member requested private content without an active team membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified organization ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List organization-specific training plans","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationPlans() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"post":{"description":"\n## Create a plan\n\nSaves a program to your workspace library, owned by your team manager. Same rules as the Teams program builder.\n\n**Try it:** send `name`, `difficulty`, 1-2 `goalIds` (from `GET /v1/plans/metadata`), at least 2 `workoutIds`, `durationInWeeks` (1-24) and `workoutsPerWeek` (1-7).\n\n**Workouts:** your organization's workouts or Hyperhuman template workouts. Order is the schedule order; a workout may repeat.\n\n**Visibility:** defaults to `private`, so nothing reaches members by accident. Send `public` to publish.\n\n**Response:** **201** with the same body as `GET /v1/plans/{planId}`.\n\n**Needs:** your organization API key (shared app keys cannot write). Plans use no content minutes.\n\n**Rate limit:** **1x**.\n\n**Related:** `PATCH` / `DELETE /v1/orgs/{organizationId}/plans/{planId}`, `POST .../plans/generate` with `addToTeamContent`.\n    ","operationId":"OrganizationPlansApi_createOrganizationPlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique organization id (24-character hex DB id).","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPlanDto"},"examples":{"eight-week-strength":{"value":{"name":"8-Week Strength Base","description":"Three full-body sessions a week.","difficulty":"intermediate","goalIds":["63c92926f920a9005c4e619c"],"workoutIds":["64f1a2b3c4d5e6f7a8b9c0d1","64f1a2b3c4d5e6f7a8b9c0d2"],"durationInWeeks":8,"workoutsPerWeek":3}}}}}},"responses":{"201":{"description":"Plan saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"400":{"description":"Invalid body, unknown goal, or a workout not in your library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not your organization key, no team manager, or private content is not on your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Create a plan in your organization library","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function createOrganizationPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/plans/{planId}":{"patch":{"description":"\n## Update a plan\n\nChanges only the fields you send. `workoutIds`, when sent, replaces the whole schedule. Same rules as create.\n\n**Scope:** team library plans only. Member plans from generate or adapt with an end user are **404** here.\n\n**Response:** **200** with the same body as `GET /v1/plans/{planId}`.\n\n**Rate limit:** **1x**.\n\n**Related:** `POST /v1/orgs/{organizationId}/plans`, `DELETE /v1/orgs/{organizationId}/plans/{planId}`.\n    ","operationId":"OrganizationPlansApi_updateOrganizationPlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique organization id (24-character hex DB id).","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}},{"name":"planId","required":true,"in":"path","description":"Plan id (24-character hex) from your organization library.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationPlanDto"}}}},"responses":{"200":{"description":"Plan updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"400":{"description":"Invalid body, unknown goal, or a workout not in your library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not your organization key, or private content is not on your plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Plan not found in this organization library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Update a plan in your organization library","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function updateOrganizationPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"\n## Delete a plan\n\nRemoves the program from your library. Its workouts stay in the library.\n\n**Scope:** team library plans only. Member plans are **404** here.\n\n**Rate limit:** **1x**.\n\n**Related:** `DELETE /v1/orgs/{organizationId}/workouts/{workoutId}` (blocked while a workout is in a program).\n    ","operationId":"OrganizationPlansApi_deleteOrganizationPlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique organization id (24-character hex DB id).","schema":{"example":"64f1a2b3c4d5e6f7a8b9c0d1","type":"string"}},{"name":"planId","required":true,"in":"path","description":"Plan id (24-character hex) from your organization library.","schema":{"type":"string"}}],"responses":{"204":{"description":"Plan deleted."},"403":{"description":"Not your organization key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Plan not found in this organization library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete a plan from your organization library","tags":["plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deleteOrganizationPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/plans/recommend":{"post":{"description":"\n## Recommend plans from your library\n\nRanks **existing multi-week plans** in your organization library for a user profile. Prefer this over `POST .../plans/generate` when your team already publishes programs and you want the best library match. An empty workspace catalog returns **200** with an empty `plans` list — not platform stock programs.\n\n**Try it (minimal):** body `{ \"endUserProfileDetails\": { \"age\": 30, \"fitnessLevels\": [\"beginner\"] } }`. Response is a bare object `{ plans, reasoning }` (not wrapped in `data`). Up to **12** plans; each item includes a `recommendation` text reason (not a numeric score).\n\n**Body:** `endUserProfileDetails`, optional root `goalIds`, optional `locale` — unknown keys return `400 ValidationError`.\n\n**Rate limit:** counts as **10x** toward hourly/daily limits.\n\n**Related:** `POST /v1/orgs/{orgId}/plans/generate`, `GET /v1/orgs/{orgId}/plans`, `GET /v1/plans/metadata`, `GET /v1/plans/{id}`.\n        ","operationId":"OrganizationPlanRecommendation_getPlanRecommendations","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization/Team unique identifier","schema":{"example":"67e2e9d0e23f010013e19dec","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRecommendationRequestDto"},"examples":{"minimal":{"summary":"Minimal profile","value":{"endUserProfileDetails":{"age":30,"fitnessLevels":["beginner"]}}}}}}},"responses":{"200":{"description":"Ranked list of recommended training plans with per-item recommendation text and overall reasoning","schema":{"example":{"plans":[{"id":"507f1f77bcf86cd799439017","name":"8-Week Strength Building Program","description":"Progressive strength program with balanced muscle group distribution","difficulty":"intermediate","thumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/plans/507f1f77bcf86cd799439017/thumbnail.jpg","recommendation":"Perfect match for your strength goals and intermediate fitness level","goals":[{"id":"63c92926f920a9005c4e619d","name":"Build Strength"}],"preview":{"url":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/plan-preview.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=...","poster":"https://hhcontent.s3.eu-central-1.amazonaws.com/plans/507f1f77bcf86cd799439017/thumbnail.jpg","thumbnail":"https://hhcontent.s3.eu-central-1.amazonaws.com/plans/507f1f77bcf86cd799439017/thumbnail.jpg"}},{"id":"507f1f77bcf86cd799439018","name":"12-Week Transformation Program","description":"Comprehensive program combining strength and cardio for complete transformation","difficulty":"intermediate","thumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/plans/507f1f77bcf86cd799439018/thumbnail.jpg","recommendation":"Matches your goals and training frequency preferences","goals":[{"id":"63c92926f920a9005c4e619c","name":"Lose Weight"},{"id":"63c92926f920a9005c4e61a0","name":"Get Toned"}]},{"id":"507f1f77bcf86cd799439019","name":"6-Week Beginner Foundation","description":"Structured program for building fitness fundamentals","difficulty":"beginner","thumbnailUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/plans/507f1f77bcf86cd799439019/thumbnail.jpg","recommendation":"Ideal starting point for building a consistent training habit","goals":[{"id":"63c92926f920a9005c4e619e","name":"Improve Endurance"}]}],"reasoning":"Plans recommended based on your profile and preferences. Top matches align with your fitness goals, current fitness level, and training frequency. The recommendations prioritize programs that match your objectives while considering your training schedule and capabilities."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRecommendationResponseDto"}}}},"400":{"description":"Bad Request - Invalid input data"},"401":{"description":"Unauthorized - Invalid API key"},"404":{"description":"Organization/Team not found"}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get training plan recommendations from existing library","tags":["ai-recommendation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/recommend' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getPlanRecommendations() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/recommend', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/recommend\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/plans/generate":{"post":{"description":"\n## Generate a training plan\n\nCreates an AI multi-week program (typically 4–52 weeks, 1–7 workouts/week) from profile, goals, duration options, and workout collection sources. Prefer `POST .../plans/recommend` for a fast library match, or `GET /v1/orgs/{orgId}/plans` to browse.\n\n**Persistence:** Top-level plan `id` is returned when `endUserProfileDetails.endUserId` is set (member plan, active org member) or when `addToTeamContent` is `true` (team library plan, saved as your team manager, optional `visibility`, default `private`; needs your organization API key, checked **before** generating). Use one or the other, not both (**400**). **Store** that `id` and retrieve with `GET /v1/plans/{id}` / `.../workouts`. Otherwise the response is program JSON **without** a top-level `id`. Member plans are **not** listed by `GET /v1/orgs/{orgId}/plans`; team library plans are.\n\n**Try it:** `GET /v1/plans/metadata` for goal/difficulty ids, optionally `GET /v1/workouts/equipment/metadata`, then POST. For a persisted `id`, include `endUserProfileDetails.endUserId` (see `persisted-with-endUserId` example). Duration: both min/max → AI picks in range; one value → target; omit → defaults to 8 weeks.\n\n**Sources:** body field `workoutCollectionSources` — `template` (platform collections), `team` (your collections). Omit → both. Do **not** send `workoutSources` (that name is only for plan **adapt**).\n\n**Optional body:** `categoryIds` (hard-filter the public generate pool to workouts matching any of those category ids), `userRequirements` (max 2000 chars; not `userGuidance` — that name is adapt-only), `locale` (BCP-47), `methodologyProfileId` (opt-in team Programming DNA from `GET /v1/orgs/{organizationId}/methodologies` — nothing is applied unless you send that id; unknown, personal, or inactive ids return `400`; omit still means none). Unknown keys → `400` `ValidationError`. Set workouts to `private` to retire them from new generations while `GET /v1/workouts/{id}` still plays.\n\n**Localization:** optional `locale`. Unsupported → `400`. Omitted → English legacy fields; translation maps = `{ \"en-US\": \"...\" }`. Non-English → AI fills `nameTranslations` / `descriptionTranslations`; nested workouts get `nameLocalized` / `descriptionLocalized`; `difficultyLabel` localized. When a plan `id` is returned, maps are **persisted** — `GET /v1/plans/{id}?locale=...` resolves `name` / `description`. On this generate response, top-level `name` / `description` stay English base. Nested legacy workout fields stay English. `userRequirements` language does not drive output locale.\n\n**Programming DNA (opt-in):** `userRequirements` still wins over methodology **text** for this request. Hard structured rules and platform bounds (workout pool, safety, duration, structure) cannot be overridden by text. Response may include a **Generation Inspector** snapshot: `methodology` and `inspection` (`hardRulesApplied`, `violations`, `complianceStatus`, `generationId`). Store that snapshot yourself — later `GET /v1/plans/{id}` does not replay it. Text guidelines are guidance, not a guarantee; hard-rule results in `inspection` are deterministic. There is no public GET-by-generation-id and no plan generate preflight on this API.\n\n**Repeat requests:** without `endUserProfileDetails.endUserId`, identical inputs can return the same program for up to **12 hours**, much faster. Change an input or send `endUserId` for a fresh, personalized plan.\n\n**Rate limit:** counts as **10x**.\n\n**Client timeout:** keep the HTTP client open at least **120 seconds**. A client abort can leave a completed `200` you never read — do not immediately retry the same generate.\n\n**Related:** `GET /v1/orgs/{organizationId}/methodologies`, `POST /v1/orgs/{orgId}/plans/recommend`, `GET /v1/orgs/{orgId}/plans`, `GET /v1/plans/metadata`, `GET /v1/plans/{id}`, `GET /v1/workouts/equipment/metadata`.\n        ","operationId":"OrganizationPlanGeneration_generatePlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"67e2e9d0e23f010013e19dec","type":"string"}}],"requestBody":{"required":true,"description":"Plan generation request with user profile and preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanGenerationRequestDto"},"examples":{"beginner-weight-loss-4weeks":{"summary":"Beginner Weight Loss - 4 Weeks","description":"Beginner program focused on weight loss with 3 workouts per week","value":{"endUserProfileDetails":{"age":28,"gender":"female","fitnessLevels":["beginner"],"goalIds":["63c92926f920a9005c4e619c"],"trainingDaysPerWeek":3},"workoutCollectionSources":["template"],"durationOptions":{"minWeeks":4,"maxWeeks":4},"workoutsPerWeek":3,"difficulty":"beginner"}},"advanced-strength-8weeks":{"summary":"Advanced Strength Building - 8 Weeks","description":"Advanced strength program with 5 workouts per week and equipment preferences","value":{"endUserProfileDetails":{"age":35,"gender":"male","fitnessLevels":["advanced"],"goalIds":["63c92926f920a9005c4e619d","63c92926f920a9005c4e61a0"],"trainingDaysPerWeek":5,"preferredEquipmentCategoryIds":["67deb3696a5e49797c122f55","67deb36a6a5e49797c122f56"]},"workoutCollectionSources":["template","team"],"durationOptions":{"minWeeks":6,"maxWeeks":8},"workoutsPerWeek":5,"difficulty":"advanced","userRequirements":"Progressive overload with 3-week cycles. Include deload weeks every 4th week. Focus on compound movements and strength progression."}},"intermediate-endurance-flexible":{"summary":"Intermediate Endurance - Flexible Duration","description":"Endurance-focused program with AI-selected optimal duration","value":{"endUserProfileDetails":{"age":42,"gender":"female","fitnessLevels":["intermediate"],"goalIds":["63c92926f920a9005c4e619e"],"trainingDaysPerWeek":4},"workoutCollectionSources":["template"],"durationOptions":{"minWeeks":8,"maxWeeks":12},"workoutsPerWeek":4,"difficulty":"intermediate"}},"custom-team-plan":{"summary":"Custom Team Workout Plan","description":"Use organization's workout collections for brand consistency","value":{"endUserProfileDetails":{"age":30,"fitnessLevels":["intermediate"],"trainingDaysPerWeek":4},"workoutCollectionSources":["team"],"durationOptions":{"minWeeks":8,"maxWeeks":12},"workoutsPerWeek":4}},"ephemeral-no-endUserId":{"summary":"Ephemeral plan (no endUserId)","description":"Omits endUserProfileDetails.endUserId — response has no top-level plan id (preview / one-shot).","value":{"endUserProfileDetails":{"age":30,"fitnessLevels":["beginner"],"gender":"female","trainingDaysPerWeek":3},"workoutCollectionSources":["template"],"durationOptions":{"minWeeks":4,"maxWeeks":4},"goalIds":["63c92926f920a9005c4e619c"]}},"persisted-with-endUserId":{"summary":"Persisted plan (with endUserId)","description":"Includes endUserProfileDetails.endUserId so the response returns a top-level plan id to store.","value":{"endUserProfileDetails":{"age":30,"fitnessLevels":["beginner"],"gender":"female","trainingDaysPerWeek":3,"endUserId":"64e3bca9d1b7e600141a9712"},"workoutCollectionSources":["template"],"durationOptions":{"minWeeks":4,"maxWeeks":4},"goalIds":["63c92926f920a9005c4e619c"]}},"complete-all-parameters":{"summary":"Complete Example - All Parameters","description":"Real-world example with ALL available parameters filled out","value":{"endUserProfileDetails":{"age":32,"gender":"male","fitnessLevels":["intermediate"],"goalIds":["63c92926f920a9005c4e619c"],"trainingDaysPerWeek":4,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56","67deb3696a5e49797c122f55"],"endUserId":"64e3bca9d1b7e600141a9712"},"goalIds":["63c92926f920a9005c4e619d"],"difficulty":"intermediate","workoutsPerWeek":4,"workoutCollectionSources":["template","team"],"durationOptions":{"minWeeks":6,"maxWeeks":10},"userRequirements":"Progressive overload with 3-week cycles. Include deload weeks every 4th week. Focus on unilateral movements for balance. Critical: select and use only workouts that are named and contain the word \"minimal\".","locale":"fr-FR"}},"localized-fr-FR":{"summary":"Localized Program (French)","description":"Minimal request with locale — returns French AI name/description and localized nested workout fields.","value":{"goalIds":["63c92926f920a9005c4e619c"],"durationOptions":{"minWeeks":4,"maxWeeks":4},"workoutsPerWeek":2,"workoutCollectionSources":["template"],"difficulty":"intermediate","locale":"fr-FR"}}}}}},"responses":{"200":{"description":"Successfully generated training program with progressive workout structure.","schema":{"example":{"id":"507f1f77bcf86cd799439017","name":"4-Week Intermediate General Fitness","nameTranslations":{"en-US":"4-Week Intermediate General Fitness","fr-FR":"Forme Générale Intermédiaire 4 Semaines"},"description":"Improve your endurance, mobility, and core strength through a balanced 4-week progression.","descriptionTranslations":{"en-US":"Improve your endurance, mobility, and core strength through a balanced 4-week progression.","fr-FR":"Améliorez votre endurance, votre mobilité et votre gainage grâce à une progression équilibrée sur 4 semaines."},"difficulty":"intermediate","difficultyLabel":"Intermédiaire","goalIds":["63c92926f920a9005c4e619c"],"durationInWeeks":4,"workoutsPerWeek":2,"workouts":[{"id":"641da9c2c4c9c000132f2038","name":"Endurance 15 min beginner","nameLocalized":"Endurance 15 min débutant","duration":900000,"difficulty":"beginner"},{"id":"641daa9bc4c9c000132f2b1d","name":"Endurance 30 min intermediate","nameLocalized":"Endurance 30 min intermédiaire","duration":1800000,"difficulty":"intermediate"}]}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanGenerationResponseDto"}}}},"400":{"description":"Bad Request - Invalid input (unsupported locale), empty workout pool, or categoryIds pool below 3 public workouts."},"401":{"description":"Unauthorized - Invalid API key."},"403":{"description":"Forbidden - API key required or insufficient permissions."},"404":{"description":"Not Found - Organization or other resources not found."},"500":{"description":"Internal Server Error - Failed to generate program."}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Generate personalized training programs based on user profile details, duration preferences, and workout collection sources.","tags":["ai-generation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/generate' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function generatePlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/generate', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/generate\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/plans/{planId}/adapt":{"post":{"description":"\n## Adapt a training plan\n\nPersonalizes an existing organization plan (add/remove/replace/reorder future workouts) from profile signals, session/feedback history, optional wearable context, and `userGuidance` (not `userRequirements` — that name is generate-only). Completed workouts are not modified. The source `{planId}` must belong to `{organizationId}` (otherwise `404`).\n\n**Required:** `endUserProfileId` (org member hex id). Content API persists the adapted program under that user — omitting it returns `400` (`Provide endUserProfileId`).\n\n**Persistence:** Unlike workout adapt, the response includes a persisted adapted program `id` — **store it** and retrieve with `GET /v1/plans/{id}` / `.../workouts`. Team-owned catalog sources may be copied (`wasDuplicated`, `originalProgramId`). If that user has this plan **active**, only the **next workout slot** is adapted; otherwise the full future schedule is adapted.\n\n**End-user generated plans:** `POST .../plans/generate` (with `endUserId`) persists a member-owned plan (`visibility: end-user-ai-generated`). Those plans are **not** listed on `GET .../orgs/{orgId}/plans`; fetch by `GET /v1/plans/{id}`. Adapt accepts them when they are stamped to this org or owned by an active org member. Fresh generated plans (no `originalProgramId`) are updated **in place**. Catalog-derived user copies (`originalProgramId` set) on the inactive path return `400` — start the plan first so only the next slot is adapted.\n\n**404 vs 403:** `{planId}` must belong to `{organizationId}`. Other-org or non-member plans return `404` (not `403`) so existence is not leaked.\n\n**Sources:** body field `workoutSources` (`template` | `team`) — not `workoutCollectionSources` (that name is only for plan **generate**).\n\n**Rate limit:** counts as **10x**.\n\n**Client timeout:** keep the HTTP client open at least **120 seconds**.\n\n**Related:** `POST /v1/orgs/{orgId}/plans/generate`, `POST /v1/orgs/{orgId}/plans/recommend`, `GET /v1/plans/{id}`, `GET /v1/orgs/{orgId}/plans`.\n        ","operationId":"OrganizationPlanAdaptation_adaptPlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization/Team ID","schema":{"example":"67e2e9d0e23f010013e19dec","type":"string"}},{"name":"planId","required":true,"in":"path","description":"Plan ID to adapt","schema":{"example":"67e2e9d0e23f010013e19def","type":"string"}}],"requestBody":{"required":true,"description":"Program adaptation request with user profile and preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAdaptationRequestDto"},"examples":{"basic-adaptation":{"summary":"Basic Adaptation - Intermediate User","description":"Adapt a program for an intermediate fitness level user (endUserProfileId required)","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":32,"gender":"female","fitnessLevels":["intermediate"],"trainingDaysPerWeek":4},"workoutSources":["template","team"]}},"injury-adaptation":{"summary":"Adaptation with Injury Guidance","description":"Adapt a program considering user injury","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":45,"gender":"male","fitnessLevels":["beginner"],"trainingDaysPerWeek":3},"workoutSources":["template"],"userGuidance":"I have a knee injury. Please remove high-impact workouts and focus on low-impact alternatives."}},"full-personalization":{"summary":"Full Personalization with User Data","description":"Adapt using 60-day wearable data and full user profile","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":28,"gender":"female","fitnessLevels":["advanced"],"goalIds":["63c92926f920a9005c4e619c"],"trainingDaysPerWeek":5,"preferredEquipmentCategoryIds":["67deb36a6a5e49797c122f56"]},"workoutSources":["template","team"],"userGuidance":"My sleep has been poor lately. Please reduce intensity and add more recovery-focused workouts."}},"shorten-program":{"summary":"Shorten Program","description":"User wants a shorter version of their program","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":35,"gender":"male","fitnessLevels":["intermediate"],"trainingDaysPerWeek":3},"workoutSources":["team"],"userGuidance":"I only have time for 3 workouts per week now instead of 5. Please remove workouts to fit my schedule."}},"generated-plan":{"summary":"Adapt an end-user generated plan","description":"Use the persisted id from POST .../plans/generate. Fresh generated plans (no originalProgramId) are updated in place; they are not listed on GET .../orgs/{orgId}/plans.","value":{"endUserProfileId":"64e3bca9d1b7e600141a9712","endUserProfileDetails":{"age":40,"gender":"male","fitnessLevels":["advanced"],"trainingDaysPerWeek":4},"workoutSources":["template","team"],"userGuidance":"Ensure each week has at least 2 guided run sessions, and keep all workouts longer than 30 minutes"}}}}}},"responses":{"200":{"description":"Adapted program with personalized workout modifications","schema":{"example":{"id":"507f1f77bcf86cd799439020","name":"Adapted: 8-Week Strength Building Program","description":"Personalized strength program adapted for your fitness level and schedule","difficulty":"intermediate","durationInWeeks":8,"workoutsPerWeek":3,"totalWorkouts":24,"wasDuplicated":true,"originalProgramId":"507f1f77bcf86cd799439017","adaptationReasoning":"Program adapted to match your intermediate fitness level and 3-day training schedule. Removed 2 high-intensity workouts per week to accommodate recovery needs based on your sleep data. Replaced 3 advanced workouts with intermediate alternatives. Added 2 recovery-focused sessions to support your training progression.","workouts":[{"id":"64f1a2b3c4d5e6f7a8b9c0d1","name":"Upper Body Strength","duration":2700,"difficulty":"intermediate","description":"Focus on chest, back, and arms","position":0,"action":"kept"},{"id":"64f1a2b3c4d5e6f7a8b9c0d2","name":"Lower Body Power","duration":2400,"difficulty":"intermediate","description":"Legs, glutes, and core emphasis","position":1,"action":"kept"},{"id":"64f1a2b3c4d5e6f7a8b9c0d3","name":"Full Body Conditioning - Adapted","duration":3000,"difficulty":"intermediate","description":"Complete body workout with reduced intensity","position":2,"action":"replaced"},{"id":"64f1a2b3c4d5e6f7a8b9c0d4","name":"Recovery & Mobility","duration":1800,"difficulty":"beginner","description":"Gentle recovery session for active rest","position":3,"action":"added"}]}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAdaptationResponseDto"}}}},"400":{"description":"Invalid request, missing endUserProfileId, or inactive full-schedule adapt of a catalog-derived end-user copy (start the plan first)"},"401":{"description":"Unauthorized - Invalid API key"},"403":{"description":"Forbidden - API key required or AI adaptation is not enabled for this team"},"404":{"description":"Program or organization not found. Other-org plans and generated plans not owned by a member of this org return 404 (existence is not leaked)."}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Adapt an existing program based on user profile and data","tags":["ai-adaptation"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>/adapt' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function adaptPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>/adapt', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/plans/<PLAN_ID>/adapt\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/metadata":{"get":{"description":"\n## Organization metadata\n\nPublic org branding and config: `name`, `handle`, `description`, `website`, `logoUrl` / `watermarkUrl` (320×320 CDN PNGs), brand colors, `clientsJoinSetting` (`OPEN` | `INVITE_ONLY` | `SUBSCRIPTION_REQUIRED`).\n\n**Module / AI flags:** `aiGenerationEnabled`, `aiAdaptationEnabled`, `aiRecommendationEnabled`, `aiChatEnabled`, `insightsEnabled`, `setLoggingEnabled` (in-player weight / reps logging, admin toggle, on by default) (and module toggles like `hasAssenseiModuleActive`) are **member-app visibility**, already resolved (admin toggle plus OPEN/INVITE_ONLY member grant or org capability for chat/generate/adapt; recommend is admin-toggle only; insights is pure capability). Standard-app generate / adapt / chat writes also AND the admin toggle (explicit `false` 403s). Org API keys and recommend writes ignore App Features. Insights routes still enforce their own capability checks.\n\n**Try it:** `GET /v1/orgs/{organizationId}` with `X-Api-Key`.\n\n**Related:** `GET /v1/orgs/{orgId}/join-options`, `GET /v1/orgs/{orgId}/workouts`, `GET /v1/orgs/{orgId}/plans`.\n        ","operationId":"OrganizationMetadataApi_getOrganizationMetadata","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved organization metadata with complete branding information.","schema":{"example":{"id":"63415bf67a9c7000126616c1","name":"DEMO - Brave Fitness Team","handle":"bravefitnessdemo","logoUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/t/63415bf67a9c7000126616c1/logo/i/logo-320x320.png","watermarkUrl":"https://hhcontent.s3.eu-central-1.amazonaws.com/t/63415bf67a9c7000126616c1/watermark/i/watermark-320x320.png","description":"This is a demo account for showcasing Hyperhuman's AI-powered video production platform made for the health & fitness industry.","website":"https://bogdanpred.wixsite.com/bravefitnessdemo","brandMainColor":"#eeeb3c","brandSecondaryColor":"#F3F8F8","brandTextColor":"#ffffff","clientsJoinSetting":"OPEN","hasAssenseiModuleActive":false,"hasWearableModuleActive":true,"hasWhiteLabelAppActive":false}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMetadataResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified organization ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get organization metadata","tags":["organization"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/metadata' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationMetadata() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/metadata', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/metadata\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/branding/news":{"get":{"description":"Returns configured team news items for the branding/news section. If no sources are configured, returns an empty list.","operationId":"OrganizationBrandingNewsApi_getOrganizationBrandingNews","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"forceRefresh","required":false,"in":"query","description":"Force refresh and bypass cache.","schema":{"example":false,"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved organization branding news feed.","schema":{"example":{"items":[{"id":"rss-1829321","title":"How to Build Consistency in Training","description":"Practical strategies to maintain progress week over week.","url":"https://example.com/training-consistency","imageUrl":"https://cdn.example.com/images/training-consistency.jpg","source":"Example","channelTitle":"Example Fitness Journal","categories":["Training","Mindset"],"publishedAt":"2026-05-11T17:30:00.000Z"}]}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationBrandingNewsResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified organization ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get organization branding news feed","tags":["organization"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/branding/news' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationBrandingNews() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/branding/news', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/branding/news\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/join-options":{"get":{"description":"\n## User Onboarding Configuration\n\nRetrieves information about how users can join your organization, including join settings, subscription requirements, and available plans.\n\n---\n\n### 📋 What's Included\n\n**Join Settings:**\n- `clientsJoinSetting`: OPEN, INVITE_ONLY, or SUBSCRIPTION_REQUIRED\n- `canJoinDirectly`: Boolean flag for self-signup\n- `inviteOnlyMode`: Requires invitation to join\n- `requiresSubscription`: Payment required to access\n\n**Free Plans:**\n- `hasFreePlanWithAutoJoin`: Free access available\n- `freeJoinOptions`: List of free plans with auto-enrollment\n- `totalProductsAvailable`: Count of subscription products\n\n---\n\n### 🎯 Join Settings Explained\n\n| Setting | Description | User Flow |\n|---------|-------------|-----------|\n| **OPEN** | Anyone can join | Self-signup enabled |\n| **INVITE_ONLY** | Requires invitation | Admin must invite |\n| **SUBSCRIPTION_REQUIRED** | Payment required to join | User subscribes for access |\n\n---\n\n### 💡 Integration Patterns\n\n**Self-Signup Flow (OPEN):**\n```\n1. GET /v1/orgs/{orgId}/join-options → Check if open\n2. POST /v1/orgs/{orgId}/endusers/invite → Create user\n3. User receives email/access\n```\n\n**Invitation Flow (INVITE_ONLY):**\n```\n1. Admin invites via dashboard or API\n2. User receives invitation\n3. User accepts and creates account\n```\n\n**Subscription Required:**\n```\n1. GET /v1/orgs/{orgId}/join-options → Check products\n2. Display subscription options to user\n3. User subscribes → Access granted\n```\n\n---\n\n### 🔗 Related Endpoints\n\n- Organization Metadata: `GET /v1/orgs/{orgId}/metadata`\n- Invite Users: `POST /v1/orgs/{orgId}/endusers/invite`\n        ","operationId":"OrganizationJoinOptionsApi_getOrganizationJoinOptions","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved organization join options and configuration.","schema":{"example":{"clientsJoinSetting":"OPEN","canJoinDirectly":true,"requiresSubscription":false,"inviteOnlyMode":false,"hasFreePlanWithAutoJoin":false,"freeJoinOptions":[],"totalProductsAvailable":0}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationJoinOptionsResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified organization ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get organization join options","tags":["organization"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/join-options' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationJoinOptions() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/join-options', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/join-options\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/workouts":{"get":{"description":"## End-user workout library\n\nPaginated list of **published** workouts assigned to this end user from **this organization** (public and private). Not the org catalog (`GET /v1/orgs/{orgId}/workouts`) and not another team's content.\n\n**Try it:** `GET /v1/orgs/{organizationId}/endusers/{endUserId}/workouts?limit=20` with header `X-Api-Key`. Prefer the 24-character hex user id from invite/find.\n\n**Pagination:** `limit` (default **20**, max **50**). Follow `links.next`.\n\n**Related:** `POST .../workouts/assign`, `POST .../workouts/unassign`, `GET /v1/workouts/{id}`.\n\n**Rate limit:** 1x.","operationId":"OrganizationEndUserContentApi_listWorkouts","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"Email, external id, or 24-character hex user id. Prefer hex in production.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search text","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Fields to sort. Prefix them with - (descending) or + (ascending): +someField,-otherField","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US). Localizes text and locale-aware media when supported; falls back to English.","schema":{"example":"en-US","type":"string"}},{"name":"include","required":false,"in":"query","deprecated":true,"description":"Deprecated legacy include parameter accepted for backward compatibility and ignored by this endpoint.","schema":{"type":"string"}},{"name":"difficulty","required":false,"in":"query","description":"Filter by difficulty","schema":{"type":"string","enum":["beginner","intermediate","advanced"]}},{"name":"categoryIds","required":false,"in":"query","description":"Filter by workout category IDs (comma-separated 24-character hex DB ids). Optional `custom:` tokens match organization list behavior when used.","schema":{"example":"615aa3f0dbe7140012c59e94","type":"string"}},{"name":"duration","required":false,"in":"query","description":"Filter by duration in minutes (min-max format, e.g. \"10-30\")","schema":{"type":"string"}},{"name":"visibility","required":false,"in":"query","description":"Filter workouts by their visibility status.","schema":{"example":"public","type":"string","enum":["private","public","all"]}},{"name":"allowAssessment","required":false,"in":"query","description":"Filter workouts by assessment support","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutListResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved as an active member of this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List workouts in an end user library","tags":["endusers-content"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listWorkouts() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/workouts/assign":{"post":{"description":"## Assign workouts\n\nAdds organization workouts to the end user's library (same membership as Teams assign). Idempotent: already-assigned ids are skipped and do **not** re-notify.\n\nDoes **not** start a plan. Eligibility: workout belongs to this organization, `status` published, visibility `public` or `private`. Max **10** ids. Any ineligible id → **400** and no writes.\n\n**Notifications:** email + push on **new** rows only (Teams copy). Defaults on; set `sendAssignmentEmail` / `sendAssignmentPush` to `false` to skip. User communication preferences still apply.\n\n**Try it:** body `{ \"workoutIds\": [\"<id>\"] }` from `GET /v1/orgs/{orgId}/workouts`.\n\n**Related:** `GET .../workouts`, `POST .../workouts/unassign`.\n\n**Rate limit:** 1x.","operationId":"OrganizationEndUserContentApi_assignWorkouts","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"Email, external id, or 24-character hex user id. Prefer hex in production.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignWorkoutsBody"}}}},"responses":{"200":{"description":"Workouts assigned. Already-assigned ids are ignored."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved as an active member of this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Assign workouts to an end user library","tags":["endusers-content"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts/assign' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function assignWorkouts() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts/assign', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts/assign\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/workouts/unassign":{"post":{"description":"## Unassign workouts\n\nRemoves library membership for the given workout ids. Missing rows and ids that are not this organization's content are ignored (safe to retry). Max **10** ids.\n\n**Related:** `POST .../workouts/assign`, `GET .../workouts`.\n\n**Rate limit:** 1x.","operationId":"OrganizationEndUserContentApi_unassignWorkouts","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"Email, external id, or 24-character hex user id. Prefer hex in production.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnassignWorkoutsBody"}}}},"responses":{"200":{"description":"Workout access rows removed where present."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved as an active member of this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Remove workouts from an end user library","tags":["endusers-content"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts/unassign' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function unassignWorkouts() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts/unassign', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/workouts/unassign\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans":{"get":{"description":"## End-user program library\n\nPaginated list of **catalog** programs (visibility `public` or `private`) assigned to this end user from **this organization**. This is **not** the active enrollment (`GET .../plans/active`).\n\n**Try it:** `GET /v1/orgs/{organizationId}/endusers/{endUserId}/plans?limit=20` with header `X-Api-Key`.\n\n**Pagination:** `limit` (default **20**, max **50**). Follow `links.next`.\n\n**Related:** `POST .../plans/assign`, `POST .../plans/unassign`, `POST .../plans/start`, `GET /v1/plans/{id}`.\n\n**Rate limit:** 1x.","operationId":"OrganizationEndUserContentApi_listPlans","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"Email, external id, or 24-character hex user id. Prefer hex in production.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return per page.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"q","required":false,"in":"query","description":"Search text","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Fields to sort. Prefix them with - (descending) or + (ascending): +someField,-otherField","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","description":"BCP-47 locale (e.g. en-US). Localizes text and locale-aware media when supported; falls back to English.","schema":{"example":"en-US","type":"string"}},{"name":"include","required":false,"in":"query","deprecated":true,"description":"Deprecated legacy include parameter accepted for backward compatibility and ignored by this endpoint.","schema":{"type":"string"}},{"name":"difficulty","required":false,"in":"query","description":"Filter by difficulty","schema":{"type":"string","enum":["beginner","intermediate","advanced"]}},{"name":"goalIds","required":false,"in":"query","description":"Filter by goal IDs (comma-separated)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanListResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved as an active member of this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"List programs in an end user library","tags":["endusers-content"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listPlans() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/assign":{"post":{"description":"## Assign programs\n\nAdds organization programs (plans) to the end user's library. Does **not** set `isActive` — call `POST .../plans/start` to enroll. Idempotent: already-assigned ids are skipped and do **not** re-notify.\n\nEligibility: plan owned by an organization trainer, visibility `public` or `private` (never `end-user-ai-generated`). Max **5** ids. Any ineligible id → **400** and no writes.\n\n**Notifications:** email + push on **new** rows only. Defaults on; set `sendAssignmentEmail` / `sendAssignmentPush` to `false` to skip.\n\n**Related:** `GET .../plans`, `POST .../plans/unassign`, `POST .../plans/start`.\n\n**Rate limit:** 1x.","operationId":"OrganizationEndUserContentApi_assignPlans","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"Email, external id, or 24-character hex user id. Prefer hex in production.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPlansBody"}}}},"responses":{"200":{"description":"Programs assigned. Already-assigned ids are ignored. Does not start an active plan."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved as an active member of this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Assign programs to an end user library","tags":["endusers-content"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/assign' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function assignPlans() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/assign', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/assign\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/unassign":{"post":{"description":"## Unassign programs\n\nRemoves library membership for the given plan ids. Missing rows and ids that are not this organization's content are ignored. If the id is the user's **active** plan, enrollment ends (the access row is deleted). Max **5** ids.\n\n**Related:** `POST .../plans/assign`, `GET .../plans`, `POST .../plans/{planId}/end`.\n\n**Rate limit:** 1x.","operationId":"OrganizationEndUserContentApi_unassignPlans","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"Email, external id, or 24-character hex user id. Prefer hex in production.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnassignPlansBody"}}}},"responses":{"200":{"description":"Plan access rows removed where present."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved as an active member of this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Remove programs from an end user library","tags":["endusers-content"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/unassign' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function unassignPlans() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/unassign', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/unassign\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/active/progress":{"get":{"description":"\n## Plan progress\n\nReturns per-workout progress for the end user's active plan. Keys are position indices (as strings); values include completed, latestCompletionDate, workoutName, difficulty, duration, categories, workoutId, positionInPlan.\n\nOnly workout sessions completed on or after the active plan's `startDate` are credited toward `completed` and `latestCompletionDate`. Sessions visible elsewhere in the app may predate that window.\n\nWhen the end user has no active plan, the endpoint responds with `200 OK` and `{ \"data\": null }` (rather than 404), so callers can render a \"no active plan\" state without treating it as an error.\n\n---\n\n### Related endpoints\n\n- `GET .../plans/active` - Get active plan details\n- `POST .../plans/start` - Start a plan\n- `POST .../plans/{planId}/end` - End active plan\n    ","operationId":"OrganizationEndUserPlansApi_getActivePlanProgress","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The organization id (24-character hex string).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"responses":{"200":{"description":"Plan progress for the end user, or `data: null` when there is no active plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanProgressResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved (not found or not a member of this organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get plan progress for an end user","tags":["endusers-plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/progress' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getActivePlanProgress() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/progress', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/progress\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/active":{"get":{"description":"\n## Active plan\n\nReturns the end user's active workout plan if any (`data: null` otherwise), with schedule (workoutsPerWeek, durationInWeeks, currentWeekNumber, daysSinceStart, completedWorkouts, totalWorkouts, completionPercentage, todaysWorkout). `todaysWorkout` is omitted when a workout was already completed today or no open slot remains. `programFinished` is true once every slot is completed or skipped. With `dropMissedAtWeekEnd` off, it is true only once every slot is completed: when only skipped slots are left, the first one in the latest unfinished week is due again. With `dropMissedAtWeekEnd` on, only fully elapsed weeks before `currentWeekNumber` are skipped. That week stays due after the plan length.\n\n`data.planId` is the plan id to use with `GET /v1/plans/{id}` and `GET /v1/plans/{id}/workouts`; `data.plan` carries a summary (name, difficulty, durationInWeeks, workoutsPerWeek). The legacy `_id` / `workoutCollectionId` / `traineeId` aliases are deprecated and mirror `id` / `planId` / `endUserId`.\n\n---\n\n### Related endpoints\n\n- `GET .../plans/active/progress` - Get per-workout progress\n- `POST .../plans/start` - Start a plan\n- `POST .../plans/{planId}/end` - End active plan\n    ","operationId":"OrganizationEndUserPlansApi_getActivePlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The organization id (24-character hex string).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"responses":{"200":{"description":"Active plan or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivePlanResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved (not found or not a member of this organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get active plan for an end user","tags":["endusers-plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getActivePlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/start":{"post":{"description":"\n## Start plan\n\nStarts the given plan as the end user's active plan. Any existing active plan is deactivated. This is **not** library assignment — use `POST .../plans/assign` to add a program to the user's library without enrolling.\n\nCall this once when the user begins a program (for example at enrollment). If the same plan is already active and `restart` is not `true`, the existing access record is returned without changing `startDate` — safe for idempotent \"ensure enrolled\" calls.\n\nPlan progress (`GET .../plans/active/progress`) only credits workout sessions completed on or after the plan's `startDate`. Set `restart: true` to reset that progress window intentionally (for example when the user starts the program over).\n\nOptional `autoAdapt: true` enables automatic next-workout adaptation for this active enrollment. Toggle later via `PATCH .../plans/active/settings`.\n\n`dropMissedAtWeekEnd` defaults to true when omitted: unfinished slots in fully elapsed weeks before `currentWeekNumber` are skipped and do not count as completed. That week stays due after the plan length. A later week still drops once it has elapsed. Send `false` to keep missed workouts due. Skip one open slot with `POST .../plans/active/slots/{position}/skip`.\n\n---\n\n### Related endpoints\n\n- `POST .../plans/assign` - Add programs to the library (does not enroll)\n- `GET .../plans/active` - Get active plan details\n- `GET .../plans/active/progress` - Get plan progress\n- `PATCH .../plans/active/settings` - Update `autoAdapt` and `dropMissedAtWeekEnd`\n- `POST .../plans/active/slots/{position}/skip` - Skip an open workout without a completion\n- `POST .../plans/{planId}/end` - End active plan\n- `GET /v1/plans/{id}` - Plan catalog details\n- `GET /v1/plans/{id}/workouts` - Workouts in plan\n    ","operationId":"OrganizationEndUserPlansApi_startPlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The organization id (24-character hex string).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"requestBody":{"required":true,"description":"Plan ID to start as the active plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartPlanBody"}}}},"responses":{"201":{"description":"Plan access record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAccessResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The end user could not be resolved (not found or not a member of this organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Start a plan for an end user","tags":["endusers-plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/start' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function startPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/start', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/start\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/active/settings":{"patch":{"description":"## Active plan settings\n\nUpdates per-enrollment settings on the user's active plan access record.\n\n| Field | Description |\n|-------|-------------|\n| `autoAdapt` | When `true`, the next scheduled workout may be adapted automatically after sessions, feedback, digest refresh, or profile changes. When `false`, disables auto-adapt until re-enabled. |\n| `dropMissedAtWeekEnd` | `true` skips unfinished workouts in fully elapsed weeks before the current week without counting them as completed. That week stays due after the plan length. `false` keeps missed workouts due. Turning it off keeps skips that already happened. Omitting the field on this PATCH leaves the current value unchanged. |\n\nReturns the updated plan access record (same shape as `GET .../plans/active`).","operationId":"OrganizationEndUserPlansApi_updateActivePlanSettings","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The organization id (24-character hex string).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}}],"requestBody":{"required":true,"description":"Active plan settings to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateActivePlanSettingsBody"}}}},"responses":{"200":{"description":"Updated plan access record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAccessResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Update active plan settings for an end user","tags":["endusers-plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/settings' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function updateActivePlanSettings() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/settings', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/settings\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/active/slots/{position}/skip":{"post":{"description":"Marks one open program slot skipped without creating a completed session. Refused when dropMissedAtWeekEnd is false, or when that slot is already completed or skipped. No request body.","operationId":"OrganizationEndUserPlansApi_skipActivePlanSlot","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The organization id (24-character hex string).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}},{"name":"position","required":true,"in":"path","description":"0-based index of an open workout in the active plan.","schema":{"example":0,"type":"number"}}],"responses":{"201":{"description":"Slot skipped. Returns the plan access record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAccessResponse"}}}},"400":{"description":"Position is not an integer, or not a slot in the active program.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"dropMissedAtWeekEnd is false, or the slot is already completed or skipped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Skip an open workout in an end user active plan","tags":["endusers-plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/slots/<POSITION>/skip' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function skipActivePlanSlot() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/slots/<POSITION>/skip', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/active/slots/<POSITION>/skip\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/plans/{planId}/end":{"post":{"description":"\n## End plan\n\nEnds the specified plan for the end user. The plan must be the user's current active plan. Returns 404 if no active plan matches the given planId.\n\n---\n\n### Related endpoints\n\n- `GET .../plans/active` - Get active plan details\n- `GET .../plans/active/progress` - Get plan progress\n- `POST .../plans/start` - Start a plan\n    ","operationId":"OrganizationEndUserPlansApi_endPlan","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The organization id (24-character hex string).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}},{"name":"planId","required":true,"in":"path","description":"The plan ID to end.","schema":{"example":"60f1b3b3b3b3b3b3b3b3b3b3","type":"string"}}],"responses":{"200":{"description":"Updated plan access record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAccessResponse"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"End an active plan for an end user","tags":["endusers-plans"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/<PLAN_ID>/end' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function endPlan() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/<PLAN_ID>/end', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/plans/<PLAN_ID>/end\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers":{"get":{"description":"Retrieves a paginated list of end users associated with the organization.\n\n`endUserId` is present only when the API key is for this organization and the end user has an active (non-suspended) team membership.\n\n### Pagination\nUse the standard `offset`/`limit` cursors. The response contains the canonical `links` envelope:\n- `links.next` — fully qualified URL for the next page (omitted on the last page)\n- `links.total` — total number of matching end users\n\nThe top-level `total` field is **deprecated** and kept only for backwards compatibility; new integrations should read `links.total` instead.","operationId":"OrganizationEndUsersApi_getOrganizationEndUsers","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the organization.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}},{"name":"offset","required":false,"in":"query","description":"Offset for pagination. Defaults to 0.","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page. Defaults to 20, max 100. Values above 100 return 400 ValidationError.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"status","required":false,"in":"query","description":"Filter clients by status: \"active\", \"suspended\", or \"all\"","schema":{"enum":["active","suspended","all"],"type":"string"}},{"name":"sortBy","required":false,"in":"query","description":"Sort clients by \"name\", \"status\", or \"joined\" (default)","schema":{"enum":["name","status","joined"],"type":"string"}},{"name":"sortDirection","required":false,"in":"query","description":"Sort direction: \"asc\" (default) or \"desc\"","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of end users for the organization.","schema":{"example":{"data":[{"email":"john.doe@acme.com","externalUUID":"ext-user-12345","firstName":"John","lastName":"Doe","status":"active","joinedDate":"2025-09-15T10:30:00Z","endUserId":"507f1f77bcf86cd799439011"},{"email":"jane.smith@acme.com","externalUUID":"ext-user-67890","firstName":"Jane","lastName":"Smith","status":"suspended","joinedDate":"2025-09-20T14:20:00Z"}],"links":{"next":"https://api.hyperhuman.club/v1/orgs/12ab3efd45c67c1234566cd1/endusers?limit=20&offset=20","total":142},"total":142}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserProfileListResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key is not associated with the requested organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The specified organization ID does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get organization end users","tags":["endusers-management"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationEndUsers() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"\n## Permanently Remove User\n\nCompletely removes a user from your organization. This action is **irreversible** and will:\n\n- Delete all user data and progress\n- Remove access to organization content\n- Clear workout history and sessions\n- Cannot be undone\n\n---\n\n### ⚠️ Important Considerations\n\n**Before Removing:**\n- User will lose all progress and data\n- Consider suspending instead for temporary access removal\n- Backup any important user data first\n- Notify user if required by your policies\n\n**Use Cases:**\n- GDPR compliance (right to be forgotten)\n- Account closure requests\n- Data cleanup and maintenance\n- User requested permanent deletion\n\n---\n\n### 🔄 Alternative Actions\n\n**Temporary Removal:**\n- `PUT /v1/orgs/{orgId}/endusers/suspend` - Temporarily disable access\n- User data preserved, can be reactivated later\n- Better for temporary access issues\n\n**Permanent Removal:**\n- `DELETE /v1/orgs/{orgId}/endusers` - This endpoint\n- Complete data deletion, cannot be undone\n- Use for final account closure\n\n---\n\n### 💡 Best Practices\n\n✅ **Verify user identity** - Double-check email/UUID before deletion  \n✅ **Consider suspension first** - Try suspend before permanent removal  \n✅ **Log deletion events** - Track for audit and compliance  \n✅ **Handle gracefully** - 404 is expected if user already removed  \n❌ **Don't delete active users** - Consider suspending instead\n\n---\n\n### 🔗 Related Endpoints\n\n- Find User: `GET /v1/orgs/{orgId}/endusers/find` - Locate user first\n- Suspend User: `PUT /v1/orgs/{orgId}/endusers/suspend` - Temporary removal\n- Reactivate User: `PUT /v1/orgs/{orgId}/endusers/reactivate` - Restore suspended user\n        ","operationId":"OrganizationEndUsersApi_removeEndUser","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the organization.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdentifierDto"}}}},"responses":{"200":{"description":"Successfully removed end user from organization.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key is not associated with the requested organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user not found in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Remove end user from organization","tags":["endusers-management"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function removeEndUser() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/invite":{"post":{"description":"\n## Add Users to Your Organization\n\nSend invitations to one or more end users. Creates **pending** invites; each user accepts in the member experience (or via your branded Redirect URL) to gain access to your organization's content and features.\n\n---\n\n### Identifier Options\n\n**Email Only:**\n- User invited via email address\n- Hyperhuman creates account on first login\n- Email must be valid and unique\n\n**Email + External UUID:**\n- Map to your existing user system\n- Track users across platforms\n- Sync user data between systems\n- **Recommended for integrations**\n\n---\n\n### Invite email (`sendInviteEmail`)\n\nBy default Hyperhuman sends a **transactional invite email** when a new pending invite is created.\n\n| Request `sendInviteEmail` | Organization Invite emails setting | Hyperhuman invite email |\n|-----------------------------|------------------------------------|-------------------------|\n| omitted | on (default) | sent for new invites |\n| omitted | off | not sent |\n| `false` | any | not sent for this batch |\n| `true` | any | sent for this batch (overrides org off) |\n\n- **Pending invites are always created** whether email is sent or not.\n- Response **`inviteEmailSent`** is the effective send **policy** for *new* invites in this request — not a per-user delivery receipt.\n- Updating an existing pending invite **never re-sends** email, even when policy is on.\n- When you send your own invite email, set `sendInviteEmail: false` (or turn off **Invite emails** in the Hyperhuman team app) and point users at your organization **Redirect URL**.\n\n---\n\n### Typical User Lifecycle\n\n1. **Invite**: `POST /v1/orgs/{orgId}/endusers/invite` → Add users\n2. **Verify**: `GET /v1/orgs/{orgId}/endusers/find?email=...` → Check status\n3. **List**: `GET /v1/orgs/{orgId}/endusers` → View all users\n4. **Manage**: Suspend/reactivate as needed\n5. **Remove**: `DELETE /v1/orgs/{orgId}/endusers` → Permanent deletion\n\n---\n\n### Best Practices\n\n- **Batch invitations** — up to 100 users per request\n- **Use externalUUID** — map to your user IDs for sync\n- **Validate emails** — check format before sending\n- **Handle failures** — review the `failed` array\n- **Custom invite email** — `sendInviteEmail: false` when you email clients yourself; use your Redirect URL\n- **Don't re-invite blindly** — check if the user exists first; pending updates do not re-send email\n\n---\n\n### Error Handling\n\nCommon failure reasons:\n- `User already exists` - Email already in organization\n- `Invalid email format` - Email validation failed\n- `Duplicate in batch` - Same email appears twice\n- `Organization quota exceeded` - User limit reached\n\n---\n\n### Related Endpoints\n\n- Find User: `GET /v1/orgs/{orgId}/endusers/find`\n- List Users: `GET /v1/orgs/{orgId}/endusers`\n- Suspend User: `PUT /v1/orgs/{orgId}/endusers/suspend`\n- Remove User: `DELETE /v1/orgs/{orgId}/endusers`\n        ","operationId":"OrganizationEndUsersApi_inviteEndUsers","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"requestBody":{"required":true,"description":"Users to invite (required), with optional external UUID mapping. Optional sendInviteEmail overrides whether Hyperhuman sends a transactional invite email for this batch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteEndUsersDto"},"examples":{"single-email-only":{"summary":"Single User - Email Only","description":"Invite one user with just an email address (uses organization Invite emails setting)","value":{"users":[{"email":"john.doe@acme.com"}]}},"batch-with-external-ids":{"summary":"Batch Invite - With External UUIDs","description":"Invite multiple users and map to your system IDs for synchronization","value":{"users":[{"email":"john.doe@acme.com","externalUUID":"user-12345"},{"email":"jane.smith@acme.com","externalUUID":"user-67890"},{"email":"bob.jones@acme.com","externalUUID":"user-11111"}]}},"large-batch":{"summary":"Large Batch - 10+ Users","description":"Efficiently invite many users at once (up to 100 per request)","value":{"users":[{"email":"user1@acme.com","externalUUID":"ext-user-1001"},{"email":"user2@acme.com","externalUUID":"ext-user-1002"},{"email":"user3@acme.com","externalUUID":"ext-user-1003"},{"email":"user4@acme.com","externalUUID":"ext-user-1004"},{"email":"user5@acme.com","externalUUID":"ext-user-1005"},{"email":"user6@acme.com","externalUUID":"ext-user-1006"},{"email":"user7@acme.com","externalUUID":"ext-user-1007"},{"email":"user8@acme.com","externalUUID":"ext-user-1008"},{"email":"user9@acme.com","externalUUID":"ext-user-1009"},{"email":"user10@acme.com","externalUUID":"ext-user-1010"}]}},"custom-invite-email":{"summary":"Skip Hyperhuman invite email","description":"Create pending invites without Hyperhuman transactional invite email when you send your own. Response inviteEmailSent is false. Point users at your organization Redirect URL.","value":{"sendInviteEmail":false,"users":[{"email":"john.doe@acme.com","externalUUID":"emp-001"},{"email":"jane.smith@acme.com","externalUUID":"emp-002"}]}},"force-invite-email":{"summary":"Force Hyperhuman invite email","description":"Send Hyperhuman transactional invite email for this batch even if organization Invite emails is off.","value":{"sendInviteEmail":true,"users":[{"email":"john.doe@acme.com","externalUUID":"emp-001"}]}}}}}},"responses":{"201":{"description":"Invitation processing complete. Returns success count, any failures, optionally invited with endUserId when the user already has an active membership, and inviteEmailSent (effective transactional invite-email policy for new invites in this request).","content":{"application/json":{"schema":{"type":"object","properties":{"successful":{"type":"number","description":"Number of successful invitations (pending invite created or updated)","example":12},"failed":{"type":"array","description":"List of failed invitations with error reasons","items":{"type":"object","properties":{"email":{"type":"string","example":"invalid@email"},"reason":{"type":"string","example":"Invalid email format"}}},"example":[{"email":"duplicate@acme.com","reason":"User already exists"},{"email":"bad-email","reason":"Invalid email format"}]},"invited":{"type":"array","description":"Successful invites; endUserId present only when the user already has an active team membership.","items":{"type":"object","properties":{"email":{"type":"string"},"endUserId":{"type":"string","description":"User ID; present only for active members."}}}},"inviteEmailSent":{"type":"boolean","description":"Whether Hyperhuman will send a transactional invite email for *new* invites in this request. Resolved from the optional body field sendInviteEmail (wins when set) and the organization Invite emails setting (on by default). When false, pending invite records are still created; Hyperhuman does not send the invite email. This is batch send policy — not a per-user delivery receipt. Updating an existing pending invite never re-sends email even when this is true.","example":true}},"example":{"successful":12,"failed":[{"email":"duplicate@acme.com","reason":"User already exists"}],"invited":[{"email":"user1@acme.com","endUserId":"507f1f77bcf86cd799439011"},{"email":"user2@acme.com"}],"inviteEmailSent":true}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key is not associated with the requested organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Invite end users to organization","tags":["endusers-management"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/invite' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function inviteEndUsers() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/invite', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/invite\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/suspend":{"put":{"description":"\n## Temporarily Suspend User Access\n\nSuspends a user's access to your organization content while preserving their data and progress. This is a **reversible action** that:\n\n- Blocks access to workouts and plans\n- Preserves user data and progress\n- Can be reactivated later\n- User cannot log in during suspension\n\n---\n\n### 🎯 When to Suspend\n\n**Temporary Access Issues:**\n- Payment/billing problems\n- Policy violations (temporary)\n- Account security concerns\n- User requested break\n\n**vs. Permanent Removal:**\n- Suspension: Temporary, data preserved\n- Deletion: Permanent, data lost\n- Choose suspension for reversible actions\n\n---\n\n### 🔄 User Experience During Suspension\n\n**What Users See:**\n- Cannot access organization content\n- Login blocked with suspension message\n- All data and progress preserved\n- Can be reactivated by admin\n\n**What Admins Can Do:**\n- View suspended users in user list\n- Reactivate anytime with reactivate endpoint\n- See suspension status in user details\n- Track suspension history\n\n---\n\n### 💡 Best Practices\n\n✅ **Communicate with user** - Explain why and duration  \n✅ **Set clear policies** - Define suspension criteria  \n✅ **Monitor suspension duration** - Don't leave users suspended indefinitely  \n✅ **Use for temporary issues** - Permanent problems may need deletion  \n✅ **Document reasons** - Track why users were suspended\n\n---\n\n### 🔗 Related Endpoints\n\n- Find User: `GET /v1/orgs/{orgId}/endusers/find` - Locate user first\n- Reactivate User: `PUT /v1/orgs/{orgId}/endusers/reactivate` - Restore access\n- Remove User: `DELETE /v1/orgs/{orgId}/endusers` - Permanent deletion\n- List Users: `GET /v1/orgs/{orgId}/endusers` - View all users (including suspended)\n        ","operationId":"OrganizationEndUsersApi_suspendEndUser","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the organization.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdentifierDto"}}}},"responses":{"200":{"description":"Successfully suspended end user in organization.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key is not associated with the requested organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user not found in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Suspend end user in organization","tags":["endusers-management"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PUT 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/suspend' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function suspendEndUser() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/suspend', {\n  method: 'PUT',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.put(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/suspend\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/reactivate":{"put":{"description":"\n## Restore Suspended User Access\n\nReactivates a previously suspended user, restoring full access to your organization content. This action:\n\n- Restores login access immediately\n- Preserves all user data and progress\n- Returns user to active status\n- Can be done anytime after suspension\n\n---\n\n### 🎯 When to Reactivate\n\n**Common Scenarios:**\n- Payment issues resolved\n- Policy violations addressed\n- Security concerns cleared\n- User requested restoration\n- Administrative error correction\n\n**Prerequisites:**\n- User must be currently suspended\n- Cannot reactivate already active users\n- Cannot reactivate permanently deleted users\n\n---\n\n### 🔄 User Experience After Reactivation\n\n**Immediate Access:**\n- User can log in immediately\n- Full access to organization content\n- All previous data and progress intact\n- No data loss from suspension period\n\n**Status Changes:**\n- User status changes from \"suspended\" to \"active\"\n- Appears in active user lists\n- Can participate in workouts and plans\n- Normal user functionality restored\n\n---\n\n### 💡 Best Practices\n\n✅ **Verify suspension reason resolved** - Ensure original issue is fixed  \n✅ **Communicate with user** - Notify them of reactivation  \n✅ **Monitor user activity** - Ensure they can access content  \n✅ **Update user records** - Track reactivation for audit  \n✅ **Test user access** - Verify login and content access works\n\n---\n\n### 🔗 Related Endpoints\n\n- Find User: `GET /v1/orgs/{orgId}/endusers/find` - Check current status\n- Suspend User: `PUT /v1/orgs/{orgId}/endusers/suspend` - Suspend if needed again\n- List Users: `GET /v1/orgs/{orgId}/endusers` - View all users\n- Remove User: `DELETE /v1/orgs/{orgId}/endusers` - Permanent deletion (if needed)\n        ","operationId":"OrganizationEndUsersApi_reactivateEndUser","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the organization.","schema":{"example":"12ab3efd45c67c1234566cd1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdentifierDto"}}}},"responses":{"200":{"description":"Successfully reactivated end user in organization.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key is not associated with the requested organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user not found in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Reactivate end user in organization","tags":["endusers-management"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PUT 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/reactivate' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function reactivateEndUser() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/reactivate', {\n  method: 'PUT',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.put(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/reactivate\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/find":{"get":{"description":"\n## Find Specific User\n\nRetrieve a single user from your organization by email or external UUID. Useful for checking if a user exists before inviting.\n\nThis is a **single-record lookup**. Do not send `limit`, `offset`, or other list-query keys — unknown query parameters return **400**.\n\n---\n\n### Identifier Options\n\n**By Email:**\n```bash\nGET /v1/orgs/{orgId}/endusers/find?email=john.doe@acme.com\n```\n\n**By External UUID:**\n```bash\nGET /v1/orgs/{orgId}/endusers/find?externalUUID=ext-user-12345\n```\n\n**Required:** Must provide either `email` OR `externalUUID` (not both)\n\n---\n\n### Use Cases\n\n- **Pre-invite Check** - Verify user doesn't exist before inviting\n- **User Lookup** - Find user details for support queries\n- **Sync Validation** - Confirm external UUID mapping is correct\n- **Duplicate Prevention** - Check before creating user in your system\n\n---\n\n### Notes\n\n- Email is case-insensitive (`john@acme.com` = `John@acme.com`)\n- Prefer external UUID for integrations\n- **404** when the user is not in the organization is expected — handle it, do not retry as a list\n- Cache lookups to reduce API calls\n\n---\n\n### Related Endpoints\n\n- Invite Users: `POST /v1/orgs/{orgId}/endusers/invite` - Add new users\n- List Users: `GET /v1/orgs/{orgId}/endusers` - Browse all users\n- Suspend User: `PUT /v1/orgs/{orgId}/endusers/suspend` - Deactivate user\n- Remove User: `DELETE /v1/orgs/{orgId}/endusers` - Permanently delete\n    ","operationId":"OrganizationEndUsersApi_getEndUserById","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"email","required":false,"in":"query","description":"Email address of the user to find (case-insensitive)","schema":{"example":"john.doe@acme.com","type":"string"}},{"name":"externalUUID","required":false,"in":"query","description":"External UUID of the user to find","schema":{"example":"ext-user-12345","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved end user profile. endUserId is present only when the end user has an active (non-suspended) team membership.","schema":{"example":{"email":"john.doe@acme.com","externalUUID":"ext-user-12345","firstName":"John","lastName":"Doe","status":"active","joinedDate":"2025-09-15T10:30:00Z","endUserId":"507f1f77bcf86cd799439011"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserProfileDto"}}}},"400":{"description":"Missing required identifier (email or externalUUID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key is not associated with the requested organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user not found in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Find end user by email or external UUID","tags":["endusers-management"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/find' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getEndUserById() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/find', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/find\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/webhooks":{"post":{"description":"\nRegister an HTTPS URL to receive signed events as they happen: workout completions, program progress and daily insights. Returns the signing `secret` once. Store it.\n\n**Events:** `workout_session.completed`, `plan.started`, `plan.progress_updated`, `plan.completed`, `insights.digest_ready`, or `*` for all. Unknown types return 400.\n\n**Limits:** 10 endpoints per organization. HTTPS only; private, loopback and link-local addresses are refused.\n\n**Rate limit:** 1x. Each delivery attempt also counts 1x.\n\n**Related:** `POST .../webhooks/{webhookId}/test`, `GET .../events`.\n    ","operationId":"OrganizationWebhooksApi_create","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecretDto"}}}},"400":{"description":"Invalid URL or event type, or 10 endpoints already exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Create a webhook endpoint","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function create() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"get":{"description":"\nAll endpoints of the organization, oldest first, with status and the last delivery result. Secrets are never listed.\n\n**Try it:** `GET /v1/orgs/{organizationId}/webhooks`. Advance with `links.next`.\n\n**Rate limit:** 1x.\n    ","operationId":"OrganizationWebhooksApi_list","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"offset","required":false,"in":"query","description":"Items to skip. Prefer the `links.next` URL.","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListResponse"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List webhook endpoints","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function list() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/webhooks/{webhookId}":{"get":{"description":"One endpoint: URL, events, `status` (`enabled` or `disabled`, with `disabledReason`) and the last delivery result.\n\n**Rate limit:** 1x.","operationId":"OrganizationWebhooksApi_get","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"webhookId","required":true,"in":"path","description":"Webhook endpoint id (24-character hex).","schema":{"example":"6721f0c4a1b2c3d4e5f60718","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No webhook endpoint with this id in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get a webhook endpoint","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function get() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"patch":{"description":"\nChange `url`, `events`, `description` or `status`. `status: \"enabled\"` turns a disabled endpoint back on. `rotateSecret: true` returns a new `secret`; the old one stops at once.\n\n**Rate limit:** 1x.\n    ","operationId":"OrganizationWebhooksApi_update","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"webhookId","required":true,"in":"path","description":"Webhook endpoint id (24-character hex).","schema":{"example":"6721f0c4a1b2c3d4e5f60718","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecretDto"}}}},"400":{"description":"Invalid URL or event type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No webhook endpoint with this id in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Update a webhook endpoint","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X PATCH 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function update() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.patch(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"Removes the endpoint and stops its pending retries. Events stay in `GET .../events` for 30 days.\n\n**Rate limit:** 1x.","operationId":"OrganizationWebhooksApi_delete","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"webhookId","required":true,"in":"path","description":"Webhook endpoint id (24-character hex).","schema":{"example":"6721f0c4a1b2c3d4e5f60718","type":"string"}}],"responses":{"204":{"description":"Deleted."},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No webhook endpoint with this id in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete a webhook endpoint","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function delete() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/webhooks/{webhookId}/test":{"post":{"description":"\nSends one signed sample of the chosen `type` with fake ids, now, and returns your server's answer. Test events are not stored, not retried and not in the events feed. Works on disabled endpoints, so you can check a fix before turning it back on.\n\n**Rate limit:** 1x.\n    ","operationId":"OrganizationWebhooksApi_test","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"webhookId","required":true,"in":"path","description":"Webhook endpoint id (24-character hex).","schema":{"example":"6721f0c4a1b2c3d4e5f60718","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestWebhookBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResultDto"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No webhook endpoint with this id in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Send a test event","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>/test' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function test() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>/test', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>/test\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/webhooks/{webhookId}/deliveries":{"get":{"description":"\nDelivery attempts to this endpoint, newest first, for the last 30 days: event id, status, attempts, last HTTP status and the next retry.\n\n**Retries:** after 5 min, 30 min, 2 h, 5 h, 10 h, then every 12 h, for up to 3 days. An endpoint that fails for 3 days is turned off and team managers get an email.\n\n**Rate limit:** 1x.\n    ","operationId":"OrganizationWebhooksApi_deliveries","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"webhookId","required":true,"in":"path","description":"Webhook endpoint id (24-character hex).","schema":{"example":"6721f0c4a1b2c3d4e5f60718","type":"string"}},{"name":"offset","required":false,"in":"query","description":"Items to skip. Prefer the `links.next` URL.","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListResponse"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No webhook endpoint with this id in the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List recent deliveries","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>/deliveries' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deliveries() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>/deliveries', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/webhooks/<WEBHOOKID>/deliveries\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/events":{"get":{"description":"\nEvery event of the last 30 days, oldest first, including ones that failed delivery. Use it to catch up after downtime. Same payloads as the webhook bodies. Events are recorded from the moment the organization has its first endpoint.\n\n**Try it:** `GET /v1/orgs/{organizationId}/events?since=2026-10-29T00:00:00Z`. Filter by `type` or `endUserId`; advance with `links.next`.\n\n**Rate limit:** 1x.\n    ","operationId":"OrganizationWebhooksApi_listEvents","parameters":[{"name":"organizationId","required":true,"in":"path","description":"Organization id (24-character hex).","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"offset","required":false,"in":"query","description":"Items to skip. Prefer the `links.next` URL.","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page. Defaults to 20, max 50.","schema":{"minimum":1,"maximum":50,"default":20,"example":20,"type":"number"}},{"name":"type","required":false,"in":"query","description":"Only this event type.","schema":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready"]}},{"name":"endUserId","required":false,"in":"query","description":"Only events of this end user (24-character hex `endUserId`).","schema":{"example":"6650aa000000000000000000","type":"string"}},{"name":"since","required":false,"in":"query","description":"Only events at or after this ISO 8601 time. The feed keeps 30 days.","schema":{"example":"2026-10-29T00:00:00Z","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventListResponse"}}}},"403":{"description":"The API key does not belong to this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Honor `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"List events (catch-up feed)","tags":["endusers-webhooks"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/events' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function listEvents() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/events', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/events\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/insights/digest":{"get":{"description":"\n## Daily Health & Fitness Digest\n\nReturns a personalized daily digest of insight pillars selected from: `health_pulse`, `training`, `recovery`, `movement`, `nutrition`, `body`. The exact set depends on which data sources the user has (wearable, workouts, nutrition logs) - typically 3-5 pillars. `health_pulse` is always first; `body` appears only when real body data exists.\n\nEvery day boundary (\"today\", streaks, calendar week, weekday patterns, cache key) is computed in the user's IANA `timeZone` (`PATCH /v1/me/profile`), falling back to the account UTC offset, then UTC. The zone used is echoed in `timeZone`.\n\n---\n\n### What is in the response\n\n| Block | Purpose |\n|-------|---------|\n| `pillars[]` | 3-5 cards. Each has `headline` (one fact, soft 90 chars, hard cap 160), `action` (verb-led, doable today), `status`, `confidence`, pillar metrics, optional `insights[]` (max 3 signals), `why[]` (max 3 reasons) and `trend7d` (7-day sparkline) |\n| `highlights[]` | Priority-sorted feed of detected signals across pillars (max 8): celebrations, act-now nudges, trends, CTAs, AI-proposed patterns |\n| `todaysFocus` | The single most important action for today (named workout / duration when available) |\n| `readiness` | Today-screen hero: `band` (push / maintain / recover), `recommendedIntensity`, `message`, up to 3 `contributors` |\n| `week` | Header chip: completed / planned for the user-local Monday-based week, `status`, `daysRemaining`, `weeklyStreakWeeks` |\n| `variant` | `daily`; `week_ahead` on the user's Monday; `week_review` on Sunday (same schema, different emphasis) |\n| `shareText` | One shareable line (top celebration or the Sunday review). Absent when nothing is worth sharing |\n| `dataCompleteness` / `dataProfile` | 0-1 completeness, weighted per profile (`wearable` vs `workout_only`) so app-only users are not penalized for lacking a device |\n| `locale` / `timeZone` | Language the copy was written in (profile preferred language) and the zone used for day math |\n\n---\n\n### Signals (`highlights` and per-pillar `insights`)\n\nDeterministic detectors (`source: \"deterministic\"`) run over 90 days of workouts, wearable metrics, strength logs and nutrition; up to 2 AI-proposed `ai_pattern` entries (`source: \"ai\"`) may be added - phrase those softly in UI. Each signal carries `kind`, `pillar`, `priority` (1 = highest), `label`, optional `detail`, `celebration`, `isNewToday` and a stable `copyKey`.\n\n**The `kind` enum is additive.** Render unknown kinds generically (label + detail, celebration badge when `celebration` is true) instead of dropping them. Current kinds: `personal_best`, `strength_pr`, `milestone`, `program_milestone`, `streak_at_risk`, `weekly_streak`, `recovery_debt`, `sleep`, `sleep_regularity`, `rhr_trend`, `hrv_trend`, `strain`, `steps`, `weight_trend`, `fitness_level`, `body_composition`, `pace`, `load`, `completion_depth`, `variety`, `progression`, `onboarding`, `rest_day`, `form`, `plan_adapted`, `activity_logged`, `activity_volume`, `day_of_week_pattern`, `time_of_day_pattern`, `adherence_trend`, `correlation`, `plateau`, `week_ahead`, `week_review`, `cta`, `ai_pattern`, `session_complete`, `slot_skipped`, `muscle_guard_recheck`, `strength_days`, `protein_target`, `weight_rate`, `low_energy_pattern`, `pain_flare`, `pain_dose_ok`, `pain_trend`, `pain_free_streak`, `rom_progress`, `reassess_due`.\n\nPersonal bests and milestones surface only on the day they happen; `streak_at_risk` and CTAs only on current-day digests; the nutrition CTA is capped to Mondays and Thursdays. A `cta` may appear both as a pillar `action` and in `insights[]` - render the action once.\n\n---\n\n### Status Indicators\n\n- **Green** (75-100): On track\n- **Yellow** (55-74): Watch it\n- **Red** (0-54): Priority action needed\n\n---\n\n### Fallback Behavior\n\nIf AI generation fails after one retry, a deterministic fallback digest is returned with `isFallback: true` on its pillars. It still contains `highlights`, `readiness`, `week` and per-pillar `insights` (signal detection does not depend on the model); copy stays in English. Without a wearable, Health Pulse is derived from workout adherence and Recovery from workout intensity; without nutrition logs the nutrition pillar carries a tracking CTA.\n\n---\n\n### Caching\n\nDigests are cached for the user-local calendar day (shared Redis, 24h TTL) and pre-warmed by the daily insights push. A cold miss is a AI generation (several seconds) - use a 30-45s client timeout and render skeletons. After a meaningful user action (workout completed, meal logged, wearable connected) call again with `forceRefresh=true`.\n\n---\n\n### Localization\n\n`headline`, `action`, `todaysFocus` and signal `label`/`detail` are written in the user's preferred language when generation succeeds (`locale`). Clients that keep their own copy tables should key them by `copyKey`, never by `label` text.\n\n---\n\n### Rate Limit\n\nThis endpoint counts as 10x API calls toward your hourly and daily limits.\n\n---\n\n### Related Endpoints\n\n- Pillar detail: `GET /v1/orgs/{organizationId}/endusers/{endUserId}/insights/pillars/{pillarType}`\n- Partner health data push: `POST /v1/orgs/{organizationId}/endusers/{endUserId}/insights/health-data`\n- Profile timezone / language: `PATCH /v1/me/profile`\n- Workout Sessions: `GET /v1/me/workouts/sessions`\n        ","operationId":"UserInsightsApi_getUserDailyDigest","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}},{"name":"date","required":false,"in":"query","description":"Date for the digest as an ISO 8601 date-time string (e.g. 2026-01-10T00:00:00.000Z). Past dates within last 7 days and today supported; future or older dates return 400. Defaults to today.","schema":{"example":"2026-01-10T00:00:00.000Z","type":"string"}},{"name":"forceRefresh","required":false,"in":"query","description":"Force refresh, bypassing cache.","schema":{"example":false,"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved daily digest.","schema":{"example":{"userId":"63415bf67a9c7000126616c1","organizationId":"63415bf67a9c7000126616c1","date":"2026-09-04T00:00:00.000Z","variant":"daily","locale":"en-US","timeZone":"Europe/Bucharest","dataProfile":"wearable","dataCompleteness":0.8,"todaysFocus":"Start Full Body Strength, 25 min.","readiness":{"band":"maintain","recommendedIntensity":"moderate","message":"Moderate effort today - HRV below baseline.","contributors":["HRV below baseline","Short night (5h 40m)"]},"week":{"completed":2,"planned":4,"status":"on_track","daysRemaining":3,"weeklyStreakWeeks":6},"shareText":"New best: Back Squat 95 kg x 3.","highlights":[{"id":"strength-pr-back-squat","kind":"strength_pr","pillar":"training","priority":1,"label":"New best: Back Squat 95 kg x 3.","detail":"Previous best 90 kg, est. max 104.5 kg","celebration":true,"isNewToday":true,"source":"deterministic","copyKey":"strength_pr.exercise"},{"id":"sleep-short","kind":"sleep","pillar":"recovery","priority":3,"label":"Short night: 5h 40m. Protect tonight.","detail":"1h 30m below your 7-night average","isNewToday":true,"source":"deterministic","copyKey":"sleep.short"},{"id":"weekly-streak","kind":"weekly_streak","pillar":"training","priority":5,"label":"6 weeks in a row with a workout.","source":"deterministic","copyKey":"weekly_streak.ongoing"}],"pillars":[{"type":"health_pulse","status":"green","headline":"82, up 5. Maintain today.","action":"Start Full Body Strength, 25 min.","confidence":0.85,"score":82,"delta":5,"deltaDirection":"up","driver":"sleep","trend7d":[74,77,null,79,80,77,82],"why":["HRV below baseline","Sleep score 82","Rest day yesterday"]},{"type":"training","status":"green","headline":"New best: Back Squat 95 kg x 3.","action":"Start Full Body Strength, 25 min.","confidence":0.8,"weeklyCompletions":2,"streak":3,"formScore":78,"formTrend":"improving","insights":[{"id":"strength-pr-back-squat","kind":"strength_pr","pillar":"training","priority":1,"label":"New best: Back Squat 95 kg x 3.","celebration":true,"isNewToday":true,"source":"deterministic","copyKey":"strength_pr.exercise"}],"why":["2/4 this week. On pace.","6 weeks in a row with a workout"]},{"type":"recovery","status":"yellow","headline":"5h 40m of sleep. Keep it moderate.","action":"Lights out by 22:30 tonight.","confidence":0.7,"insights":[{"id":"sleep-short","kind":"sleep","pillar":"recovery","priority":3,"label":"Short night: 5h 40m. Protect tonight.","detail":"1h 30m below your 7-night average","isNewToday":true,"source":"deterministic","copyKey":"sleep.short"}],"trend7d":[72,70,81,null,74,66,68],"why":["HRV below baseline","Short night (5h 40m)"]},{"type":"movement","status":"yellow","headline":"4,200 steps, half your usual.","action":"Walk 15 min after lunch.","confidence":0.65,"score":45,"delta":-5,"deltaDirection":"down","trend7d":[8400,7900,9100,null,8200,7600,4200],"why":["4,200 steps vs 8,100 usual","120 of 150 active minutes this week"]},{"type":"nutrition","status":"yellow","headline":"No meals logged yet.","action":"Snap one meal today.","confidence":0.5,"isFallback":true,"insights":[{"id":"cta-nutrition-tracking","kind":"cta","pillar":"nutrition","priority":6,"label":"Snap one meal today.","source":"deterministic","copyKey":"cta.nutrition_tracking"}]}],"generatedAt":"2026-09-04T05:30:00.000Z"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDigestResponse"}}}},"400":{"description":"Invalid date (e.g., future date, more than 7 days in past, or invalid format).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User or organization not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get daily AI-powered user insights digest","tags":["endusers-ai-insights"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/digest' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getUserDailyDigest() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/digest', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/digest\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/insights/pillars/{pillarType}":{"get":{"description":"\n## Pillar Detail\n\nReturns one pillar from the user's cached daily digest, expanded with every metric and coaching field the pillar has data for. Call it lazily on tap; it is served from the same cached digest as `GET .../insights/digest` (a cold miss generates the digest first).\n\n---\n\n### Available Pillar Types\n\n| Type | Details Included |\n|------|------------------|\n| `health_pulse` | Score, delta, driver, readiness band + message + intensity, HRV band, workout streak, 7-day trend, why |\n| `training` | Last workout, next session, best lever, form score / cue / suggestion / rep accuracy, risk level + triggers + alternatives, pacing (status, message, planned / completed, program week), descriptive load band, weekly streak, strength bests, why |\n| `recovery` | Sleep score, duration, efficiency, deep / REM minutes, resting HR, main issue, yesterday's intensity, readiness band + message + intensity, HRV band, 7-day trend, why |\n| `movement` | Activity level, suggested minutes, cardio trend, steps today, 7-day average steps, weekly moderate + vigorous minutes, 7-day trend, why |\n| `nutrition` | Nutrition score, calories and macros, meals logged, per-meal breakdown (photo logs include a description), win / watch, 7-day trend, why |\n| `body` | Body score, weekly trend, workout streak, biggest lever, latest weight, 4-week weight change, resting HR, 7-day trend, why |\n\nEvery pillar may also carry `insights[]` (max 3 signals homed on it), `personalBests`, `streaks` and `milestones` (notability-gated: absent means nothing notable, not no data).\n\n---\n\n### Coaching fields\n\n**Readiness (`health_pulse`, `recovery`):** `readinessBand` (`push` | `maintain` | `recover`), `readinessMessage`, `recommendedIntensity` (`light` | `moderate` | `high`), `hrvBand` (`low` | `normal` | `high`). HRV leads, then sleep score, sleep duration (under 6h moves the band down one step), yesterday's intensity, RPE, completion rate. The digest-level `readiness` object is the same call.\n\n**Risk (`training`):** `riskLevel` (`low` | `moderate` | `high`) with up to 3 `riskTriggers` and up to 2 `alternativeActions`. Two or more triggers flag risk. `loadBand` (`light` | `steady` | `heavy`, weekly load vs the 4-week average) is descriptive and only reinforces risk when another trigger already fired - it is never an injury-risk score on its own.\n\n**Form (`training`):** `formCue`, `formSuggestion` (when declining), `repAccuracy` from AI assessments.\n\n**Pacing (`training`):** `pacingStatus` (`on_track` | `behind` | `ahead`), `pacingMessage` (e.g. `3/4 this week. On pace.`, `1 behind this week. 3 days left.`), `workoutsPlannedThisWeek` / `workoutsCompletedThisWeek` on the user-local Monday-based week, `currentWeek` / `totalWeeks` when a program is active, `weeklyStreakWeeks` from 2 weeks.\n\n**Strength (`training`):** `strengthBests` - up to 5 exercises with best weight x reps over 90 days (kg-normalized) and an Epley `estimated1RmKg` for sets of 1-10 reps.\n\n**Why:** `why` - up to 3 reasons behind the headline / action, numbers first, decisive fact first. Present on every pillar when data allows.\n\n**Trend:** `trend7d` - last 7 local days of the pillar's primary metric, oldest first, `null` for missing days (not on `training`).\n\n---\n\n### Rate Limit\n\nThis endpoint counts as 10x API calls toward your hourly and daily limits.\n        ","operationId":"UserInsightsApi_getPillarDetail","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier (24-character hex string) of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier: the 24-character hex user id (preferred), externalUUID, or email. An email in the path appears in access logs.","schema":{"example":"6821e6ad9d20276ef3c3c9ec","type":"string"}},{"name":"pillarType","required":true,"in":"path","description":"Type of pillar to get details for.","schema":{"enum":["health_pulse","training","recovery","movement","nutrition","body"],"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved pillar details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PillarDetailResponse"}}}},"400":{"description":"Invalid pillar type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User, organization, or pillar not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get detailed view of a specific insight pillar","tags":["endusers-ai-insights"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/pillars/<PILLARTYPE>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getPillarDetail() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/pillars/<PILLARTYPE>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/pillars/<PILLARTYPE>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/nutrition/photo-log":{"post":{"description":"\n## Photo Food Logging - Analyze\n\nUploads a meal photo and runs vision AI analysis. Returns a pending estimate (per-item food breakdown + macro totals) with a `pendingLogId`.\n\nNothing is logged at this step. Show the estimate to the user, then call the **Confirm** endpoint. The pending estimate expires after **1 hour** and is single-use. The photo is processed in memory and **never stored**.\n\nConfirmed entries feed the same nutrition data as `POST /v1/me/nutrition/log` and chat logging: day totals, nutrition score, daily digest, and the nutrition insight pillar.\n\n**Rate limit:** Counts as 10x API calls toward your hourly and daily limits.","operationId":"OrganizationEndUserNutritionApi_analyzeNutritionPhoto","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier. Can be email, externalUUID, or internal user ID.","schema":{"example":"john.doe@acme.com","type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["photo"],"properties":{"photo":{"type":"string","format":"binary","description":"Meal photo (JPEG, PNG, or WebP; max 10 MB)"},"date":{"type":"string","example":"2026-06-12","description":"Log date (YYYY-MM-DD); today or up to 7 days in the past; defaults to today"},"hint":{"type":"string","example":"half portion, no dressing","description":"Optional context about the meal (max 200 chars)"}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeNutritionPhotoResponse"}}}},"400":{"description":"Missing/invalid photo, invalid date, or the photo does not contain food","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Vision analysis unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Analyze a meal photo for nutrition logging","tags":["endusers-nutrition"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/photo-log' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function analyzeNutritionPhoto() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/photo-log', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/photo-log\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/nutrition/photo-log/{pendingLogId}/confirm":{"post":{"description":"\n## Photo Food Logging - Confirm\n\nConfirms a pending estimate created by the analyze endpoint and writes the nutrition entry through the same pipeline as manual and chat logging (day totals summed, nutrition score recomputed, meal description and item breakdown persisted).\n\nOptionally accepts corrected `totals` if the user adjusted the estimate. Single-use: a pending log cannot be confirmed twice; expired pending logs return 400.","operationId":"OrganizationEndUserNutritionApi_confirmNutritionPhotoLog","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier. Can be email, externalUUID, or internal user ID.","schema":{"example":"john.doe@acme.com","type":"string"}},{"name":"pendingLogId","required":true,"in":"path","description":"The pending photo log id returned by the analyze endpoint.","schema":{"example":"665f1b2a9c7000126616c1aa","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmNutritionPhotoLogBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmNutritionPhotoLogResponse"}}}},"400":{"description":"Pending photo log has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Pending photo log not found or already used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Confirm a pending photo nutrition log","tags":["endusers-nutrition"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/photo-log/<PENDINGLOGID>/confirm' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function confirmNutritionPhotoLog() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/photo-log/<PENDINGLOGID>/confirm', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/photo-log/<PENDINGLOGID>/confirm\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/nutrition/log":{"post":{"description":"\n## Direct Nutrition Logging\n\nLogs a nutrition entry (calories and/or macros) for the user through the same pipeline as `POST /v1/me/nutrition/log`, photo logging, and chat logging: values are added to the day's running totals, the nutrition score is recomputed, and the data feeds the daily digest and the nutrition insight pillar.\n\nAt least one of `caloriesKcal`, `proteinG`, `carbsG`, `fatG` is required.\n\n**Idempotency / corrections:** pass a stable `externalId` per meal. Re-posting the same `externalId` replaces the previous contribution instead of adding a duplicate (safe to retry, also handles date corrections), and enables `DELETE .../nutrition/log/{externalId}`. Without an `externalId` every call is additive.","operationId":"OrganizationEndUserNutritionApi_logNutrition","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier. Can be email, externalUUID, or internal user ID.","schema":{"example":"john.doe@acme.com","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationLogNutritionBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationLogNutritionResponse"}}}},"400":{"description":"No nutrition values provided or invalid date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Log nutrition for an end user","tags":["endusers-nutrition"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/log' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function logNutrition() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/log', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/log\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/nutrition/log/{externalId}":{"delete":{"description":"\n## Nutrition Log Correction\n\nDeletes a nutrition entry previously logged with an `externalId`, subtracting its values from the day's totals (floored at 0) and recomputing the nutrition score.\n\nOnly entries created with an `externalId` can be deleted this way.","operationId":"OrganizationEndUserNutritionApi_deleteNutritionLog","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier. Can be email, externalUUID, or internal user ID.","schema":{"example":"john.doe@acme.com","type":"string"}},{"name":"externalId","required":true,"in":"path","description":"The externalId the nutrition log entry was created with.","schema":{"example":"partner-meal-5521","type":"string"}}],"responses":{"204":{"description":"Entry deleted and day totals recomputed"},"401":{"description":"Authentication failed - API key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User, organization, or nutrition entry not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete a logged nutrition entry","tags":["endusers-nutrition"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/log/<EXTERNALID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deleteNutritionLog() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/log/<EXTERNALID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/nutrition/log/<EXTERNALID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/insights/health-data":{"post":{"description":"\n## Health Data Ingestion\n\nPushes health data for an end user into the same pipeline that powers wearable (ROOK) syncing - the data feeds daily metrics, AI insights (digest and pillars), and chat context.\n\nSupported `dataType`s per entry:\n\n| dataType | What it feeds | Key fields |\n|---|---|---|\n| `activity` | Discrete activity sessions (workout-overlap reconciliation + daily activity rollup) | `externalId` (required), `startAt` (required), `activityType`, duration/distance/HR/pace/speed/cadence/elevation/swim fields |\n| `sleep` | Sleep score and sleep HR/HRV fields | `sleepScore` or `sleepEfficiency`, `hrvRmssd`, `hrvSdnn`, `hrAvg`, `hrResting`, `hrMax`, `hrMin` |\n| `steps` | Stored per-entry (ledger) | `steps` (required) |\n| `body_metrics` | Body score (derived from BMI or weight/height) | `weightKg`, `heightCm`, `bmi` |\n| `heart_rate` | Day HR/HRV fields | `hrvRmssd`, `hrvSdnn`, `hrAvg`, `hrResting`, `hrMax`, `hrMin` |\n| `hydration` | Stored per-entry (ledger) | `waterIntakeMl` (required) |\n| `oxygenation` | Stored per-entry (ledger) | `spo2AvgPct` (required) |\n| `scores` | Partner-computed 0-100 scores (overall/physical/sleep/body/nutrition) | at least one score field |\n\n`activityType` is a free-form label. Common values: Running, Cycling, Walking, Swimming, Hiking, Yoga, Strength Training, HIIT, Rowing. Include swim fields only for swimming sessions.\n\n**Try it:** pick an Example from the request body dropdown (full day, mixed activities, day vitals, etc.).\n\n**Idempotency:** each entry carries an `externalId` (required for `activity`, defaults to a per-day key for the other types). Re-posting the same `(dataType, externalId)` updates the existing record instead of duplicating it - safe to retry.\n\n**Batch semantics:** up to 50 entries per request, processed independently and in order. The response always returns 200 with a per-entry `results` array (`created` / `updated` / `rejected` + reason) and a summary - check it instead of relying on the HTTP status.\n\n**Merge semantics:** an explicit write wins - fields claimed by your entries overwrite the stored day value (including wearable-synced values); deleting an entry releases the claim. Backfill window: up to 90 days in the past, never in the future.\n\n**Rate limit:** the request counts as 1 API call regardless of batch size.\n\n**Related:** `DELETE .../insights/health-data/{dataType}/{externalId}`, `POST .../nutrition/log`, `GET .../insights/digest`, `GET .../insights/pillars/{pillarType}`.","operationId":"OrganizationEndUserHealthDataApi_logHealthData","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier. Can be email, externalUUID, or internal user ID.","schema":{"example":"john.doe@acme.com","type":"string"}}],"requestBody":{"required":true,"description":"Batch of health data entries (max 50). Use the examples dropdown for a full day, activity variants, day vitals, scores, or an idempotent correction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogHealthDataBody"},"examples":{"full-day-batch":{"summary":"Full day - all dataTypes","description":"One entry per supported dataType for a typical day. Day-scoped types omit externalId (defaults to day-YYYY-MM-DD). Activity requires externalId.","value":{"entries":[{"dataType":"activity","externalId":"run-8842","source":"AcmeHealthApp","activityType":"Running","startAt":"2026-08-05T07:30:00.000Z","endAt":"2026-08-05T08:15:00.000Z","durationSeconds":2700,"distanceMeters":8200,"steps":7900,"activeCaloriesKcal":512,"hrAvg":148,"hrMax":176,"paceAvgMinPerKm":5.5},{"dataType":"sleep","recordedAt":"2026-08-05T08:00:00.000Z","source":"AcmeHealthApp","sleepScore":82,"sleepEfficiency":91,"hrvRmssd":46,"hrvSdnn":52,"hrAvg":54,"hrResting":52,"hrMax":74,"hrMin":47},{"dataType":"steps","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","steps":10412},{"dataType":"body_metrics","recordedAt":"2026-08-05T07:00:00.000Z","source":"AcmeHealthApp","weightKg":78.4,"heightCm":181},{"dataType":"heart_rate","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","hrvRmssd":44,"hrvSdnn":49,"hrAvg":64,"hrResting":55,"hrMax":132,"hrMin":48},{"dataType":"hydration","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","waterIntakeMl":2100},{"dataType":"oxygenation","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","spo2AvgPct":97},{"dataType":"scores","recordedAt":"2026-08-05T22:00:00.000Z","source":"AcmeHealthApp","overallHealthScore":79,"physicalScore":74,"sleepScore":85,"bodyScore":81,"nutritionScore":68}]}},"activities-mixed":{"summary":"Activities - run, ride, swim","description":"Three activity sessions showing field families: pace/distance for running, speed/cadence/elevation for cycling, swim-* fields for pool swimming.","value":{"entries":[{"dataType":"activity","externalId":"run-8842","source":"AcmeHealthApp","activityType":"Running","startAt":"2026-08-05T07:30:00.000Z","endAt":"2026-08-05T08:15:00.000Z","durationSeconds":2700,"distanceMeters":8200,"steps":7900,"activeCaloriesKcal":512,"hrAvg":148,"hrMax":176,"paceAvgMinPerKm":5.5,"paceMaxMinPerKm":4.9},{"dataType":"activity","externalId":"ride-3310","source":"AcmeHealthApp","activityType":"Cycling","startAt":"2026-08-05T17:00:00.000Z","endAt":"2026-08-05T18:10:00.000Z","durationSeconds":4200,"distanceMeters":28500,"activeCaloriesKcal":640,"hrAvg":136,"hrMax":168,"speedAvgMps":6.8,"speedMaxMps":12.1,"cadenceAvgRpm":86,"cadenceMaxRpm":102,"elevationGainMeters":220,"elevationLossMeters":195},{"dataType":"activity","externalId":"swim-2201","source":"AcmeHealthApp","activityType":"Swimming","startAt":"2026-08-05T18:30:00.000Z","endAt":"2026-08-05T19:15:00.000Z","durationSeconds":2700,"activeCaloriesKcal":380,"hrAvg":132,"hrMax":158,"swimDistanceMeters":1500,"swimLaps":30,"swimStrokes":620,"poolLengthMeters":25}]}},"activity-strength":{"summary":"Activity - strength / HIIT","description":"Indoor strength or HIIT session: duration, calories, HR, and intensity seconds. No distance, pace, or swim fields.","value":{"entries":[{"dataType":"activity","externalId":"strength-1104","source":"AcmeHealthApp","activityType":"Strength Training","startAt":"2026-08-05T12:00:00.000Z","endAt":"2026-08-05T12:45:00.000Z","durationSeconds":2700,"activeCaloriesKcal":290,"hrAvg":118,"hrMax":162,"hrMin":88,"lowIntensitySeconds":600,"moderateIntensitySeconds":1200,"vigorousIntensitySeconds":900}]}},"day-vitals":{"summary":"Day vitals - sleep, HR, steps, hydration, SpO2","description":"Day-scoped vitals without activities or partner scores.","value":{"entries":[{"dataType":"sleep","recordedAt":"2026-08-05T08:00:00.000Z","source":"AcmeHealthApp","sleepScore":82,"sleepEfficiency":91,"hrvRmssd":46,"hrvSdnn":52,"hrAvg":54,"hrResting":52,"hrMax":74,"hrMin":47},{"dataType":"heart_rate","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","hrvRmssd":44,"hrvSdnn":49,"hrAvg":64,"hrResting":55,"hrMax":132,"hrMin":48},{"dataType":"steps","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","steps":10412},{"dataType":"hydration","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","waterIntakeMl":2100},{"dataType":"oxygenation","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","spo2AvgPct":97}]}},"body-and-scores":{"summary":"Body metrics and partner scores","description":"Body metrics derive bodyScore from BMI/weight/height. Scores entry pushes partner-computed 0-100 pillar scores.","value":{"entries":[{"dataType":"body_metrics","recordedAt":"2026-08-05T07:00:00.000Z","source":"AcmeHealthApp","weightKg":78.4,"heightCm":181,"bmi":23.9},{"dataType":"scores","recordedAt":"2026-08-05T22:00:00.000Z","source":"AcmeHealthApp","overallHealthScore":79,"physicalScore":74,"sleepScore":85,"bodyScore":81,"nutritionScore":68}]}},"idempotent-correction":{"summary":"Idempotent correction (re-POST)","description":"Re-posting the same (dataType, externalId) updates the existing record (status: updated). Safe for retries and corrections.","value":{"entries":[{"dataType":"activity","externalId":"run-8842","source":"AcmeHealthApp","activityType":"Running","startAt":"2026-08-05T07:30:00.000Z","endAt":"2026-08-05T08:20:00.000Z","durationSeconds":3000,"distanceMeters":8500,"steps":8200,"activeCaloriesKcal":540,"hrAvg":150,"hrMax":178,"paceAvgMinPerKm":5.4},{"dataType":"sleep","externalId":"day-2026-08-05","recordedAt":"2026-08-05T08:00:00.000Z","source":"AcmeHealthApp","sleepScore":88,"hrvRmssd":50,"hrResting":50}]}}}}}},"responses":{"200":{"description":"Batch processed; check per-entry results for partial failures","schema":{"example":{"data":{"results":[{"index":0,"dataType":"activity","externalId":"run-8842","status":"created"},{"index":1,"dataType":"sleep","externalId":"day-2026-08-05","status":"created"},{"index":2,"dataType":"steps","externalId":"day-2026-08-05","status":"updated"},{"index":3,"dataType":"hydration","externalId":null,"status":"rejected","reason":"Entry timestamp cannot be in the future"}],"summary":{"total":4,"succeeded":3,"failed":1}}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogHealthDataResponse"}}}},"400":{"description":"Malformed request body (invalid entry shape, unknown dataType, batch size exceeded)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Push health data for an end user (batch)","tags":["endusers-ai-insights"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/health-data' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function logHealthData() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/health-data', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/health-data\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/endusers/{endUserId}/insights/health-data/{dataType}/{externalId}":{"delete":{"description":"\n## Health Data Correction\n\nDeletes a previously pushed entry by `(dataType, externalId)` and recomputes the affected day from the remaining entries.\n\n- `activity`: removes the activity session and recomputes the day's activity rollup. Only API-pushed activities can be deleted (wearable-synced sessions are protected).\n- Day-scoped types: releases the entry's field claims - fields are recomputed from your remaining entries for that day, or reset when nothing claims them anymore (a later wearable sync restores wearable-sourced values).\n\nFor entries posted without an `externalId`, use the day-derived default key `day-YYYY-MM-DD`.\n\nTo correct a value instead of removing it, simply re-POST the entry with the same `externalId` - the write is an idempotent upsert.","operationId":"OrganizationEndUserHealthDataApi_deleteHealthDataEntry","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"endUserId","required":true,"in":"path","description":"The user identifier. Can be email, externalUUID, or internal user ID.","schema":{"example":"john.doe@acme.com","type":"string"}},{"name":"dataType","required":true,"in":"path","description":"Data type of the entry to delete.","schema":{"example":"activity","type":"string","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"]}},{"name":"externalId","required":true,"in":"path","description":"The externalId the entry was created with (or the day-derived default \"day-YYYY-MM-DD\").","schema":{"example":"partner-activity-8842","type":"string"}}],"responses":{"204":{"description":"Entry deleted and day recomputed"},"400":{"description":"Invalid dataType, or the entry is not API-pushed (wearable-synced activities cannot be deleted)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User, organization, or health data entry not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Delete a pushed health data entry","tags":["endusers-ai-insights"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/health-data/<DATATYPE>/<EXTERNALID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function deleteHealthDataEntry() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/health-data/<DATATYPE>/<EXTERNALID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/endusers/<END_USER_ID>/insights/health-data/<DATATYPE>/<EXTERNALID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/orgs/{organizationId}/stats":{"get":{"description":"\n## Organization API usage statistics\n\nReturns current-hour and daily request counts plus your subscription hourly/daily rate limits for this organization.\n\nAI and heavy-video endpoints (recommend, generate, adapt, insights, chat, full video export, etc.) count as **10x** toward those limits. Prefer caching generated plan/workout ids rather than regenerating on every page load. Plan quotas and packs: [hyperhuman.cc/pricing](https://hyperhuman.cc/pricing).\n\n**Related:** `GET /v1/orgs/{orgId}/metadata`, `GET /v1/orgs/{orgId}/workouts`, `GET /v1/orgs/{orgId}/plans`.\n        ","operationId":"OrganizationStatsApi_getOrganizationStats","parameters":[{"name":"organizationId","required":true,"in":"path","description":"The unique identifier of the organization.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}}],"responses":{"200":{"description":"Successfully retrieved organization API usage statistics.","schema":{"example":{"organizationId":"63415bf67a9c7000126616c1","organizationName":"My Fitness Company","currentStats":{"currentHour":"2023-11-06T14:00:00Z","currentHourRequests":45,"totalDayRequests":234,"currentDate":"2023-11-06"},"rateLimits":{"hourly":1000,"daily":15000},"timestamp":"2023-11-06T14:30:00Z"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationStatsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get organization API usage statistics","tags":["organization"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/stats' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getOrganizationStats() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/stats', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/orgs/<ORGANIZATION_ID>/stats\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/chat/conversations":{"post":{"description":"\n## Start Conversation\n\nCreates a new conversation with the AI fitness coach and returns the assistant's response to the initial message.\n\n---\n\n### User Identification\n\nProvide at least one of `userEmail` or `userExternalUUID` in the request body to identify the end user.\n\n---\n\n### Organization ID\n\n- Use `\"default\"` to automatically resolve the organization from the API key\n- Or provide a valid 24-character hex organization id\n\n---\n\n### Response\n\nReturns the created conversation metadata and the AI assistant's first response message. The assistant message may include `metadata.contentPreview` (workouts, programs, exercises) or `metadata.pendingAction` when the AI proposes a state-changing action.\n\n---\n\n### Pending Actions\n\nWhen the AI proposes a state-changing action (e.g. log nutrition, add workouts, generate workout), the assistant message will include `metadata.pendingAction` with an `id`, `type`, `summary`, and `payload`. Use the Confirm Action endpoint to execute it.\n\n---\n\n### Rate Limit\n\nThis endpoint counts as 10x API calls toward your hourly and daily limits.\n\n---\n\n### Related Endpoints\n\n- `POST /v1/chat/conversations/{conversationId}/messages` - Send follow-up messages\n- `GET /v1/chat/conversations` - List user conversations\n- `POST /v1/chat/conversations/{conversationId}/actions/confirm` - Confirm a pending action\n        ","operationId":"ChatApi_startConversation","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartConversationBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatConversationResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user not found in this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Start a new chat conversation","tags":["endusers-ai-chat"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/chat/conversations' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function startConversation() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/chat/conversations', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/chat/conversations\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]},"get":{"description":"\n## List Conversations\n\nReturns a paginated list of the end user's chat conversations, ordered by most recent activity.\n\n**Required query params:** `organizationId` (24-character hex, or the literal `default` for a team-scoped key) **and** one of `userEmail` or `userExternalUUID`. A bare `GET /v1/chat/conversations` with no query string returns **400**.\n\n**Try it:** `GET /v1/chat/conversations?organizationId={organizationId}&userEmail=user@example.com&limit=20` with header `X-Api-Key`.\n\nThis list is **1x** rate-limit weight. Starting a conversation or sending a message is **10x**.\n\n---\n\n### Pagination\n\nThis route uses `page` / `limit` (not `offset` / `links.next`).\n\n| Parameter | Default | Max |\n|-----------|---------|-----|\n| `page` | 1 | - |\n| `limit` | 20 | 100 |\n\n---\n\n### Related Endpoints\n\n- `POST /v1/chat/conversations` - Start a new conversation\n- `GET /v1/chat/conversations/{conversationId}/messages` - Get messages in a conversation\n- `DELETE /v1/chat/conversations/{conversationId}` - Archive a conversation\n        ","operationId":"ChatApi_getConversations","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization id (required). Prefer the 24-character hex id from Settings → Integrations. The literal `default` resolves to the API key's team organization (team-scoped keys). Club or standard keys without a team must send the hex id.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"userEmail","required":false,"in":"query","description":"End-user email. Provide this **or** `userExternalUUID` (at least one is required). Sending neither returns 400.","schema":{"example":"user@example.com","type":"string"}},{"name":"userExternalUUID","required":false,"in":"query","description":"External unique identifier for the end user. Provide this **or** `userEmail` (at least one is required). Sending neither returns 400.","schema":{"example":"user-12345","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatConversationsResponse"}}}},"400":{"description":"Missing `organizationId`, or neither `userEmail` nor `userExternalUUID` was sent. Field validation uses `error.code` `ValidationError`; a missing user identifier after a valid org id uses `BadRequest`.","schema":{"example":{"error":{"code":"ValidationError","message":"ValidationError","target":"GetConversationsQuery","details":[{"code":"ConstraintError","message":"organizationId must be a valid 24-character hex id or \"default\"","target":"organizationId"}]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user not found in this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get user conversations","tags":["endusers-ai-chat"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/chat/conversations?organizationId=63415bf67a9c7000126616c1' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getConversations() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/chat/conversations?organizationId=63415bf67a9c7000126616c1', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/chat/conversations?organizationId=63415bf67a9c7000126616c1\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/chat/conversations/{conversationId}/messages":{"get":{"description":"\n## Get Messages\n\nReturns a paginated list of messages in a conversation, ordered chronologically.\n\n---\n\n### User Identification\n\nProvide at least one of `userEmail` or `userExternalUUID` as query parameters to identify the end user. The user must be the owner of the conversation.\n\n---\n\n### Message Structure\n\nEach message includes:\n- `role`: `\"user\"` or `\"assistant\"`\n- `content`: The message text\n- `status`: `\"pending\"`, `\"delivered\"`, or `\"failed\"`\n- `metadata`: Optional object containing `reasoning`, `topics`, `contentPreview`, `pendingAction`, or `confirmedResult`\n\n---\n\n### Pagination\n\n| Parameter | Default | Max |\n|-----------|---------|-----|\n| `page` | 1 | - |\n| `limit` | 50 | 100 |\n\n---\n\n### Related Endpoints\n\n- `POST /v1/chat/conversations/{conversationId}/messages` - Send a new message\n- `GET /v1/chat/conversations` - List conversations\n        ","operationId":"ChatApi_getConversationMessages","parameters":[{"name":"conversationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization id (required). Prefer the 24-character hex id from Settings → Integrations. The literal `default` resolves to the API key's team organization (team-scoped keys). Club or standard keys without a team must send the hex id.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":50,"type":"number"}},{"name":"userEmail","required":false,"in":"query","description":"End-user email. Provide this **or** `userExternalUUID` (at least one is required). Sending neither returns 400.","schema":{"example":"user@example.com","type":"string"}},{"name":"userExternalUUID","required":false,"in":"query","description":"External unique identifier for the end user. Provide this **or** `userEmail` (at least one is required). Sending neither returns 400.","schema":{"example":"user-12345","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user or conversation not found in this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Get conversation messages","tags":["endusers-ai-chat"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/messages?organizationId=63415bf67a9c7000126616c1' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getConversationMessages() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/messages?organizationId=63415bf67a9c7000126616c1', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/messages?organizationId=63415bf67a9c7000126616c1\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"post":{"description":"\n## Send Message\n\nSends a user message to an existing conversation and returns the AI coach's response.\n\n---\n\n### User Identification\n\nProvide at least one of `userEmail` or `userExternalUUID` in the request body to identify the end user. The user must be the owner of the conversation.\n\n---\n\n### Response\n\nReturns three objects:\n- `userMessage` - The saved user message\n- `assistantMessage` - The AI coach response\n- `conversation` - Updated conversation metadata (messageCount, lastMessageAt)\n\n---\n\n### AI Capabilities\n\nThe AI coach can:\n- List, search, and recommend workouts, programs, and exercises (returned in `metadata.contentPreview`)\n- Propose state-changing actions like logging nutrition, adding/assigning workouts and plans, adapting or generating workouts and programs (returned in `metadata.pendingAction`)\n- Provide personalized advice based on user profile, training history, and goals\n\n---\n\n### Rate Limit\n\nThis endpoint counts as 10x API calls toward your hourly and daily limits.\n\n---\n\n### Related Endpoints\n\n- `POST /v1/chat/conversations` - Start a new conversation\n- `POST /v1/chat/conversations/{conversationId}/actions/confirm` - Confirm a pending action\n- `GET /v1/chat/conversations/{conversationId}/messages` - Get message history\n        ","operationId":"ChatApi_sendMessage","parameters":[{"name":"conversationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Conversation not found or does not belong to the user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Send message to conversation","tags":["endusers-ai-chat"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/messages' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function sendMessage() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/messages', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/messages\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/chat/conversations/{conversationId}/actions/confirm":{"post":{"description":"\n## Confirm Action\n\nExecutes a pending action proposed by the AI coach after user confirmation.\n\n---\n\n### How It Works\n\n1. The AI proposes an action via `assistantMessage.metadata.pendingAction`\n2. Your client shows a confirmation UI with the action `summary`\n3. User confirms, and you call this endpoint with the `pendingActionId`\n4. The action is executed and the result is returned\n\n---\n\n### Supported Action Types\n\n| Type | Description | Response Field |\n|------|-------------|----------------|\n| `log_nutrition` | Log a meal or nutrition entry | `nutritionOverview` |\n| `add_workouts` | Add workouts to user's library | `message` |\n| `add_plans` | Add plans to user's library | `message` |\n| `assign_workouts` | Assign workouts to the user | `message` |\n| `assign_plans` | Assign plans to the user | `message` |\n| `adapt_workout` | Adapt a workout on the fly | `adaptedWorkout` |\n| `adapt_program` | Adapt a program on the fly | `adaptedProgram` |\n| `generate_workout` | Generate a new workout | `generatedWorkout` |\n| `generate_program` | Generate a new program | `generatedProgram` |\n\n---\n\n### Adapted/Generated Content\n\n`adaptedWorkout` and `generatedWorkout` use the same response format as `POST /v1/orgs/{orgId}/workouts/{id}/adapt` and `POST /v1/orgs/{orgId}/workouts/generate` respectively. Same applies to program equivalents. Clients can reuse the same types and rendering logic.\n\n---\n\n### Related Endpoints\n\n- `POST /v1/chat/conversations/{conversationId}/messages` - Send a message (may return pendingAction)\n- `POST /v1/chat/conversations` - Start a conversation (may return pendingAction)\n        ","operationId":"ChatApi_confirmAction","parameters":[{"name":"conversationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmActionBody"}}}},"responses":{"200":{"description":"Action executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmActionResponseDto"}}}},"400":{"description":"Action expired or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Pending action not found or already used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Confirm a pending AI action","tags":["endusers-ai-chat"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/actions/confirm' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function confirmAction() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/actions/confirm', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>/actions/confirm\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/chat/conversations/{conversationId}":{"delete":{"description":"\n## Archive Conversation\n\nSoft-deletes a conversation by setting its status to `archived`. The conversation and its messages are retained in the database but will no longer appear in the conversations list.\n\n---\n\n### User Identification\n\nProvide at least one of `userEmail` or `userExternalUUID` as query parameters to identify the end user. The user must be the owner of the conversation.\n\n---\n\n### Related Endpoints\n\n- `GET /v1/chat/conversations` - List active conversations\n- `GET /v1/chat/conversations/{conversationId}/messages` - Get messages before archiving\n        ","operationId":"ChatApi_archiveConversation","parameters":[{"name":"conversationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization id (required). Prefer the 24-character hex id from Settings → Integrations. The literal `default` resolves to the API key's team organization (team-scoped keys). Club or standard keys without a team must send the hex id.","schema":{"example":"63415bf67a9c7000126616c1","type":"string"}},{"name":"userEmail","required":false,"in":"query","description":"End-user email. Provide this **or** `userExternalUUID` (at least one is required). Sending neither returns 400.","schema":{"example":"user@example.com","type":"string"}},{"name":"userExternalUUID","required":false,"in":"query","description":"External unique identifier for the end user. Provide this **or** `userEmail` (at least one is required). Sending neither returns 400.","schema":{"example":"user-12345","type":"string"}}],"responses":{"200":{"description":"Conversation archived successfully."},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed - API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"End user or conversation not found in this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"X-Api-Key":["X-Api-Key"]}],"summary":"Archive conversation","tags":["endusers-ai-chat"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>?organizationId=63415bf67a9c7000126616c1' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function archiveConversation() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>?organizationId=63415bf67a9c7000126616c1', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/chat/conversations/<CONVERSATIONID>?organizationId=63415bf67a9c7000126616c1\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/session":{"post":{"description":"\n## Create a pairing session\n\nCalled by the **display** (TV / big screen) to start a HyperCast session. Returns the 6-digit `pairingCode`, a `qrCodeData` URL for the QR, `expiresAt` (**80 minutes**), and Socket.IO connection info.\n\n**Partner controller apps do not call this.** The hosted member-web `https://member.hyperhuman.cc/cast?orgId=...` page owns session creation. Controllers join with `POST /v1/cast/pairing/join-by-code`.\n\n**Try it (minimal):** body `{ \"displayName\": \"Living Room TV\" }` with header `X-Api-Key`. Team-scoped keys default `organizationId` to their own organization; a mismatch returns `403`.\n\n**Shape:** `{ sessionId, pairingCode, qrCodeData, expiresAt, socketIO }`. `sessionId` is a 24-character hex string. `qrCodeData` is `https://member.hyperhuman.cc/cast?sessionId=...&code=...` — parse those query params for the QR-scan join path; do not hardcode the host.\n\n**Related:** `POST .../join-by-code`, `POST .../join`, `DELETE .../session/{sessionId}`.\n        ","operationId":"CastApi_createPairingSession","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePairingSessionDto"},"examples":{"minimal":{"summary":"Display name only","value":{"displayName":"Living Room TV"}},"withOrganization":{"summary":"Explicit organization","value":{"displayName":"Living Room TV","organizationId":"63415bf67a9c7000126616c1"}}}}}},"responses":{"201":{"description":"Session created.","schema":{"example":{"sessionId":"68d4f663bb28382457b3dc9d","pairingCode":"401305","qrCodeData":"https://member.hyperhuman.cc/cast?sessionId=68d4f663bb28382457b3dc9d&code=401305","expiresAt":"2026-08-27T09:29:31.680Z","socketIO":{"serverUrl":"https://content.api.hyperhuman.cc","namespace":"/cast/pairing","fullUrl":"https://content.api.hyperhuman.cc/cast/pairing"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePairingSessionResponse"}}}},"400":{"description":"Invalid body (unknown fields or validation).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Create a pairing session (display side)","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/session' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function createPairingSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/session', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/session\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/session/{sessionId}":{"get":{"description":"\n## Pairing session snapshot\n\nReturns the pairing code, display name, expiry, the connected controller (if any), and the currently loaded workout.\n\n**Try it:** `GET /v1/cast/pairing/session/{sessionId}` with header `X-Api-Key`.\n\n**Shape:** `{ sessionId, pairingCode, displayName, isActive, expiresAt, connectedDevice, currentWorkout }`. `connectedDevice` is a **single object or `null`** — not an array.\n\n**Related:** `POST .../join-by-code`, `GET .../{sessionId}/workout/status`.\n        ","operationId":"CastApi_getPairingSession","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"responses":{"200":{"description":"Session snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingSessionInfoResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found or inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get pairing session snapshot","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/cast/pairing/session/<SESSION_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getPairingSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/session/<SESSION_ID>', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/cast/pairing/session/<SESSION_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]},"delete":{"description":"\n## Terminate a pairing session\n\nEnds the session, disconnects the paired device, and releases the pairing code. Displays should call this on unmount instead of relying on the 80-minute expiry.\n\n**Partner controller apps do not call this** to unpair — use `POST .../{sessionId}/device/disconnect` so the TV session stays alive.\n\n**Related:** `POST .../session`, `POST .../{sessionId}/device/disconnect`.\n        ","operationId":"CastApi_terminatePairingSession","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"responses":{"200":{"description":"Session terminated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CastActionResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Terminate a pairing session (display side)","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X DELETE 'https://content.api.hyperhuman.cc/v1/cast/pairing/session/<SESSION_ID>' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function terminatePairingSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/session/<SESSION_ID>', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.delete(\"https://content.api.hyperhuman.cc/v1/cast/pairing/session/<SESSION_ID>\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/join":{"post":{"description":"\n## Join with sessionId + pairing code\n\nController path for the **QR scan** flow. The display QR encodes `https://member.hyperhuman.cc/cast?sessionId={sessionId}&code={pairingCode}`; parse both query values and join. Prefer `POST .../join-by-code` when the user types the 6-digit code.\n\nA team-scoped API key may only join sessions created for its own organization (mismatch → `403`).\n\nOnly one controller per session: joining disconnects any previously paired device.\n\n**Try it (minimal):** body `{ \"sessionId\": \"<from QR>\", \"pairingCode\": \"401305\", \"deviceInfo\": { \"deviceId\": \"device-xyz-123\", \"deviceName\": \"My App\", \"deviceType\": \"mobile\" } }` with header `X-Api-Key`. Generate your own opaque `deviceId` and reuse it on later calls.\n\n**Shape:** `{ success, sessionId, displayName, socketIO }`. Use `sessionId` on subsequent cast/control calls. `socketIO.fullUrl` is the optional realtime client URL — do not hardcode hosts.\n\n**Related:** `POST .../join-by-code`, `POST .../{sessionId}/workout`, `POST .../{sessionId}/device/disconnect`.\n        ","operationId":"CastApi_joinPairingSession","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinPairingSessionDto"},"examples":{"qrScan":{"summary":"QR scan (sessionId + code)","value":{"sessionId":"68d4f663bb28382457b3dc9d","pairingCode":"401305","deviceInfo":{"deviceId":"device-xyz-123","deviceName":"My App","deviceType":"mobile"}}}}}}},"responses":{"200":{"description":"Joined the session.","schema":{"example":{"success":true,"sessionId":"68d4f663bb28382457b3dc9d","displayName":"Living Room TV","socketIO":{"serverUrl":"https://content.api.hyperhuman.cc","namespace":"/cast/pairing","fullUrl":"https://content.api.hyperhuman.cc/cast/pairing"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinPairingSessionResponse"}}}},"400":{"description":"Invalid session, pairing code, or device payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this casting session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Join a pairing session (QR scan)","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/join' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function joinPairingSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/join', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/join\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/join-by-code":{"post":{"description":"\n## Join with the 6-digit code\n\nPrimary **controller** path: the user types the 6-digit code shown on the TV. A team-scoped API key may only join sessions created for its own organization (mismatch → `403`).\n\nOnly one controller per session: joining disconnects any previously paired device.\n\n**Try it (minimal):** body `{ \"pairingCode\": \"401305\", \"deviceInfo\": { \"deviceId\": \"device-xyz-123\", \"deviceName\": \"My App\", \"deviceType\": \"mobile\" } }` with header `X-Api-Key`. `pairingCode` must be exactly 6 digits. Generate your own opaque `deviceId` and reuse it on later calls.\n\n**Shape:** `{ success, sessionId, displayName, socketIO }`. Store `sessionId` for cast/control. REST commands already broadcast to the display — Socket.IO is optional (live status only).\n\n**Related:** `POST .../join` (QR), `POST .../{sessionId}/workout`, `POST .../{sessionId}/device/disconnect`.\n        ","operationId":"CastApi_joinPairingSessionByCode","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinByCodeDto"},"examples":{"manualCode":{"summary":"Manual 6-digit code","value":{"pairingCode":"401305","deviceInfo":{"deviceId":"device-xyz-123","deviceName":"My App","deviceType":"mobile"}}}}}}},"responses":{"200":{"description":"Joined the session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinPairingSessionResponse"}}}},"400":{"description":"Invalid or expired pairing code, or invalid device payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this casting session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Join a pairing session (6-digit code)","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/join-by-code' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function joinPairingSessionByCode() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/join-by-code', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/join-by-code\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/{sessionId}/workout":{"post":{"description":"\n## Load a workout on the display\n\nMarks the workout as the session's current workout and broadcasts `workout-cast` so the display loads the embed player. Does **not** start playback — follow with `POST .../workout/start`.\n\nThe workout must exist with status created or published (same availability as `GET /v1/workouts/{id}`); unknown or malformed ids return `404`. The controller `deviceId` must still be paired (`400` otherwise).\n\n**Try it (minimal):** body `{ \"workoutId\": \"<24-hex>\", \"deviceId\": \"device-xyz-123\" }`. Optional `locale` (BCP-47). Omit deprecated `workoutData` — the display loads by `workoutId`.\n\n**Shape:** `{ success, message }`.\n\n**Related:** `POST .../workout/start`, `GET /v1/workouts/{id}`.\n        ","operationId":"CastApi_castWorkout","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CastWorkoutDto"},"examples":{"minimal":{"summary":"Load by workout id","value":{"workoutId":"507f1f77bcf86cd799439011","deviceId":"device-xyz-123"}},"withLocale":{"summary":"Load with locale","value":{"workoutId":"507f1f77bcf86cd799439011","deviceId":"device-xyz-123","locale":"fr-FR"}}}}}},"responses":{"200":{"description":"Workout loaded on the display.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CastActionResponse"}}}},"400":{"description":"Device not connected to this session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session or workout not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Load a workout on the display","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function castWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/{sessionId}/workout/start":{"post":{"description":"\n## Start playback\n\nCreates a workout session and broadcasts `workout-session-started` so the display begins playback.\n\n**End-user attribution (optional):** send `endUserId` (internal id or email) or `externalUserId`, plus `organizationId` when the key is not team-scoped — same fields as `POST /v1/workouts/{id}/sessions/start`. The end user must be an active member of that organization (`404` otherwise). A failed resolve does not start playback. Omit the fields for an anonymous session.\n\n**Try it (minimal):** body `{ \"workoutId\": \"<24-hex>\", \"deviceId\": \"device-xyz-123\" }` after a successful `POST .../workout`.\n\n**Shape:** `{ success, message, workoutSessionId }`.\n\n**Related:** `POST .../workout/control`, `GET .../workout/status`, `POST /v1/workouts/{id}/sessions/start`.\n        ","operationId":"CastApi_startWorkoutSession","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCastWorkoutSessionBody"},"examples":{"anonymous":{"summary":"Anonymous playback","value":{"workoutId":"507f1f77bcf86cd799439011","deviceId":"device-xyz-123"}},"attributed":{"summary":"Attributed end user","value":{"workoutId":"507f1f77bcf86cd799439011","deviceId":"device-xyz-123","endUserId":"member@acme.com","organizationId":"63415bf67a9c7000126616c1"}}}}}},"responses":{"200":{"description":"Playback started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCastWorkoutResponse"}}}},"400":{"description":"Device not connected to this session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"API key is not authorized for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session, workout, or end user not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Start cast workout playback","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/start' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function startWorkoutSession() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/start', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/start\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/{sessionId}/workout/control":{"post":{"description":"\n## Control playback\n\nLiteral `action` values: `play`, `pause`, `next`, `prev`, `restart`, `done_exercise` (complete current exercise and advance), `done` (complete the workout). Broadcasts `workout-state-changed` so the display reacts.\n\nShow a **Done exercise** control only when status reports `currentExerciseIsRepBased: true` — time-based exercises advance on their own clock. `next` / `prev` / `done_exercise` clamp to the workout instance bounds. Requires an active cast workout session (`400` if you have not called start).\n\n**Try it (minimal):** body `{ \"action\": \"pause\", \"deviceId\": \"device-xyz-123\" }`.\n\n**Shape:** `{ success, message }`.\n\n**Related:** `GET .../workout/status`, `POST .../workout/start`.\n        ","operationId":"CastApi_controlWorkout","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutControlBody"},"examples":{"pause":{"summary":"Pause","value":{"action":"pause","deviceId":"device-xyz-123"}},"doneExercise":{"summary":"Complete current (rep-based) exercise","value":{"action":"done_exercise","deviceId":"device-xyz-123"}}}}}},"responses":{"200":{"description":"Control command processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CastActionResponse"}}}},"400":{"description":"No active workout session, or device not connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Send a workout control command","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/control' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function controlWorkout() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/control', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/control\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/{sessionId}/workout/status":{"get":{"description":"\n## Playback snapshot\n\nAuthoritative playback state for resume and recovery. Poll this when you skip Socket.IO.\n\n**Try it:** `GET /v1/cast/pairing/{sessionId}/workout/status` with header `X-Api-Key`.\n\n**Shape:** `{ success, workoutState, currentExerciseId, currentExerciseIndex, progressSeconds, currentExerciseIsRepBased, currentExerciseReps, currentExerciseDuration, currentExerciseName, currentChapterIndex, currentChapterCount, currentChapterName }`. `workoutState` is `idle` | `playing` | `paused` | `completed`. `currentExerciseIndex` indexes workout `instances` (control path); `currentChapter*` is the live class-chapter cursor from the display — they are different spaces.\n\n**Related:** `POST .../workout/control`.\n        ","operationId":"CastApi_getWorkoutStatus","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"responses":{"200":{"description":"Playback snapshot.","schema":{"example":{"success":true,"workoutState":"playing","currentExerciseId":"507f1f77bcf86cd799439022","currentExerciseIndex":2,"progressSeconds":125.5,"currentExerciseIsRepBased":true,"currentExerciseReps":10,"currentExerciseDuration":null,"currentExerciseName":"Push-ups","currentChapterIndex":1,"currentChapterCount":8,"currentChapterName":"Warm-up"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CastWorkoutStatusResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Get cast workout status","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X GET 'https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/status' \\\n  -H 'X-Api-Key: YOUR_API_KEY'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function getWorkoutStatus() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/status', {\n  method: 'GET',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n  },\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.get(\"https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/workout/status\", headers=headers)\nresponse.raise_for_status()\nprint(response.json())"}]}},"/v1/cast/pairing/{sessionId}/device/disconnect":{"post":{"description":"\n## Unpair the controller\n\nExplicitly disconnects this `deviceId`. The display keeps the session alive and **playback keeps running** so another device can rejoin with the same pairing code. Only `done`, session terminate, or expiry ends playback.\n\n**Try it (minimal):** body `{ \"deviceId\": \"device-xyz-123\" }`.\n\n**Shape:** `{ success, message }`.\n\n**Related:** `POST .../join-by-code`, `DELETE .../session/{sessionId}`.\n        ","operationId":"CastApi_disconnectDevice","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Pairing session id — opaque 24-character hex string returned by join (or by the display create call).","schema":{"example":"68d4f663bb28382457b3dc9d","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectDeviceDto"},"examples":{"disconnect":{"summary":"Unpair this device","value":{"deviceId":"device-xyz-123"}}}}}},"responses":{"200":{"description":"Device unpaired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CastActionResponse"}}}},"400":{"description":"Device not connected to this session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed — API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session or device not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]},{"X-Api-Key":["X-Api-Key"]}],"summary":"Unpair the controller","tags":["workouts-cast"],"x-codeSamples":[{"lang":"curl","label":"cURL","source":"curl -X POST 'https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/device/disconnect' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"typescript","label":"TypeScript (fetch)","source":"async function disconnectDevice() {\n  const res = await fetch('https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/device/disconnect', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': process.env.HYPERHUMAN_API_KEY ?? '',\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({}),\n  });\n  if (!res.ok) {\n    const err = await res.json().catch(() => ({}));\n    throw new Error(err.error?.code ?? res.statusText);\n  }\n  return res.json();\n}"},{"lang":"python","label":"Python (requests)","source":"import os\nimport requests\n\nheaders = {\"X-Api-Key\": os.environ[\"HYPERHUMAN_API_KEY\"]}\nresponse = requests.post(\n    \"https://content.api.hyperhuman.cc/v1/cast/pairing/<SESSION_ID>/device/disconnect\",\n    headers={**headers, \"Content-Type\": \"application/json\"},\n    json={},\n)\nresponse.raise_for_status()\nprint(response.json())"}]}}},"info":{"title":"Hyperhuman Content API","description":"<!--\n  Do not add an `# H1` here. Swagger UI and Scalar both render `info.title`\n  (\"Hyperhuman Content API\") above this description; an h1 would duplicate it.\n  Start with the tagline blockquote and a positioning paragraph instead.\n-->\n\n> One API for delivery, personalization, and insights across your entire product.\n\nFitness content infrastructure for modern health, wellness, and fitness products: workout API, AI recommendations, AI generation, AI adaptation, and insights in one platform. Most teams ship Publish + Recommend in the first week and add the AI layers as their audience signals demand it.\n\n---\n\n## Quick Start\n\n**1. Get credentials** -> [team.hyperhuman.cc/settings?tab=integrations](https://team.hyperhuman.cc/settings?tab=integrations)\n\n**2. First request:**\n```bash\ncurl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/metadata' \\\n  -H 'X-Api-Key: YOUR_API_KEY'\n```\n\n**3. Generate a workout:**\n```bash\ncurl -X POST 'https://content.api.hyperhuman.cc/v1/orgs/{organizationId}/workouts/generate' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"endUserProfileDetails\": {\"age\": 28, \"fitnessLevels\": [\"beginner\"]},\n    \"exerciseSources\": [\"premium_stock\"],\n    \"durationOptions\": {\"minMinutes\": 20, \"maxMinutes\": 20},\n    \"categoryId\": \"615aa3f0dbe7140012c59e94\",\n    \"locale\": \"fr-FR\"\n  }'\n```\n\nResponse includes additive localization fields when `locale` is set: `nameTranslations` (AI title in en-US + target locale), `nameLocalized` / `muscleGroupsLocalized` / `equipmentLocalized` on exercises, and `difficultyLabel`. Legacy `name` stays English.\n\nThe `categoryId` in the sample is a **production** HIIT id. Read `GET /v1/workouts/metadata` (and `GET /v1/plans/metadata` for goals) in the environment you call. Ids differ by environment. Functional Training, Low-Impact Cardio, Improve Metabolic Health, and Menopause Support are in the catalog with all 18 display names and, as of 2026-10-26, in the science layer. Menopause Support can return **400** when the workout pool is under 40% preferred categories. A category or goal that still has no science profile keeps the old fallback: the category name is kept and rest/structure come from Other; the goal still generates (**200**) on the general-fitness path. Create Similar does not apply those profiles. Older category, goal, and equipment names fall back to English for `lt-LT`, `pl-PL`, `ar-XA`, `nb-NO`, and `sv-SE`. Equipment category ids also differ by environment (`GET /v1/workouts/equipment/metadata`). Reformer, Sled, Ski Erg, Weighted Vest, and Wall Ball are in that list with all 18 names.\n\n---\n\n## For LLMs and AI agents\n\nIf you are a coding assistant integrating against this API, prefer these machine-readable artifacts over scraping this HTML page:\n\n| Artifact | URL | Use it for |\n|----------|-----|------------|\n| Compact LLM index (markdown) | [https://content.api.hyperhuman.cc/llms.txt](https://content.api.hyperhuman.cc/llms.txt) | Short overview + links to deeper docs. Drop into context windows. |\n| Full LLM bundle (markdown) | [https://content.api.hyperhuman.cc/llms-full.txt](https://content.api.hyperhuman.cc/llms-full.txt) | Auth, error envelope, pagination, locales, and per-endpoint summaries in one file. |\n| OpenAPI 3 spec (JSON) | [https://content.api.hyperhuman.cc/openapi.json](https://content.api.hyperhuman.cc/openapi.json) | Source of truth for tool/function calling. Stable `operationId`s of the form `Controller_method`. |\n| OpenAPI 3 spec (YAML) | [https://content.api.hyperhuman.cc/openapi.yaml](https://content.api.hyperhuman.cc/openapi.yaml) | Same content as `openapi.json`, friendlier for diffing and most CLI codegen tools. |\n| Agent integration guide | [https://content.api.hyperhuman.cc/AGENTS.md](https://content.api.hyperhuman.cc/AGENTS.md) | Conventions for generated client code (auth, errors, pagination, locales) plus **§11**: strict whitelisted query/body keys, public `/openapi.json` scope, and id wording. |\n| Custom player guide | [https://content.api.hyperhuman.cc/docs/guides/custom-player.md](https://content.api.hyperhuman.cc/docs/guides/custom-player.md) | Reference implementation for building a custom interactive workout player on top of `/playlist` and `/music`. |\n| Developer cheat sheet | [https://content.api.hyperhuman.cc/docs/guides/content-API-cheat-sheet.md](https://content.api.hyperhuman.cc/docs/guides/content-API-cheat-sheet.md) | Copy-paste flows, curl/JS examples, localization, partner stock catalog, and rate-limit notes. |\n| CloneMotion guide | [https://content.api.hyperhuman.cc/docs/guides/clonemotion.md](https://content.api.hyperhuman.cc/docs/guides/clonemotion.md) | Public trainer guide for creating better AI exercise clips from photos. |\n| Teams platform guide | [https://team.hyperhuman.cc/docs/guides/teams-platform.md](https://team.hyperhuman.cc/docs/guides/teams-platform.md) | Product walkthrough of the Teams workspace: create, library, automate, deliver, and billing. |\n\n> Need a copy-paste prompt? Send the agent the URL of `/llms-full.txt` plus the prose: \"Use this Hyperhuman Content API. Authenticate with the `X-Api-Key` header. Every error response is `{ \"error\": { \"code\", \"message\" } }`. Prefer `links.next` for pagination (`offset`/`limit` at runtime; OpenAPI may hide `offset`).\"\n\n---\n\n## Five capabilities, one API\n\nFive product surfaces stack on the same library. Start where you are; add the AI layers as your product matures.\n\n| # | Capability | Primary endpoint | What it does | Latency band |\n|---|------------|------------------|--------------|--------------|\n| 1 | **Publish Content** | `GET /v1/orgs/{organizationId}/workouts` <br> `GET /v1/orgs/{organizationId}/plans` | List, filter, and play workouts and multi-week plans **already in your workspace**. Empty `data: []` is normal until you add content in Teams or with `POST /v1/orgs/{organizationId}/workouts` / `.../plans` (+ `PATCH` / `DELETE`; organization key, saved as your team manager, default `private`, **1x**). Pre-made stock templates are not a live Content API catalog. | Fast |\n| 2 | **AI Recommend** | `POST /v1/orgs/{organizationId}/workouts/recommend` <br> `POST /v1/orgs/{organizationId}/plans/recommend` | Rank **existing** library workouts or plans for a user profile (e.g. quiz → best curated match). Does not create new content. | Sub-second |\n| 3 | **AI Generate** | `POST /v1/orgs/{organizationId}/workouts/generate` <br> `POST /v1/orgs/{organizationId}/plans/generate` | Create a brand-new workout or multi-week plan on the fly. Success is **HTTP 200** (not 201). Workout generate returns ephemeral JSON (no library id) unless you send `addToTeamContent: true`, which saves it to your library and returns its `id`. Plan generate returns a top-level plan `id` when `endUserProfileDetails.endUserId` is set (member plan) or `addToTeamContent: true` (team library plan) — not both; otherwise there is no plan id. Free-text is `userRequirements` (not `userGuidance`). Optional `methodologyProfileId` applies a team Programming DNA profile from `GET /v1/orgs/{organizationId}/methodologies` (opt-in; omit = none). Response may include a **Generation Inspector** snapshot (`methodology` / `inspection`). Optional `locale` localizes AI output; optional `categoryIds` hard-filters the public workout pool. | Typically a few seconds (longer under upstream model load — transient provider errors are retried server-side); keep the HTTP client open ≥ **120s** |\n| 4 | **AI Adapt** | `POST /v1/orgs/{organizationId}/workouts/{workoutId}/adapt` <br> `POST /v1/orgs/{organizationId}/plans/{planId}/adapt` | Evolve an existing workout or plan as the user progresses. Workout adapt is ephemeral JSON (no workout id). Plan adapt **requires** `endUserProfileId` and returns a persisted adapted program `id`. Free-text is `userGuidance` (not `userRequirements`). Counts as 10x rate-limit weight. | Typically a few seconds (longer under upstream model load — transient provider errors are retried server-side); keep the HTTP client open ≥ **120s** |\n| 5 | **AI Insights** | `GET /v1/orgs/{organizationId}/endusers/{endUserId}/insights/digest?date=<ISO 8601 date-time>` <br> `GET /v1/orgs/{organizationId}/endusers/{endUserId}/insights/pillars/{pillarType}` <br> `POST /v1/orgs/{organizationId}/endusers/{endUserId}/insights/health-data` <br> `POST /v1/orgs/{organizationId}/endusers/{endUserId}/nutrition/log` | Daily digest plus per-pillar drill-downs (health pulse, training, recovery, movement, nutrition, body) for re-engagement loops. Push your own health data (activities, sleep, steps, body metrics, heart rate, hydration, SpO2, pre-computed scores — batch of up to 50, idempotent per `externalId`) and nutrition logs into the same pipeline that powers the insights. | Fast |\n\n> `{endUserId}` is the end-user identifier. It accepts the user's email, your `externalUUID`, or the internal user id (24-character hex DB id returned by the endusers endpoints) - they all resolve to the same end user. Treat all ids as opaque strings. An identifier that does not resolve to an end user in the organization returns `404` (an unknown identifier never produces a `500`).\n\n### Recommend vs Generate (pick one)\n\n| Need | Use | Result |\n|------|-----|--------|\n| Pair a quiz / profile to workouts your team already published | `POST .../workouts/recommend` (or `.../plans/recommend`) | Ranked library items with `recommendation` text; play via persisted workout/plan ids |\n| Show items like the workout or program the user is already viewing | `GET /v1/workouts/{workoutId}/similar` or `GET /v1/plans/{planId}/similar` | Same organization only. Attribute match (categories or goals, duration, difficulty, muscle focus). Not a profile and not AI. `{ data, links }` plus `matchLabels`. `limit` default 5, max 10. `visibility` default `public` |\n| Create a new workout structure on the fly | `POST .../workouts/generate` | Ephemeral `{ name, instances[], … }` — **JSON-receiver iframe** + `GET /video-asset/{id}`; **no** `/playlist`, `/music`, or sessions by id |\n| Create a new multi-week program | `POST .../plans/generate` | Set `endUserProfileDetails.endUserId` to get a persisted plan `id` to **store** (`GET /v1/plans/{planId}`); without `endUserId` → no top-level id. Not listed on org plan library. Body sources field: `workoutCollectionSources` |\n| Apply this org's Programming DNA to a new workout or plan | Generate with `methodologyProfileId` from `GET .../methodologies` | Same generate payload plus a **Generation Inspector** snapshot (`methodology` / `inspection`). On this API, not applied on recommend, adapt, or chat. Hyperhuman Club / member web apply the **team default** when one is published — they do not send this field |\n| Fixed conditional branches (e.g. week 1 + beginner → workout X) | Your app logic + Recommend / library select / Generate with a specific profile | Not a quiz rules engine inside Generate |\n\nCoaches publish **Programming DNA** in Teams (team profiles only — **Set as team guideline** then **Make default**; **up to 10** per workspace). List them with `GET /v1/orgs/{organizationId}/methodologies` (name, applicability, `ruleSummary` — not full guidance text). Personal (coach-only) Style is never listed and never applies to members.\n\n**This API:** `isTeamDefault` on a list item is informational; organization API keys never auto-apply a team default. Generate applies a profile only when you send `methodologyProfileId`. Unknown, personal (member-only), or inactive ids return **400**. Omit still means none. `userRequirements` still wins over methodology text; hard structured rules and platform bounds (pool, safety, duration, structure) do not.\n\n**Hyperhuman Club and the Hyperhuman member web app:** when a team default exists, member Generate and Adapt follow that house Programming DNA. A personal Style is not enough. Members do not send `methodologyProfileId`.\n\nThe generate response may include a **Generation Inspector** snapshot: `methodology` (`{ id, name, version, reason }` or `null`) and `inspection` (`methodology`, `hardRulesApplied`, `violations`, `complianceStatus` of `compliant` | `partial` | `not_applicable`, `generationId`). `generationId` may be omitted when generate has no user owner. Store that snapshot yourself — there is **no** public GET-by-generation-id, and later `GET /v1/plans/{id}` does not replay it. Hard-rule results in `inspection` are deterministic; text guidelines are guidance, not a guarantee. Workout generate has an optional **1x** `POST .../workouts/generate/preflight` (feasibility before you generate). Plan generate has no preflight on this API. Recommend, adapt, and chat do not accept `methodologyProfileId` on this API.\n\n---\n\n## Three delivery models\n\nThe same library and intelligence layer ship through three integration paths. Pick by team capacity and product surface.\n\n### 1. Embed & Go\n\nDrop Hyperhuman-hosted surfaces into a webview, landing page, or portal: a **single-workout or JSON player** on `team.hyperhuman.cc` (see **Embedded Player**), or a **full workouts or programs library grid** on the member web app with configurable discovery UI (see **Branded library embed**). Fastest path to live content; no custom player build required. Best for web apps, MVPs, corporate wellness portals, marketing pages.\n\n### 2. Stream Videos\n\nGet a pre-rendered, full-length workout **video** or **narrative audio** as a **single presigned HTTPS URL** in the response body. Best for VOD catalogs, CMS publishing, YouTube workflows, audio-first products.\n\n```bash\ncurl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/{workoutId}/export/video/stream_url?locale=en-US' \\\n  -H 'X-Api-Key: YOUR_API_KEY'\n```\n\n```bash\ncurl -X GET 'https://content.api.hyperhuman.cc/v1/workouts/{workoutId}/export/audio/stream_url?locale=en-US' \\\n  -H 'X-Api-Key: YOUR_API_KEY'\n```\n\nReturns **`200`** with **`Content-Type: text/plain`**: a **single** presigned URL string (not JSON). The URL points to the full-workout **video** or **narrative audio** object stored for that locale — commonly **progressive MP4** (video) or **M4A** (audio). Follow the URL extension and response `Content-Type`. URLs are time-limited AWS S3 presigned links (on the order of **7 days**); re-fetch before expiry. Play the string **verbatim** (no `X-Api-Key` on the file request). Not HLS/DASH/ABR. A **404** (and every other error) is JSON `{ \"error\": ... }` with `Content-Type: application/json` — do not treat that body as a URL.\n\nFull video is produced when someone uses Generate on the workout in Teams, or when the coach who saves has **Full workout video** on under Workout Defaults → Format (off by default). Turning it on does not render workouts already saved. The next create, update, or Generate does.\n\nWith it off, a studio save removes every locale's full video and `export/video/stream_url` stays **404**. With it on, the save renders the coach's language. That locale's previous ready file is returned until the new render replaces it. A failed render leaves the previous file in place. Other locales are left as they are until a later save with the switch off, or a Generate for that locale. A workout that has never been rendered returns **404** until the first render finishes. A full-length workout often takes tens of minutes, plus queue time. A **200** during that window is the previous file. Re-fetch this route after the new file is ready; a URL already fetched stays valid until it expires. Poll on the order of minutes. There is no Content API to start a render or read render status.\n\nOmit `locale` for the latest ready video in any locale. A provided locale is that locale's latest ready file, or **404**. Narrative audio (`export/audio/stream_url`) is a separate file and is not removed by that save. Playlist playback does not depend on the full video.\n\n### 3. Build Your UX\n\nPower your own player UI with our structured playlist: time-limited S3 **presigned progressive MP4** / M4A `url` values (~7 days) plus **public unsigned S3 JPEG** `poster` / `thumbnail` on exercise (and class/multi/promo/educational) segments. Intro/outro videos omit posters. Play each media `url` **verbatim** (the `X-Amz-*` query is the credential): no `X-Api-Key` on the file request, no parse/rebuild, and do not log or persist the URL — cache by workout / exercise id and re-fetch before expiry. Byte-range GETs are allowed. Workout intro, exercise clips, and `/music` tracks use the same URL contract — no alternate host. For `exercise` segments, `duration` is the planned work window — loop the (often shorter) clip until that clock elapses. Maximum control over UI, analytics, and offline behavior. Best for mobile apps, connected hardware, and premium coaching experiences. See the **Custom Interactive Workout Player** section below for the reference implementation.\n\n---\n\n## Embedded Player\n\nTwo drop-in **iframes** (always frame them — do not open the player URLs as a top-level page) for the most common integration paths. Host: `https://team.hyperhuman.cc`. The same player powers both — only the data source differs.\n\n| | Pre-built (`/embed/workout/{id}`) | AI / JSON (`/embed/workout-json-receiver`) |\n|--|--|--|\n| Data source | Persisted library workout id | `HYPERHUMAN_EMBED_INIT.workout` (pass generate/adapt JSON as-is) |\n| PulseMix / `videoAudioMode` / `mixBgMusic` query overrides | Yes | No |\n| Session tracking, attributed feedback, `HYPERHUMAN_SESSION_EVENT` | Yes | **No** (no persisted workout id) |\n| Media resolution | `GET /v1/workouts/{id}` + `/playlist` (+ `/music`) | `GET /v1/video-asset/{exerciseId}` per exercise |\n| Typical Content API prep | List/recommend → pick id | `POST .../workouts/generate` (or adapt) → post JSON |\n| Usage / quota | Those GETs plus session lifecycle count against the **key in the URL or `HYPERHUMAN_EMBED_INIT`** (`X-Api-Key`) | Each `GET /v1/video-asset/{id}` (and org metadata) counts against the **INIT / URL key**. Host `POST .../workouts/generate` is a separate **10x** call |\n\n### Pre-built Workout\n\nRenders any workout from your library by id. Under the hood the player loads details, playlist, and (when enabled) PulseMix via the Content API for that persisted id. Those requests — and the session lifecycle below — send `X-Api-Key` from the iframe `apiKey` query param or the `HYPERHUMAN_EMBED_INIT` envelope, so they consume that key's hourly/daily quota and appear on that team's API usage.\n\n```html\n<!-- Landscape card (16:9). For mobile / immersive hosts prefer the full-viewport snippet below. -->\n<iframe\n  src=\"https://team.hyperhuman.cc/embed/workout/{workoutId}?organizationId={organizationId}&apiKey={apiKey}&locale=en-US\"\n  style=\"width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px;\"\n  allow=\"autoplay; fullscreen; accelerometer; gyroscope\"\n  referrerpolicy=\"strict-origin-when-cross-origin\"\n  allowfullscreen>\n</iframe>\n```\n\n**Full-viewport (recommended for mobile / portrait):** give the player the visible viewport so Club-style letterboxed 16:9 video + top/bottom bands have room. Hide your own app chrome when entering an immersive mode; the in-player UI keeps a floating exit only when the host does the same.\n\n```html\n<div style=\"position: relative; width: 100%; height: 100vh; height: 100dvh; background: #000;\">\n  <iframe\n    src=\"https://team.hyperhuman.cc/embed/workout/{workoutId}?organizationId={organizationId}&apiKey={apiKey}&locale=en-US\"\n    style=\"position: absolute; inset: 0; width: 100%; height: 100%; border: none;\"\n    allow=\"autoplay; fullscreen; accelerometer; gyroscope\"\n    referrerpolicy=\"strict-origin-when-cross-origin\"\n    allowfullscreen>\n  </iframe>\n</div>\n```\n\n> Prefer copying the snippet from **Teams → Workout details → Deliver → Embed** so `allow` and container height stay current. Missing `allowfullscreen` or `allow` tokens that include `autoplay` / `fullscreen` is the most common cause of broken playback/fullscreen.\n\n#### Query Parameters\n\n| Param | Required | Type | Default | Description |\n|-------|----------|------|---------|-------------|\n| `organizationId` | yes | string | - | Organization id (24-character hex DB id) the workout belongs to. Used for org branding and (with standard/club keys) session attribution. |\n| `apiKey` | conditional | string | - | Your Content API key (`X-Api-Key` value). Required **unless** you deliver it over `postMessage` with `keyHandshake=1` (see **Keeping the API key out of the URL** below). |\n| `keyHandshake` | no | boolean | `false` | Accept `1`/`true`. When set **and** the URL has no `apiKey`, the player announces readiness and waits for `HYPERHUMAN_EMBED_INIT` with the key (same channel as the AI-Generated receiver). If `apiKey` is also present in the URL, the URL key wins and the handshake is skipped. |\n| `locale` | no | string | `en-US` | BCP-47 locale. Falls back to English when unsupported. |\n| `segment` | no | string | first segment | Segment id to start playback from (e.g. resume from a specific exercise). |\n| `presentationStyle` | no | enum | workout default | One of `full`, `minimal`, `essential`, `noOverlays`. Overrides the workout's own `presentationStyle`. |\n| `videoAudioMode` | no | enum | workout default | One of `full`, `instructionsOnly`, `beepsOnly`, `none`. Overrides the workout's own `videoAudioMode` audio policy (see the matrix in **Custom Interactive Workout Player → Audio policy matrix**). Use `instructionsOnly` to keep voice but drop beeps and background music. |\n| `mixBgMusic` | no | boolean | workout default | Accept `1`/`true` or `0`/`false`. Overrides the workout's own `mixBgMusic` flag. Set `0` to suppress background music while keeping voice instructions; omit to use the workout's stored value. |\n| `muted` | no | boolean | `false` | Accept `1` or `true`. Hard mute - silences voice, beeps, background music, and inline video audio together (equivalent to `videoAudioMode=none`). For finer control use `videoAudioMode` / `mixBgMusic` instead. Pair with `autoplay=1` for unattended embeds. |\n| `autoplay` | no | boolean | `false` | Accept `1` or `true`. Browsers block sound autoplay without a user gesture - combine with `muted=1`. |\n| `brandLogoUrl` | no | string (URL) | org logo | Overrides the player logo. Square PNG recommended. |\n| `brandWatermarkUrl` | no | string (URL) | org watermark | Overrides the bottom-right watermark (your org's brand mark). Square PNG with transparent background recommended. |\n| `brandMainColor` | no | hex string | org main color | Player accent color: action-button backgrounds (start / pause / done / resume / play-again), progress-bar completion fill, the upcoming-exercise badge, and the active class-chapter highlight. URL-encode the `#` (`%23FF6600`). |\n| `brandSecondaryColor` | no | hex string | org secondary color | Progress-bar incomplete (remaining-track) color and the translucent background of the music-control buttons. URL-encode the `#`. |\n| `brandTextColor` | no | hex string | org text color | Foreground color for timer / time-left / next-exercise / outro text and for button labels and icons (including the music controls). URL-encode the `#`. |\n| `sessionMode` | no | enum | `anonymous` | `anonymous` · `attributed` · `host`. May also be sent in `HYPERHUMAN_EMBED_INIT` (see **Session attribution**). URL value wins over the envelope when both are set. |\n| `endUserId` | no | string | - | With `sessionMode=attributed`: Hyperhuman user id or email. May also be sent in the INIT envelope (preferred if you want it out of the URL). |\n| `externalUserId` | no | string | - | Alternative to `endUserId` (external id on the team membership). |\n| `painCheckIn` | no | `0` / `1` | org default | With `sessionMode=attributed`: add a 0-10 pain score to the in-player check-in (`painScore` on `POST /v1/workouts/{id}/feedback`). Omit to follow `painCheckInEnabled` from org metadata (on for physio / rehab teams). May also be sent in the INIT envelope as a boolean. |\n| `setLogging` | no | `0` / `1` | org default | With `sessionMode=attributed`: let members log weight and reps during playback (a **Log set** button on each exercise, a log card on the pause screen, and the results on the check-in). Logs go out once, with the check-in, as `exerciseData` + `weightUnit` on `POST /v1/workouts/{id}/feedback`. Until then they ride the progress PATCH as the session `logDraft`, so they survive a quit. Omit to follow `setLoggingEnabled` from org metadata (team setting; missing means on); `0` / `1` forces it per embed. May also be sent in the INIT envelope as a boolean. Ignored for `presentationStyle=noOverlays`, the JSON receiver, and workouts with `skipWorkoutCompletionScreen`. |\n| `weightUnit` | no | `metric` / `imperial` | prescribed unit, else `metric` | Unit for in-player logging (kg or lb). One unit per workout, matching `weightUnit` on the feedback body. May also be sent in the INIT envelope. |\n\n> Tip: org-level branding (logo, watermark, colors) is applied automatically from your org settings (exposed by `GET /v1/orgs/{organizationId}/metadata`). Pass the `brand*` overrides only when you need to differ from the org defaults (e.g. white-label per end-user). The same metadata payload includes `ai*Enabled` / `insightsEnabled` — those are **member-app visibility** flags, not Content API capability gates — plus `insightsMode` (team-level `coach` / `physio` / `weight_management` / `wellness`), `painCheckInEnabled` (whether post-workout check-ins should ask for pain) and `setLoggingEnabled` (whether members can log weight and reps during playback).\n\n#### Keeping the API key out of the URL (optional)\n\nThe snippet above puts `apiKey` in the iframe URL. That is fine for a server-rendered page where the URL is never user-visible, but the key then also lands in the page source, browser history, and the `Referer` header / access logs of resources the iframe loads. To avoid that, drop `apiKey`, add `keyHandshake=1`, and reply to the player's ready signal with the key over `postMessage` - the same handshake the **AI-Generated Workout** receiver uses below.\n\n```html\n<iframe id=\"player\"\n  src=\"https://team.hyperhuman.cc/embed/workout/{workoutId}?organizationId={organizationId}&keyHandshake=1&locale=en-US\"\n  style=\"width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px;\"\n  allow=\"autoplay; fullscreen; accelerometer; gyroscope\"\n  referrerpolicy=\"strict-origin-when-cross-origin\"\n  allowfullscreen>\n</iframe>\n\n<script>\n  // Pin the player origin so the key is only ever sent to (and accepted from) Hyperhuman.\n  var HYPERHUMAN_PLAYER_ORIGIN = 'https://team.hyperhuman.cc';\n\n  window.addEventListener('message', (e) => {\n    if (e.origin !== HYPERHUMAN_PLAYER_ORIGIN) return;        // ignore other frames\n    if (e.data === 'hyperhumanPlayerReadyForData') {\n      document.getElementById('player').contentWindow.postMessage({\n        type: 'HYPERHUMAN_EMBED_INIT',\n        apiKey: '{apiKey}'      // your Content API key\n      }, HYPERHUMAN_PLAYER_ORIGIN);\n    }\n  });\n</script>\n```\n\nThe `workoutId` stays in the URL (it is not a secret); only the key moves to the message. Always set an explicit `targetOrigin` (`https://team.hyperhuman.cc`) on the post - never `'*'`, which would broadcast the key to any frame. The player waits briefly for the message before it starts.\n\n> The key is a **client-visible** credential either way - it runs in the browser, so a determined viewer can read it from JS or the network tab. `keyHandshake` only keeps it out of the URL, history, logs, and `Referer`. There is **no separate publishable or scoped player key** today. For a key that never reaches the browser at all, render server-side and use the **Stream Videos** export URLs or the **Custom Interactive Workout Player** below, where `X-Api-Key` stays on your backend.\n\n---\n\n### AI-Generated Workout\n\nFor workouts produced on the fly by your own backend or by `POST /v1/orgs/{organizationId}/workouts/generate` (or workout **adapt**). Load the receiver **in an iframe**; it announces readiness, then your page replies with the API key **and** the generate JSON over `postMessage` — the key is **not** placed in the iframe URL.\n\n```html\n<iframe id=\"player\"\n  src=\"https://team.hyperhuman.cc/embed/workout-json-receiver?organizationId={organizationId}&locale=en-US\"\n  style=\"width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px;\"\n  allow=\"autoplay; fullscreen; accelerometer; gyroscope\"\n  referrerpolicy=\"strict-origin-when-cross-origin\"\n  allowfullscreen>\n</iframe>\n\n<script>\n  // Pin the player origin so the key is only ever sent to (and accepted from) Hyperhuman.\n  var HYPERHUMAN_PLAYER_ORIGIN = 'https://team.hyperhuman.cc';\n\n  window.addEventListener('message', (e) => {\n    if (e.origin !== HYPERHUMAN_PLAYER_ORIGIN) return;            // ignore other frames\n    if (e.data === 'hyperhumanPlayerReadyForData') {\n      document.getElementById('player').contentWindow.postMessage({\n        type: 'HYPERHUMAN_EMBED_INIT',\n        apiKey: '{apiKey}',       // your Content API key\n        workout: workoutJSON      // payload shape below\n      }, HYPERHUMAN_PLAYER_ORIGIN);\n    }\n  });\n</script>\n```\n\nDelivering the key over `postMessage` instead of the URL keeps it out of the page source, browser history, server/CDN access logs, and the `Referer` header.\n\n#### Query Parameters\n\n| Param | Required | Type | Default | Description |\n|-------|----------|------|---------|-------------|\n| `organizationId` | yes | string | - | Organization id (24-character hex DB id). |\n| `locale` | no | string | `en-US` | BCP-47 locale. |\n| `segment` | no | string | first segment | Segment id to start playback from. |\n\n> The API key is **no longer a query parameter** - send it in the `HYPERHUMAN_EMBED_INIT` message instead. For backward compatibility the receiver still accepts a legacy `apiKey` query param and a raw (un-enveloped) workout payload, but new integrations should use the envelope above.\n\n#### postMessage Protocol\n\n1. The iframe loads, confirms `organizationId` is present (the key arrives by message, so it does not gate this step), then after a short delay (~1s) posts the literal string `'hyperhumanPlayerReadyForData'` to its parent. If `organizationId` is **missing**, the receiver shows **Error: Organization ID is required** and does **not** post ready.\n2. Your page replies with a single `HYPERHUMAN_EMBED_INIT` envelope carrying `apiKey` and `workout` (pass the generate/adapt response object). Always set an explicit `targetOrigin` (`https://team.hyperhuman.cc`) — never `'*'`.\n3. The player does not resolve media until a non-empty `apiKey` is present (INIT or legacy query). An invalid key is not validated up front — it surfaces as failed `GET /v1/video-asset/{id}` calls (**401**) in the console, not as a blocking error screen. An invalid/non-workout payload shows an inline format error until a valid INIT arrives. A workout payload without a key yet stays on the waiting spinner (no env-key fallback).\n4. Subsequent `HYPERHUMAN_EMBED_INIT` posts replace the current workout (useful for \"play next\"); the key may be omitted on follow-up posts once set.\n\n#### Workout JSON Payload Shape\n\nThis object is the `workout` field of the `HYPERHUMAN_EMBED_INIT` envelope (or, for legacy embeds, the raw `postMessage` body).\n\n```json\n{\n  \"name\": \"Quick Morning Burner\",\n  \"totalDurationSeconds\": 600,\n  \"difficulty\": \"intermediate\",\n  \"categoryId\": \"615aa3f0dbe7140012c59e94\",\n  \"initialSegmentId\": \"instance_1\",\n  \"instances\": [\n    {\n      \"id\": \"instance_1\",\n      \"kind\": \"single-exercise\",\n      \"durationSeconds\": 45,\n      \"pace\": \"medium\",\n      \"weightLevel\": \"medium\",\n      \"rpe\": 7,\n      \"amrap\": false,\n      \"skipIntro\": false,\n      \"exercise\": {\n        \"id\": \"507f1f77bcf86cd799439011\",\n        \"name\": \"Bodyweight Squats\",\n        \"thumbnailUrl\": \"https://hhcontent.s3.eu-central-1.amazonaws.com/example/squat-thumb.jpg\"\n      }\n    },\n    {\n      \"id\": \"instance_rest_1\",\n      \"kind\": \"rest\",\n      \"durationSeconds\": 30\n    }\n  ]\n}\n```\n\n| Field | Required | Notes |\n|-------|----------|-------|\n| `name` | yes | Workout title (page title / intro). Receiver validates `name` + `instances[]` only. |\n| `instances[]` | yes | Ordered exercise + rest segments. Generate emits wire kinds `single-exercise` \\| `rest` only. |\n| `instances[].kind` | yes | `single-exercise` or `rest` (generate/adapt). |\n| `instances[].exercise.id` | yes (for exercises) | 24-character hex exercise id → player calls `GET /v1/video-asset/{id}`. |\n| `instances[].durationSeconds` | conditional | Segment length in **seconds** (generate already converts from internal ms). |\n| `instances[].reps` | conditional | Rep-based exercises; duration estimated from `exercise.estimatedRepDuration` when `durationSeconds` omitted. Provide `durationSeconds` **or** `reps`. |\n| `instances[].exercise.equipment` | optional | `string[]`; upcoming-exercise overlay. |\n| `instances[].exercise.muscleGroups` | optional | `string[]`; upcoming-exercise overlay. |\n| `instances[].skipIntro` | optional | When `true`, skips per-exercise intro/preview. |\n| `instances[].pace` / `weightLevel` / `weight` / `weightUnit` / `rpe` / `amrap` | optional | Overlay metadata when present (`rpe`/`amrap` are host-optional; generate often omits them). |\n| `totalDurationSeconds` | recommended | Progress bar / “N min left”. |\n| `initialSegmentId` | optional | Same effect as the `segment` query param. |\n\n> **Audio / video (JSON receiver):** Prefer posting the generate/adapt response as `workout` unchanged. The player waits for a non-empty `apiKey` (INIT or legacy query) before resolving media, then calls `GET /v1/video-asset/{exerciseId}` with that key (instruction audio capped at 3 clips; some assets have **zero** instruction tracks — video still plays). Put the member's BCP-47 language on the iframe as `locale`; the player forwards it onto each video-asset GET. If that query is absent, the player and the API use `en-US` and return one language of instruction and cue audio. Generate body `locale` localizes names only. Those GETs count against the same key. Generate may include `exercise.videoUri`; the embed still re-fetches by `exercise.id`. Preview/intro cues are **silent** for AI/JSON workouts — instructions play during execution when available.\n>\n> **Background music / PulseMix:** Not available. No `GET .../music`. `mixBgMusic` / `videoAudioMode` on the posted JSON are ignored. Use the **Pre-built** embed for music + audio-policy overrides.\n>\n> **Sessions / feedback:** Not available on this path (no persisted workout id). Sending `sessionMode` / `endUserId` on INIT does **not** enable tracking — use the pre-built embed for sessions, in-player feedback, or `host` events.\n\n#### Security Model\n\nThe receiver accepts the `HYPERHUMAN_EMBED_INIT` message from **any parent origin** so third-party customer pages can drive the player without per-tenant allow-list configuration; the trust boundary inside the iframe is **payload-shape validation** - the receiver only honors a `workout` object matching the schema above.\n\nReceiving the API key here from the framing parent is legitimate - the parent already owns it. What matters is the host hygiene shown above: send the key only with an explicit `targetOrigin`, and accept the ready signal only from the pinned player origin. Aside from that key, treat this channel as untrusted - do not transmit other secrets, access tokens, or PII over it.\n\n---\n\n### Session attribution & modes (pre-built only)\n\n**Pre-built** embeds track a workout session against the Content API. An **attributed** play calls `GET .../sessions/recent` first and continues that open session. It calls `sessions/start` only when recent is **404**. `sessions/start` marks every other in-progress session for that workout completed. One of those already at progress `>= 0.1` pins the `programPosition` already stored on it when that index still matches, and otherwise fills the earliest open copy. It does not receive the new `programPosition`. Anonymous plays still start fresh (recent needs an identity). Later calls are **404** when the session is not for that workout and the same trainee, before a completed **409**. `progressSeconds` must be `>= 0`. Do not send `programPosition` on PATCH. Feedback `ratingId` / `difficultyId` must come from the matching list on `GET /v1/workouts/feedback/options`. **JSON-receiver** embeds do **not** call session or feedback APIs today.\n\nDefault is **anonymous** (API key only, `traineeId: null`). Choose ownership via query params on `/embed/workout/{id}` and/or fields on `HYPERHUMAN_EMBED_INIT` (URL values win when both are set):\n\n| Field | Type | Default | Description |\n|-------|------|---------|-------------|\n| `sessionMode` | enum | `anonymous` | `anonymous` (no identity), `attributed` (player attributes the session to an end user), or `host` (player emits lifecycle events; your page owns tracking server-side). |\n| `endUserId` | string | - | Attribute to an end user by Hyperhuman user id or email. Used when `sessionMode=attributed`. |\n| `externalUserId` | string | - | Alternative to `endUserId`: external id on the team membership. |\n| `painCheckIn` | boolean | org default | Ask for a 0-10 pain score on the in-player check-in. Omit to follow `painCheckInEnabled` from `GET /v1/orgs/{organizationId}/metadata` (physio / rehab teams); `true` / `false` forces it per embed. |\n| `setLogging` | boolean | org default | Let members log weight and reps during playback. Omit to follow `setLoggingEnabled` from `GET /v1/orgs/{organizationId}/metadata` (team setting, on by default); `true` / `false` forces it per embed. Logs are sent once, with the check-in (`exerciseData` + `weightUnit` on `POST /v1/workouts/{id}/feedback`), including when the member taps Skip. Until then they ride the progress PATCH as the session `logDraft`. |\n| `weightUnit` | `'metric'` \\| `'imperial'` | prescribed unit, else `metric` | Unit for in-player logging. One unit per workout. |\n| `programPosition` | integer | - | Active-program slot (`positionInPlan`, 0-based). **INIT only** — not an iframe query param. Sent on session start, end, and complete. Ignored unless that index is still this workout. Omit it and the earliest open copy of this workout is filled. |\n\n```javascript\n// Prefer INIT for identity (keeps endUserId out of the iframe URL / logs / Referer).\ndocument.getElementById('player').contentWindow.postMessage({\n  type: 'HYPERHUMAN_EMBED_INIT',\n  apiKey: '{apiKey}',\n  sessionMode: 'attributed',\n  endUserId: 'member-123',     // Hyperhuman user id or email\n  painCheckIn: true,           // optional: force the pain question on / off\n  programPosition: 2           // optional: 0-based active-program slot (INIT only)\n}, HYPERHUMAN_PLAYER_ORIGIN);\n```\n\nIn `attributed` mode the player also shows an in-player feedback prompt at completion (`GET /v1/workouts/feedback/options` + `POST /v1/workouts/{id}/feedback` with option **ids**, plus an optional integer `painScore` 0-10 when the pain check-in is on). The prompt is shown after `sessions/complete` has been sent (or `sessions/end`, after the member taps **End now**). Feedback completes the session at 100% unless it sends `keepProgress: true` (the player sends it after **End now**, so the ended session keeps its progress), and it does not accept `programPosition`, so it must not land first. A continued session's later PATCH sends a `progressSeconds` at least as large as that session's stored `duration` (PATCH replaces duration). A finish that arrives while `sessions/recent` or `sessions/start` is still in flight is sent once the session id exists. Playback still starts at the first segment. An in-progress restart continues the same open session; after a real complete, recent is **404** and the next play starts fresh. Attribution follows the session rules in [AGENTS.md](https://content.api.hyperhuman.cc/AGENTS.md) section 9. In `host` mode the player does not call the session API and does not echo `programPosition` (the host already has it); it emits the outbound events below for your page to relay.\n\n---\n\n### Player Cast Controls (optional)\n\nBoth iframes accept playback control messages from any parent origin. Useful for casting, custom UI overlays, or remote control surfaces.\n\n```javascript\nplayerIframe.contentWindow.postMessage({\n  type: 'CAST_CONTROL',\n  action: 'play' // 'play' | 'pause' | 'next' | 'prev' | 'restart' | 'done' | 'done_exercise'\n}, '*');\n```\n\nAction strings are matched literally - use `prev` (not `previous`). `next`/`prev` advance whole segments, or step exercises within a class/multi-exercise block when one is active. `done` jumps to the outro; `done_exercise` marks the current rep-based exercise complete (no-op otherwise). Unknown actions are ignored.\n\n**Host chrome / orientation (optional):**\n\n```javascript\n// Host → player: app chrome hidden / full-viewport stage (player may tighten padding)\nplayerIframe.contentWindow.postMessage({\n  type: 'HYPERHUMAN_HOST_IMMERSIVE',\n  immersive: true\n}, HYPERHUMAN_PLAYER_ORIGIN);\n```\n\nSame security model as the JSON receiver: payload-shape validated, origin-open for CAST. Prefer an explicit `targetOrigin` for `HYPERHUMAN_HOST_IMMERSIVE`. Do not transmit secrets.\n\n#### Outbound events (player → your page)\n\nThe player posts these messages to its parent (`window.parent`) when framed. They are display/relay only - they never drive navigation, and you do not have to handle them (except `HYPERHUMAN_ORIENTATION_TOGGLE` if you want rotate-lock).\n\n| Message | When | Payload |\n|---------|------|---------|\n| `'hyperhumanPlayerReadyForData'` | Player is ready for the `HYPERHUMAN_EMBED_INIT` envelope (string literal). | - |\n| `CAST_STATE` | Active section or class chapter changes. | `{ type: 'CAST_STATE', exerciseName?, chapterIndex?, chapterCount?, chapterName? }` |\n| `HYPERHUMAN_SESSION_EVENT` | **Pre-built + `host` mode only.** Session lifecycle. | `{ type: 'HYPERHUMAN_SESSION_EVENT', event, workoutId?, progressSeconds? }` where `event` is `started` / `progress` / `paused` / `resumed` / `completed` / `ended`. Your backend owns the actual session API calls; these are relay only. |\n| `HYPERHUMAN_ORIENTATION_TOGGLE` | In-player **Rotate** could not lock orientation inside the iframe (typical cross-origin). | `{ type: 'HYPERHUMAN_ORIENTATION_TOGGLE', orientation: 'portrait' \\| 'landscape' }`. Host should enter immersive/fullscreen if needed, then `screen.orientation.lock(orientation)`. Free device rotate still works if you ignore this. |\n\n> **Portrait & music (player behavior):** Landscape clips letterbox to 16:9 with bands in portrait (not cover-crop). PulseMix music-off **pauses** background audio (`HTMLMediaElement.pause` + `muted`) — do not rely on `volume = 0` in custom hosts either; iOS/WebKit ignores volume. Workout pause always stops BGM. Music controls are hidden when `mixBgMusic` is false or `videoAudioMode` is `none`.\n\n---\n\n## HyperCast connect & control (cast to TV)\n\nTurn any TV showing the org-branded member web `https://member.hyperhuman.cc/cast?orgId=...` page into a workout display, and your app into the remote. The display page renders a QR code and a 6-digit pairing code (sessions last **80 minutes**) and **owns session create/terminate**. Your controller app joins with the code and drives playback over plain REST — the server relays every command to the display. Cast routes count as **1x**. In the explorer these operations are grouped under **`workouts-cast`**.\n\nAll endpoints live under `/v1/cast/pairing` and use the standard `X-Api-Key` header. A **team-scoped key** may only create or join sessions bound to its own organization (`403` otherwise).\n\n**Controller flow (your app):**\n\n1. **Join** — `POST /v1/cast/pairing/join-by-code` with `{ pairingCode, deviceInfo: { deviceId, deviceName, deviceType } }` (or `POST .../join` with the `sessionId` + `code` parsed from the QR URL `https://member.hyperhuman.cc/cast?sessionId=...&code=...`). Generate an opaque `deviceId` and reuse it. One controller per session: joining disconnects any previously paired device. Do **not** call `POST .../session` from a controller.\n2. **Load a workout** — `POST .../{sessionId}/workout` with `{ workoutId, deviceId, locale? }`. The display loads the embed player. Omit deprecated `workoutData`. The workout must be created or published (same as `GET /v1/workouts/{id}`).\n3. **Start playback** — `POST .../{sessionId}/workout/start`. Optional `endUserId` / `externalUserId` / `organizationId` (same field names as workout sessions) create a real trainee workout session with history, stats, and program adaptation. Attribution uses the **API key + those fields only** — a member Bearer token does **not** attribute a cast session. The end user must be an active member of that organization (`404` otherwise, and playback does not start). Omit the fields for anonymous. `done` later completes **this** session; do not open a second `sessions/start` to record completion.\n4. **Control** — `POST .../{sessionId}/workout/control` with `action`: `play` | `pause` | `next` | `prev` | `restart` | `done_exercise` | `done`. `done` completes the workout. Show **Done exercise** only when status reports `currentExerciseIsRepBased: true`.\n5. **Status** — `GET .../{sessionId}/workout/status` returns the authoritative playback snapshot (state, exercise index, rep/duration info, class chapter cursor) for polling when you skip realtime.\n6. **Unpair** — `POST .../{sessionId}/device/disconnect`. Playback keeps running on the TV; another device can rejoin with the same code. Do not `DELETE .../session/{id}` from a controller.\n\n**Realtime status (optional):** use `socketIO.fullUrl` from the join response (namespace `/cast/pairing`) with handshake `auth: { apiKey: '<your key>' }` and listen for `device-paired`, `device-disconnected`, `workout-cast`, `workout-session-started`, `workout-state-changed`, and `workout-progress-changed` (live class-chapter cursor reported by the display). `pairing-success` is `{ sessionId, displayName }` (no device — that arrives on `device-paired`). Emit `heartbeat` with `{ sessionId, deviceId }` every 30 seconds. After a socket drop, poll `GET .../{sessionId}/workout/status`. An idle or disconnected controller frees the pairing slot but never interrupts TV playback.\n\n---\n\n## Branded library embed (workouts and programs)\n\nBranded, responsive **library pages**: a searchable grid of your team's workouts or multi-week programs, hosted on the **member web app** (not the Content API origin in `https://content.api.hyperhuman.cc`). Visitors browse and open workouts without you building a catalog UI. There is **no API key in the URL** — access and visibility follow your org's member-app and publishing settings.\n\nIn [Hyperhuman Teams](https://team.hyperhuman.cc), open **Share** on **Manage Content** (workouts or programs) and use the **Embed page** tab to copy a snippet and toggle options; the same query contract is documented here for hand-built URLs.\n\n### Base URL\n\nHost: `https://member.hyperhuman.cc` (production default `https://member.hyperhuman.cc`). Your team may use a different host in white-label deployments — use the member app URL shown in Teams when copying the embed.\n\n### Paths\n\n| Surface | Path |\n|---------|------|\n| Workout library grid | `/workouts` |\n| Program library grid | `/plans` |\n\nAlways pass `orgId` (your organization id, same value as `{organizationId}` in Content API paths).\n\n### Query parameters\n\nOnly **non-default** options are serialized on the URL (short, readable links). Defaults match the Teams **Embed page** UI.\n\n| Param | Required | Type | Default | When it appears in the URL |\n|-------|----------|------|---------|----------------------------|\n| `orgId` | yes | string (24 hex chars) | - | Always. |\n| `showSearch` | no | boolean | `true` (search bar on) | Only as `showSearch=false` when the search bar is hidden. |\n| `showFilters` | no | boolean | `true` (filter chips on) | Only as `showFilters=false` when filters are hidden. |\n| `gridCols` | no | integer, one of 2, 3, or 4 | `3` | Only when not `3` (e.g. `gridCols=2` or `gridCols=4`). |\n| `playbackMode` | no | string | `overlay` | Only when `dedicated-page`. Default `overlay` opens playback in a lightbox over the embed; `dedicated-page` opens the workout in a **new browser tab** so the host page stays in place. |\n| `showDuration` | no | boolean | `true` (length badge on cards) | Only as `showDuration=false` when hidden. |\n| `showDifficulty` | no | boolean | `true` (difficulty badge on cards) | Only as `showDifficulty=false` when hidden. |\n\n### Iframe snippet\n\nThe Teams **Embed page** tab generates a container-filling iframe (your page controls the outer box size):\n\n```html\n<iframe width=\"100%\" height=\"100%\" src=\"MEMBER_APP_URL_AND_QUERY\" title=\"Your team title\" frameborder=\"0\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>\n```\n\nReplace `MEMBER_APP_URL_AND_QUERY` with the full `https://member.hyperhuman.cc/workouts?...` or `https://member.hyperhuman.cc/plans?...` URL from Teams or built from the table above.\n\n### Examples\n\n**Workouts grid** — search and filters off, 2 columns, open in new tab, length and difficulty badges off:\n\n```html\n<iframe width=\"100%\" height=\"100%\" src=\"https://member.hyperhuman.cc/workouts?orgId=507f1f77bcf86cd799439011&showSearch=false&showFilters=false&gridCols=2&playbackMode=dedicated-page&showDuration=false&showDifficulty=false\" title=\"Your Team's Workouts\" frameborder=\"0\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>\n```\n\n**Programs grid** — same options with 4 columns:\n\n```html\n<iframe width=\"100%\" height=\"100%\" src=\"https://member.hyperhuman.cc/plans?orgId=507f1f77bcf86cd799439011&showSearch=false&showFilters=false&gridCols=4&playbackMode=dedicated-page&showDuration=false&showDifficulty=false\" title=\"Your Team's Programs\" frameborder=\"0\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>\n```\n\n### API parity\n\nTo drive the same catalogs from your own UI, use the Content API:\n\n- `GET /v1/orgs/{organizationId}/workouts` — list and filter **workspace** workouts (query params such as `limit`, `q`, `sort`, `visibility`, `difficulty`, `categoryIds`, `tags`, duration filters; advance via `links.next`; no `page` — see [AGENTS.md](https://content.api.hyperhuman.cc/AGENTS.md) section 4). Does not include platform stock templates until they are added in Teams.\n- `GET /v1/orgs/{organizationId}/plans` — list and filter **workspace** plans (e.g. `difficulties`, `goalIds`, `tags`, `durationInWeeks`, `workoutsPerWeek`). Same add-first rule for pre-made stock programs.\n\n---\n\n## Custom Interactive Workout Player\n\nFor full UI control, build your own player on top of the public API. The contract is small:\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /v1/workouts/{workoutId}` | Workout metadata (name, duration, difficulty, `videoAudioMode`, `mixBgMusic`). |\n| `GET /v1/workouts/{workoutId}/playlist?locale={locale}` | Ordered segments with media and timing. Drives the player. Video/audio `url` = presigned MP4/M4A (~7d) — play the string **verbatim** (no API key on the media request, no query rewrite; Range allowed). Exercise/class/multi/promo/educational `poster`/`thumbnail` = public unsigned S3 JPEG (not the MP4; intro/outro omit poster). For `exercise`, `duration` is the planned work window — loop the (often shorter) MP4 until that clock elapses (`main.video.loop: -1`). |\n| `GET /v1/workouts/{workoutId}/music` | Shuffled PulseMix pool for a **persisted** workout id (pre-signed URLs, ~7-day expiration; same verbatim-play contract as playlist video). Not used by the JSON-receiver embed. Empty pool returns `200` with `tracks: []`. Gate playback on `videoAudioMode`/`mixBgMusic`. |\n\nThe full reference implementation - playlist manager, media controller, progress tracker, navigation handler, audio policy compliance - lives in the [Custom Player Guide](https://content.api.hyperhuman.cc/docs/guides/custom-player.md). It mirrors the Hyperhuman first-party players byte-for-byte and is the recommended starting point if you ship your own UX.\n\n### Audio Policy\n\nEach workout has a `videoAudioMode` (see `GET /v1/workouts/{workoutId}`) that controls which audio tracks the player must mix. Mirror this matrix exactly so your custom player matches the rendered MP4 export and the Hyperhuman first-party players byte-for-byte.\n\n| `videoAudioMode` | Voice instructions | Beeps / countdowns | Background music* |\n|-------------------|---------------------|--------------------|-------------------|\n| `full` (default) | yes | yes | yes |\n| `instructionsOnly` | yes | no | yes |\n| `beepsOnly` | no | yes | yes |\n| `none` | no | no | no |\n\n\\* Background music is additionally gated by the workout's `mixBgMusic` flag - if `mixBgMusic` is `false`, music never plays regardless of `videoAudioMode`.\n\n```javascript\n// Reference snippet - matches backend export pipeline 1:1.\nconst shouldIncludeVoiceInstructions = (mode) =>\n  mode === undefined || mode === 'full' || mode === 'instructionsOnly';\n\nconst shouldIncludeBeeps = (mode) =>\n  mode === undefined || mode === 'full' || mode === 'beepsOnly';\n\nconst shouldIncludeBackgroundMusic = (mode, mixBgMusic) =>\n  mode !== 'none' && (mixBgMusic ?? true);\n```\n\n---\n\n## Localization\n\n**Supported locales (18):** `en-US`, `en-GB`, `en-AU`, `fr-FR`, `de-DE`, `es-ES`, `it-IT`, `pt-PT`, `he-IL`, `ro-RO`, `cs-CZ`, `fi-FI`, `lt-LT`, `nl-NL`, `pl-PL`, `ar-XA`, `nb-NO`, `sv-SE`.\n\n```bash\ncurl 'https://content.api.hyperhuman.cc/v1/workouts/{workoutId}?locale=fr-FR' \\\n  -H 'X-Api-Key: YOUR_API_KEY'\n```\n\nLocalizes: workout titles and descriptions, exercise names, equipment, muscle groups, player metadata, and audio guidance (where enabled). Category, goal, and equipment names on the metadata routes follow the same fallback. Rows added 2026-10-24 (including Reformer, Sled, Ski Erg, Weighted Vest, and Wall Ball) have all 18 names. Older category, goal, and equipment rows have 11, so `lt-LT`, `pl-PL`, `ar-XA`, `nb-NO`, and `sv-SE` show English for those older names. In some environments Scarf box, Massage ball, and Towel have no translations.\n\n**AI generate** (`POST .../workouts/generate`, `POST .../plans/generate`): pass optional body `\"locale\": \"fr-FR\"`. Returns additive `nameTranslations` (workout) or `nameTranslations` + `descriptionTranslations` (plan), plus `*Localized` fields. Legacy English fields unchanged. Invalid locale → `400`. Plan translation maps are persisted — `GET /v1/plans/{id}?locale=fr-FR` returns resolved top-level name/description.\n\n#### Fallback Behavior\n\n| Endpoint family | Behavior when locale is unsupported |\n|-----------------|-------------------------------------|\n| Metadata, workout details, playlist (text + voice cues) | Falls back to English so playback never breaks. |\n| AI generate (`POST .../workouts/generate`, `POST .../plans/generate`) | Returns **`400 BadRequest`** (`Unsupported locale: ...`). Send `nb-NO` (not `no` / `no-NO`) for Norwegian. |\n| Pre-rendered video / audio exports (`/export/...`) | Returns `404` if no rendered asset exists in the requested locale. Re-request with `locale=en-US`, or trigger an export job for the missing locale. |\n\n---\n\n## Authentication\n\nAdd to all requests:\n\n```\nX-Api-Key: YOUR_API_KEY\n```\n\nGet your key: [team.hyperhuman.cc/settings?tab=integrations](https://team.hyperhuman.cc/settings?tab=integrations).\n\nA handful of end-user-scoped endpoints (for example workout sessions and feedback) additionally accept a member `Authorization: Bearer <token>` header in addition to the API key. The OpenAPI spec marks these explicitly with `bearer` security.\n\n---\n\n## Complete API Workflows\n\n### Workflow 1: Browse and play pre-built content\n```\n1. GET /v1/workouts/metadata             -> categories and filters\n2. GET /v1/orgs/{organizationId}/workouts -> browse the library\n3. GET /v1/workouts/{workoutId}           -> workout details\n4. GET /v1/workouts/{workoutId}/playlist  -> video segments\n5. (optional) GET /v1/workouts/{workoutId}/music         -> background music\n6. (optional) POST /v1/workouts/{workoutId}/sessions/start -> track progress\n```\n\n### Workflow 2: Recommend a library workout (quiz → curated match)\n```\n1. Map quiz / profile answers → endUserProfileDetails (age, fitnessLevels, equipment, …)\n2. POST /v1/orgs/{organizationId}/workouts/recommend      -> ranked library workouts\n3. Pick a returned workout id\n4. GET  /v1/workouts/{workoutId}                          -> details (incl. videoAudioMode, mixBgMusic)\n5. GET  /v1/workouts/{workoutId}/playlist                 -> segments for custom player\n   or embed /embed/workout/{workoutId}                   -> Pre-built Workout iframe\n6. (optional) GET /v1/workouts/{workoutId}/music          -> PulseMix tracks (persisted id only)\n7. (optional) sessions/start → PATCH progress → sessions/complete or sessions/end → feedback\n   Active program: send programPosition (positionInPlan) on start, end, and complete\n```\n\n### Workflow 3: AI-generated workout (ephemeral JSON)\n```\n1. GET  /v1/workouts/metadata                              -> category IDs\n2. POST /v1/orgs/{organizationId}/workouts/generate        -> ephemeral JSON (no top-level id; optional body locale)\n     Free-text field is userRequirements (not userGuidance). HTTP client timeout ≥ 120s.\n     Optional methodologyProfileId from GET /v1/orgs/{organizationId}/methodologies (opt-in).\n     Constrained empty exerciseSources (no free_stock, 0 clips) → 400; omit/empty defaults to free+premium\n     Optional 1x POST .../workouts/generate/preflight first if you want a feasibility check\n3. Store the returned structure if you need to replay later. Persist methodology / inspection\n     (Generation Inspector) if you need an audit trail — there is no GET-by-generation-id\n4. iframe /embed/workout-json-receiver?organizationId=...  -> wait for hyperhumanPlayerReadyForData\n5. postMessage HYPERHUMAN_EMBED_INIT { apiKey, workout }   -> player calls GET /v1/video-asset/{exerciseId}?locale= per exercise (iframe locale, else en-US)\n   or build a custom player from instances[] + GET /v1/video-asset/{id}\n6. Do NOT call /playlist, /music, or sessions/feedback for this response — those need a persisted workout id\n```\n\nTo keep the result, send `\"addToTeamContent\": true` (needs `categoryId`; optional `visibility`, default `private`). The workout is saved to your library as your team manager and the response adds its `id`, so Workflow 1 playback works. Save checks (organization key, team manager, plan features, content minutes) run before generating. Same 10x call.\n\n### Workflow 3b: Build your library from code\n```\n1. GET  /v1/workouts/metadata                              -> category ids\n2. GET  /v1/orgs/{organizationId}/video-assets  (or .../stock-exercises) -> exercise ids\n3. POST /v1/orgs/{organizationId}/workouts                 -> 201, saved workout (same body as GET /v1/workouts/{id})\n     instances[] = generate field names: kind, exercise.id, reps or durationSeconds, optional pace / weightLevel / rpe / amrap / skipIntro\n     (send only these fields — extra keys from a generate body such as id or exercise.name → 400)\n     ≥2 exercises, start and end with an exercise, max 100 exercises and 90 minutes, enough content minutes\n     name 3–150 characters, 1–2 categories, reps 1–100, durationSeconds 5–1830 per exercise or rest\n4. GET  /v1/plans/metadata                                 -> goal ids\n5. POST /v1/orgs/{organizationId}/plans                    -> 201, saved program (1–2 goalIds, 2–168 workoutIds, 1–24 weeks, 1–7 per week, description up to 600 characters)\n6. PATCH / DELETE .../workouts/{workoutId} and .../plans/{planId} to edit or remove (a workout in a program → 409)\n```\nEvery write runs as your team manager, needs your **organization API key** (shared app keys → 403), defaults to `private`, and counts **1x**. Unknown or other-organization ids are 404. Writes are not idempotent: after a `POST` timeout, list with `sort=-createdAt` before retrying.\n\n### Workflow 4: AI adaptation (evolve existing content)\n```\nWorkout adapt (ephemeral JSON — same playback as Workflow 3):\n1. GET  /v1/orgs/{organizationId}/workouts                            -> pick a base workout\n2. POST /v1/orgs/{organizationId}/workouts/{workoutId}/adapt          -> { name, instances[], ... } (no top-level workout id)\n     Free-text field is userGuidance (not userRequirements). HTTP client timeout ≥ 120s.\n3. Play via JSON receiver or custom player; do NOT call /playlist or /music on a synthetic id\n\nPlan adapt (persisted program — endUserProfileId required):\n1. POST /v1/orgs/{organizationId}/plans/{planId}/adapt\n     body includes endUserProfileId + endUserProfileDetails + workoutSources + optional userGuidance\n     -> adapted program with id (400 if endUserProfileId omitted)\n2. Store returned id; retrieve with GET /v1/plans/{id} and .../workouts\n   Active enrollment for that user → next workout slot only; else full future schedule\n```\n\n> The source `{workoutId}` / `{planId}` must belong to `{organizationId}`. Adapting content that is not part of your organization returns `404`.\n\n### Workflow 5: Multi-week training programs\n```\n1. GET  /v1/plans/metadata                                -> plan goals and difficulties\n2. POST /v1/orgs/{organizationId}/plans/generate          -> create multi-week plan (optional body locale)\n     Include endUserProfileDetails.endUserId to receive a persisted member plan id,\n     or addToTeamContent: true to save it to your team library (not both)\n     Optional methodologyProfileId from GET /v1/orgs/{organizationId}/methodologies (opt-in)\n   OR POST .../plans/recommend                            -> pick an existing library plan\n3. If generate returned id: store it; use nameTranslations / descriptionTranslations on the response\n     Persist methodology / inspection from generate if you need the Generation Inspector snapshot\n     (not replayed on GET /v1/plans/{id})\n4. GET  /v1/plans/{planId}?locale=fr-FR                   -> localized plan (only when you have a persisted id)\n5. GET  /v1/plans/{planId}/workouts                       -> ordered workouts (no per-item week field)\n6. Derive week N from durationInWeeks × workoutsPerWeek and array order\n   OR use end-user active plan: currentWeekNumber + .../plans/active/progress (positionInPlan)\n7. For each persisted workout: follow Workflow 2 from step 4.\n```\n\nAssigning a program to a member's library (`POST .../endusers/{endUserId}/plans/assign`) does **not** enroll them. Call `POST .../plans/start` when they should begin the program. Omitted `dropMissedAtWeekEnd` skips unfinished slots in fully elapsed weeks before `currentWeekNumber`, without a completion. That week stays due after the plan length. A later week still drops once it has elapsed. With `dropMissedAtWeekEnd` `false`, nothing new drops; when only skipped slots are left, the first one in the latest unfinished week is due again and `schedule.programFinished` stays `false` until every slot is completed. `POST .../plans/active/slots/{position}/skip` skips any open slot, including one after the due workout. It does not write a completion and does not send a push or email. Progress reports `skipped` separately from `completed` and does not say who skipped the slot. The next insights digest for that local day may include highlight kind `slot_skipped`. A week-boundary drop does not. When a workout id appears more than once, send `programPosition` (`positionInPlan`) on `sessions/start`, `sessions/end`, and `sessions/complete` so that copy is the one that completes. Omit it and the earliest open matching slot is filled (a skipped copy only when no open copy is left). A completion of a skipped slot clears `skipped` for the slot that was filled. `sessions/end` below progress `0.1` does not fill a slot.\n\n### Workflow 6: End-user library (assign / unassign)\n```\n1. GET  /v1/orgs/{organizationId}/workouts  (or /plans)     -> pick published public/private ids\n2. POST /v1/orgs/{organizationId}/endusers/{endUserId}/workouts/assign\n   body: { workoutIds: [\"...\"] }  (max 10; optional sendAssignmentEmail / sendAssignmentPush, default true)\n3. POST /v1/orgs/{organizationId}/endusers/{endUserId}/plans/assign\n   body: { planIds: [\"...\"] }  (max 5; does not set isActive)\n4. GET  /v1/orgs/{organizationId}/endusers/{endUserId}/workouts  -> this org's published assigned workouts\n   GET  /v1/orgs/{organizationId}/endusers/{endUserId}/plans     -> this org's catalog programs in the library\n5. POST .../workouts/unassign  ·  POST .../plans/unassign     -> remove org-owned access (idempotent)\n```\n\nTarget must be an **active** member (404 otherwise). Team API key only. **Assign:** any ineligible id → 400 and no writes (published public/private org catalog). **Unassign:** missing or other-org ids are ignored (not 400); retired org content can still be removed. Unassigning the active plan **deletes** the access row (enrollment ends). That is not `POST .../plans/{planId}/end`, which only clears `isActive`. `POST .../plans/start` enrolls and does not require a prior assign.\n\n### Workflow 7: End-user governance (B2B lifecycle)\n```\n1. GET  /v1/orgs/{organizationId}/endusers          -> list users\n2. POST /v1/orgs/{organizationId}/endusers/invite   -> add new users\n3. GET  /v1/orgs/{organizationId}/endusers/find     -> check user status\n4. PUT  /v1/orgs/{organizationId}/endusers/suspend  -> temporarily disable access\n5. PUT  /v1/orgs/{organizationId}/endusers/reactivate -> restore access\n6. DELETE /v1/orgs/{organizationId}/endusers        -> remove user permanently\n```\n\n### Workflow 8: Daily insights and re-engagement\n```\n1. (optional) POST /v1/orgs/{organizationId}/endusers/{endUserId}/insights/health-data\n   -> push your own health data (activity/sleep/steps/body/heart_rate/hydration/oxygenation/scores;\n      max 50 entries; always 200 - check per-entry results; idempotent on (dataType, externalId))\n2. (optional) POST /v1/orgs/{organizationId}/endusers/{endUserId}/nutrition/log\n   -> log meals (caloriesKcal/proteinG/carbsG/fatG; externalId = idempotent replace + DELETE support)\n3. GET /v1/orgs/{organizationId}/endusers/{endUserId}/insights/digest?date=2026-04-20T00:00:00.000Z\n   -> 3-5 pillar summaries + todaysFocus + dataCompleteness (reflects pushed data)\n      + highlights[] signals (additive kinds - render unknown ones generically)\n      + optional readiness / week / variant / shareText for a Today header\n4. GET /v1/orgs/{organizationId}/endusers/{endUserId}/insights/pillars/{pillarType}\n   -> drill-down for any pillar (health_pulse, training, recovery, movement, nutrition, body)\nCorrections: re-POST the same externalId, or DELETE .../insights/health-data/{dataType}/{externalId}\n             and DELETE .../nutrition/log/{externalId}\n```\n\n---\n\n## Webhooks\n\nCompletions, program progress and daily signals, pushed to your server as they happen. No polling. Works for every surface: your own player, the pre-built embed, Hyperhuman Club, the member web app and HyperCast.\n\n### Events\n\n| Type | Fires when | Use it for |\n| --- | --- | --- |\n| `workout_session.completed` | A session closes: `sessions/complete`, `sessions/end`, feedback on an open session (with or without `keepProgress`), or HyperCast **done** | Leaderboards, streaks, \"workout done\" nudges, CRM sync |\n| `plan.started` | `plans/start` enrolls a member (new enrollment, earlier plan re-activated, or `restart: true`) | Onboarding journeys, challenge sign-up |\n| `plan.progress_updated` | A session fills a program slot, or a member skips a slot | Progress bars, \"behind this week\" nudges |\n| `plan.completed` | That change finishes the program (every slot completed or skipped) | Certificates, rewards, next-program upsell |\n| `insights.digest_ready` | The member's daily digest for today is built (once per member-local day) | Streak-at-risk and personal-best nudges, weekly recaps |\n\nNot sent: a session that `sessions/start` closes because a newer one started; unfinished slots that drop at week end (`dropMissedAtWeekEnd`) — the next `plan.progress_updated` snapshot counts them. `insights.digest_ready` fires the first time today's digest is built: the morning push for app members, otherwise the first `GET .../insights/digest` of the day.\n\n### Payload\n\n```json\n{\n  \"id\": \"evt_6721f0c4a1b2c3d4e5f60718\",\n  \"type\": \"workout_session.completed\",\n  \"apiVersion\": \"2026-11\",\n  \"occurredAt\": \"2026-10-29T18:42:11.000Z\",\n  \"organizationId\": \"63415bf67a9c7000126616c1\",\n  \"endUser\": { \"endUserId\": \"6650aa000000000000000000\", \"externalUserId\": \"crm-12345\" },\n  \"data\": {\n    \"sessionId\": \"6721bb000000000000000000\",\n    \"workoutId\": \"66a1dd000000000000000000\",\n    \"workoutName\": \"Upper Body Power\",\n    \"startedAt\": \"2026-10-29T18:10:02.000Z\",\n    \"endedAt\": \"2026-10-29T18:42:11.000Z\",\n    \"progressSeconds\": 1890,\n    \"completionPercent\": 100,\n    \"endReason\": \"complete\",\n    \"surface\": \"embed\",\n    \"plan\": { \"planId\": \"66b2cc000000000000000000\", \"positionInPlan\": 7 }\n  }\n}\n```\n\n- `id` is the dedupe key (also the `webhook-id` header). `endUser` is `null` for anonymous sessions.\n- Events go to the organization the activity belongs to: your key's organization, the `organizationId` sent with the session, or the member's only organization. A member of several organizations with no organization on the call produces no event.\n- `workout_session.completed`: `endReason` is `complete` (100%) or `end` (kept last progress: `sessions/end`, feedback with `keepProgress: true`, or HyperCast **done** with the progress the controller reported). One event per session: feedback after `sessions/end` sends no second one. `surface` is `api`, `embed`, `club`, `member_web` or `cast`. `plan` is `null` unless the session filled a slot of the active program (progress `>= 0.1`). Most leaderboards count `completionPercent >= 80`.\n- `plan.*`: `planId`, `planName`, `progress` (`completedWorkouts`, `skippedWorkouts`, `totalWorkouts`, `completionPercentage`, `currentWeekNumber`, `durationInWeeks`, `workoutsPerWeek`). `plan.progress_updated` adds `change` (`kind`: `slot_completed` | `slot_skipped`, `positionInPlan`, `sessionId`). `progress` is a full snapshot: keep the newest `occurredAt`.\n- `insights.digest_ready`: `date`, `timeZone`, `variant`, `week` (`completed`, `planned`, `status`, `daysRemaining`, `weeklyStreakWeeks`) and `highlights[]` (`kind`, `copyKey`, `priority`, `celebration`). Key your own copy on `copyKey`, or fetch the digest (10x) for text.\n\n**Privacy:** ids only, never email or name. No health values, no cycle data. Digest highlights are training signals only (streaks, records, milestones, program, pacing); sleep, heart, body, nutrition and pain signals stay in the digest. A removed end user stops producing events.\n\n### Verify every request\n\nSigned with [Standard Webhooks](https://www.standardwebhooks.com/). Headers: `webhook-id`, `webhook-timestamp`, `webhook-signature` (`v1,<base64 HMAC-SHA256 of id.timestamp.body>`, key = your `whsec_` secret). Use the official library and the raw body:\n\n```js\n// npm i standardwebhooks\nimport { Webhook } from 'standardwebhooks';\nconst wh = new Webhook(process.env.HYPERHUMAN_WEBHOOK_SECRET); // whsec_...\n\napp.post('/hyperhuman/webhooks', express.raw({ type: 'application/json' }), async (req, res) => {\n  let event;\n  try {\n    event = wh.verify(req.body.toString('utf8'), req.headers); // checks signature + 5 min timestamp window\n  } catch {\n    return res.sendStatus(400);\n  }\n  res.sendStatus(200); // answer first, work after\n  if (await seen(event.id)) return; // at-least-once: dedupe on id\n  await handle(event);\n});\n```\n\n```python\n# pip install standardwebhooks\nfrom standardwebhooks.webhooks import Webhook\nwh = Webhook(os.environ[\"HYPERHUMAN_WEBHOOK_SECRET\"])\nevent = wh.verify(request.get_data(as_text=True), dict(request.headers))\n```\n\n### Delivery\n\n- **At least once**, **no order guarantee**. Dedupe on `id`; apply snapshots by newest `occurredAt`.\n- **10 s** to answer with a 2xx. Redirects are not followed (3xx is a failure).\n- **Retries** after 5 min, 30 min, 2 h, 5 h, 10 h, then every 12 h, for up to 3 days.\n- **Failing endpoint:** when retries run out after about 3 days with no successful delivery, it is turned off and team managers get an email. A `410 Gone` turns it off at once. Turn it back on with `PATCH ... { \"status\": \"enabled\" }`.\n- **HTTPS only**, public addresses only (private, loopback and link-local are refused at save and at send).\n- **Quota:** each delivery attempt counts **1x** on your Content API limits. When a limit is used up, deliveries wait for the reset. Nothing is dropped.\n\n### Manage\n\nSettings → Integrations → **Webhooks** in Hyperhuman Teams (managers), or the API (tag `endusers-webhooks`, all **1x**):\n\n| Method | Path | Does |\n| --- | --- | --- |\n| `POST` | `/v1/orgs/{organizationId}/webhooks` | Create: `url`, `events[]` (or `[\"*\"]`), optional `description`. Returns `secret` once |\n| `GET` | `/v1/orgs/{organizationId}/webhooks` | List endpoints |\n| `GET` | `/v1/orgs/{organizationId}/webhooks/{webhookId}` | One endpoint, status, last delivery |\n| `PATCH` | `/v1/orgs/{organizationId}/webhooks/{webhookId}` | Change `url`, `events`, `description`, `status`; `rotateSecret: true` returns a new secret (old one stops at once) |\n| `DELETE` | `/v1/orgs/{organizationId}/webhooks/{webhookId}` | Remove |\n| `POST` | `/v1/orgs/{organizationId}/webhooks/{webhookId}/test` | Send a signed sample `type` now; returns your status code |\n| `GET` | `/v1/orgs/{organizationId}/webhooks/{webhookId}/deliveries` | Attempts, last status, next retry |\n| `GET` | `/v1/orgs/{organizationId}/events` | Catch-up feed: every event of the last 30 days, oldest first. Filters `type`, `endUserId`, `since` |\n\n10 endpoints per organization. Unknown event types return `400`. Events are recorded from the moment your organization has its first endpoint.\n\n### Recipe: a 4-week streak challenge\n\nLeaderboards, streaks and nudges, your rules, your brand, on your data.\n\n1. **Enroll:** `POST .../endusers/invite` with `externalUUID`, build a 4-week, 3-per-week program in Teams, then `POST .../endusers/{endUserId}/plans/start`.\n2. **Capture completions:** subscribe to `workout_session.completed` (every surface). Count `completionPercent >= 80`.\n3. **Streak:** consecutive weeks with at least 3 completions in the member's time zone, or read `week.weeklyStreakWeeks` from `insights.digest_ready`.\n4. **Leaderboard:** completions per member in the challenge window, shown with your own display names (opt-in only).\n5. **Nudges:** `insights.digest_ready` highlights with `copyKey` `streak_at_risk.*` → your push.\n6. **Finish line:** `plan.completed`.\n\n```js\n// Weekly streak: consecutive weeks (Monday start, UTC) with >= target completions, counting back from this week.\nfunction weeklyStreak(completedAtIsoList, target = 3, now = new Date()) {\n  const weekStart = (d) => { const x = new Date(d); x.setUTCHours(0, 0, 0, 0); x.setUTCDate(x.getUTCDate() - ((x.getUTCDay() + 6) % 7)); return x.getTime(); };\n  const perWeek = new Map();\n  for (const iso of completedAtIsoList) perWeek.set(weekStart(iso), (perWeek.get(weekStart(iso)) || 0) + 1);\n  let week = weekStart(now);\n  if ((perWeek.get(week) || 0) < target) week -= 7 * 864e5; // this week still in progress\n  let streak = 0;\n  while ((perWeek.get(week) || 0) >= target) { streak += 1; week -= 7 * 864e5; }\n  return streak;\n}\n```\n\n---\n\n## Error Handling\n\n### Common HTTP Status Codes\n\n| Code | Meaning | Common Causes | How to Handle |\n|------|---------|----------------|---------------|\n| **200** | Success | Request completed successfully (includes AI recommend/generate/adapt) | Continue normal flow |\n| **201** | Created | Resource created (e.g. session start, enduser invite, chat create, autopilot/social-publish create) | Extract ID from response |\n| **400** | Bad Request | Invalid query/path parameters, malformed JSON body, or request validation failure | Check request body and parameters. Field-level validation failures use `error.code` = `ValidationError` with `error.details[]` populated (see below) |\n| **401** | Unauthorized | Missing, malformed or invalid API key (`X-Api-Key` header) | Verify the API key is sent on every request |\n| **403** | Forbidden | Valid API key, but not authorized for the requested organization, or the plan lacks a required entitlement (e.g. stock catalog) | Check org ownership and plan features. Do not retry a plan-gated stock-catalog 403 (it does not consume quota) |\n| **404** | Not Found | Resource doesn't exist, was deleted, or the requested locale variant has not been rendered yet (export endpoints) | Verify IDs; for exports, retry without `locale` or with `locale=en-US` |\n| **409** | Conflict | Resource already exists (e.g. active session) or state transition not allowed | Reconcile against current state before retrying |\n| **422** | Unprocessable Entity | Request is well-formed but a business rule blocks it (e.g. activating a social-publish schedule with no connected accounts for the target platforms). Carries a human-readable `error.message`; `error.details` is not populated | Resolve the precondition described in `error.message`, then retry |\n| **429** | Too Many Requests | Hourly or daily rate limit exceeded (see headers below) | Stop; honor `Retry-After` when present (it takes precedence), then `X-RateLimit-Reset` |\n| **500** | Internal Server Error | Server-side issue | Retry with exponential backoff |\n\n### Error Response Format\n\nEvery non-2xx response is wrapped in a single `error` envelope. The body is always JSON, even when the failing endpoint normally returns `text/plain` (e.g. stream URL endpoints).\n\n```json\n{\n  \"error\": {\n    \"code\": \"ValidationError\",\n    \"message\": \"ValidationError\",\n    \"target\": \"GetUserDigestQuery\",\n    \"details\": [\n      {\n        \"code\": \"ConstraintError\",\n        \"message\": \"date must be a ISOString\",\n        \"target\": \"date\"\n      }\n    ]\n  }\n}\n```\n\nField-level validation failures (query, path, or body) return **HTTP 400** with `error.code` = `ValidationError`. `error.target` is the DTO name and each `error.details[].code` is `ConstraintError`. Business-rule failures use the status-mapped code instead (e.g. `422` -> `UnprocessableEntity`, `409` -> `Conflict`) with a plain `error.message` and no `details`.\n\n| Field | Type | Always present | Notes |\n|-------|------|----------------|-------|\n| `error.code` | string | yes | A stable machine-readable identifier from the closed enum below. Switch on this - never on `message`. |\n| `error.message` | string | yes | Human-readable English summary. Suitable for logs; not for end-user UI. |\n| `error.target` | string | no | The primary field/parameter related to the overall error (e.g. `requestBody`, `workoutId`). |\n| `error.details` | array | no | Field-level breakdown - populated for `400 ValidationError` responses (each item `code` is `ConstraintError`) and entity-not-found errors. Each item has `code`, `message`, and optional `target`. |\n\n#### Stable error codes\n\n| HTTP status | `error.code` |\n|-------------|----------------|\n| 400 | `BadRequest` or `ValidationError` (field validation, with `error.details[]`) |\n| 401 | `Unauthorized` |\n| 403 | `Forbidden` |\n| 404 | `NotFound` |\n| 405 | `MethodNotAllowed` |\n| 408 | `RequestTimeout` |\n| 409 | `Conflict` |\n| 410 | `Gone` |\n| 413 | `PayloadTooLarge` |\n| 415 | `UnsupportedMediaType` |\n| 422 | `UnprocessableEntity` |\n| 500 | `InternalServerError` |\n| 501 | `NotImplemented` |\n| 502 | `BadGateway` |\n| 503 | `ServiceUnavailable` |\n| 504 | `GatewayTimeout` |\n\n> Treat the `error.code` enum as the contract. `error.message` wording can change between releases.\n\n### Best Practices\n\n**Do:**\n- Always check HTTP status codes\n- Implement exponential backoff for 429/500 errors\n- Log error details for debugging\n- Provide user-friendly error messages\n- Handle network timeouts gracefully (generate/adapt: keep the HTTP client open at least **120 seconds**)\n\n**Don't:**\n- Ignore error responses\n- Retry immediately on all errors\n- Expose internal error details to users\n- Make requests without proper error handling\n\n### Retry Strategy\n\n```javascript\nconst retryWithBackoff = async (fn, maxRetries = 3) => {\n  for (let i = 0; i < maxRetries; i++) {\n    try {\n      return await fn();\n    } catch (error) {\n      if (error.status === 429 || error.status >= 500) {\n        const delay = Math.pow(2, i) * 1000;\n        await new Promise(resolve => setTimeout(resolve, delay));\n        continue;\n      }\n      throw error;\n    }\n  }\n  throw new Error('Max retries exceeded');\n};\n```\n\n---\n\n## Rate Limiting\n\nEvery authenticated response carries de facto `X-RateLimit-*` headers. Read the live values — do not hard-code a published number:\n\n```\nX-RateLimit-Limit:     <your plan's current window cap>\nX-RateLimit-Remaining: <units left in this window>\nX-RateLimit-Reset:     <unix timestamp when the window resets>\n```\n\n- `X-RateLimit-Limit` — Maximum **weighted units** per window for this API key\n- `X-RateLimit-Remaining` — Units remaining in the current window\n- `X-RateLimit-Reset` — Unix timestamp when the window resets\n- On **429**, the server also sends **`Retry-After`** (seconds). Honor `Retry-After` first (RFC 9110); then `X-RateLimit-Reset`\n\n**Your cap is plan-based.** Paid hourly/daily limits come from the team entitlement (and any scale pack). While the team Stripe subscription is **`trialing`**, those caps are reduced to **1/100** of the paid values (minimum 1 per window). Example: a Platform plan at 2500/hour and 50000/day becomes **25/hour** and **500/day** during trial. Always trust `X-RateLimit-Limit` over any sample number.\n\n**Per member:** when a request also sends a member bearer token (`Authorization: Bearer …`, as an app does for a signed-in member), it counts against that member's own hourly share too: **25%** of the key's hourly cap, at least 1,500 units. A member over their share gets **429** `Hourly rate limit exceeded for this user`; other members on the same key keep working. The `X-RateLimit-*` headers report whichever limit is closer. Requests without a member token use the key cap only.\n\n**10x weight:** workout/plan generate, recommend, adapt; insights digest/pillars; chat **writes** (start conversation, send message); video generation; nutrition photo-log analysis; full video export; and **`GET /v1/orgs/{organizationId}/stock-exercises`**. Weight is consumed when the request is admitted at the auth middleware, including most **400**/**403** responses. **Exception:** a plan-gated stock-catalog **403** (Platform/trial/Content/Ultra monthly) does **not** consume units. Ultra yearly unlocks catalog **browse of the same** published clips — not new machine videos. `collectionNames` / generate `includeExerciseCollections` are looks; machine vs free weight is `equipmentIds` or `GET /v1/workouts/equipment/metadata`.\n\n**1x writes:** health-data batch push and nutrition log writes count as **1x** per request (batch capped at 50 entries). Team library workout and plan create / update / delete are **1x**. Generate with `addToTeamContent` stays 10x; the save adds nothing. Chat **list** (`GET /v1/chat/conversations`) is **1x**.\n\n**When rate limited (429):**\n1. Stop making requests immediately\n2. Wait `Retry-After` seconds, or until `X-RateLimit-Reset`\n3. Implement exponential backoff for repeated 429s\n4. Consider upgrading (or waiting for trial to convert) for higher limits\n\n**Best practices:**\n- Monitor remaining units via `GET /v1/orgs/{organizationId}/stats` (admitted weighted units, not rejected counts)\n- Cache and reuse generated **plan ids** and library **workout ids** instead of regenerating on every page load\n- Prefer Recommend over Generate when your library already has the right content\n- Do not poll entitlement-gated routes (stock catalog) on a plan that returns 403. That plan-gated 403 does not consume quota; retrying will not unlock the SKU\n\n**Billing / quotas:** API access and request caps are part of your Hyperhuman subscription (see [Pricing](https://hyperhuman.cc/pricing)). You are not billed per individual API call — usage is governed by the hourly/daily weighted limits above.\n\n---\n\n## Hyperhuman product surfaces\n\nThe Content API is one surface in a wider platform. If a capability you need isn't in this API, it likely lives in one of these:\n\n- **Teams workspace** ([team.hyperhuman.cc](https://team.hyperhuman.cc)) - production hub for the Smart Library, AI Workout Builder, Content Autopilot, Social Publishing, and team analytics. This is where API keys are issued.\n- **Hyperhuman Club** ([hyperhuman.cc/club](https://hyperhuman.cc/club)) - white-label branded member app for iOS and Android. Plug-and-play health HQ that companies launch in weeks instead of months. Dedicated store listing requires an **Ultra or Custom / Enterprise** team plan plus a one-time setup fee. Platform and Ultra already include Client Hub web and the shared member app without that fee. Optional ROOK / ASENSEI modules stay available on Platform.\n- **Wix widget** ([hyperhuman.cc/wix](https://hyperhuman.cc/wix)) - embeddable workout library and player for Wix sites.\n- **Pricing** ([hyperhuman.cc/pricing](https://hyperhuman.cc/pricing)) - plan-dependent quotas and module availability.\n- **Contact** ([hyperhuman.cc/contact](https://hyperhuman.cc/contact)) - Enterprise pricing, scoping, and custom integrations. Product questions: chat at [hyperhuman.cc/?ask=1](https://hyperhuman.cc/?ask=1) or Teams Home **Chat**.\n\n---\n\n## Resources\n\n- **OpenAPI spec (JSON):** [https://content.api.hyperhuman.cc/openapi.json](https://content.api.hyperhuman.cc/openapi.json)\n- **OpenAPI spec (YAML):** [https://content.api.hyperhuman.cc/openapi.yaml](https://content.api.hyperhuman.cc/openapi.yaml)\n- **Modern reference (Scalar):** [https://content.api.hyperhuman.cc/docs](https://content.api.hyperhuman.cc/docs)\n- **Classic explorer (Swagger UI):** [https://content.api.hyperhuman.cc/docs/api-explorer](https://content.api.hyperhuman.cc/docs/api-explorer)\n- **LLM bundle:** [https://content.api.hyperhuman.cc/llms-full.txt](https://content.api.hyperhuman.cc/llms-full.txt)\n- **Agent guide:** [https://content.api.hyperhuman.cc/AGENTS.md](https://content.api.hyperhuman.cc/AGENTS.md)\n- **Custom player guide:** [https://content.api.hyperhuman.cc/docs/guides/custom-player.md](https://content.api.hyperhuman.cc/docs/guides/custom-player.md)\n- **Developer cheat sheet:** [https://content.api.hyperhuman.cc/docs/guides/content-API-cheat-sheet.md](https://content.api.hyperhuman.cc/docs/guides/content-API-cheat-sheet.md)\n- **Teams platform guide:** [https://team.hyperhuman.cc/docs/guides/teams-platform.md](https://team.hyperhuman.cc/docs/guides/teams-platform.md)\n- **Support chat (go-to):** [hyperhuman.cc/?ask=1](https://hyperhuman.cc/?ask=1) or Teams Home **Chat**\n- **Contact (Enterprise / custom):** [hyperhuman.cc/contact](https://hyperhuman.cc/contact)\n- **Email (Enterprise pricing/scoping; major outages):** support@hyperhuman.cc\n- **Website:** [hyperhuman.cc](https://hyperhuman.cc)\n","version":"1.0","contact":{}},"tags":[{"name":"workouts"},{"name":"workouts-cast"},{"name":"plans"},{"name":"library-exercises"},{"name":"library-stock-exercises"},{"name":"exercise-groups"},{"name":"ai-generation"},{"name":"ai-recommendation"},{"name":"ai-adaptation"},{"name":"organization"},{"name":"social"},{"name":"content-autopilot"},{"name":"social-publish"},{"name":"endusers-ai-insights"},{"name":"endusers-ai-chat"},{"name":"endusers-nutrition"},{"name":"endusers-content","description":"End-user library: list, assign, and unassign organization workouts and programs. Does not start an active plan."},{"name":"endusers-plans"},{"name":"endusers-management"},{"name":"endusers-webhooks"}],"servers":[{"url":"https://content.api.hyperhuman.cc"}],"components":{"securitySchemes":{"X-Api-Key":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Choose a plan that fits your expected API usage. Once activated, you'll receive your content key and organization ID in the [integrations tab](https://team.hyperhuman.cc/settings?tab=integrations)."}},"schemas":{"ApiErrorDetails":{"type":"object","properties":{"code":{"type":"string","description":"A specific error code related to this detail. For request validation failures this is 'ConstraintError'.","example":"ConstraintError"},"message":{"type":"string","description":"A human-readable message explaining this specific error detail.","example":"email must be a valid email address"},"target":{"type":"string","description":"The specific field or parameter that caused this error detail, if applicable.","example":"email"}},"required":["code","message"]},"ApiError":{"type":"object","properties":{"code":{"type":"string","description":"A general error code classifying the error.","example":"BadRequest"},"message":{"type":"string","description":"A human-readable message summarizing the overall error.","example":"The request is invalid."},"target":{"type":"string","description":"The primary field or parameter related to the overall error, if applicable.","example":"requestBody"},"details":{"description":"An array of specific error details, often related to validation failures on individual fields.","type":"array","items":{"$ref":"#/components/schemas/ApiErrorDetails"}}},"required":["code","message"]},"ErrorResponse":{"type":"object","properties":{"error":{"description":"Contains the details of the error that occurred.","allOf":[{"$ref":"#/components/schemas/ApiError"}]}},"required":["error"]},"TrainerRef":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the trainer.","example":"trainer-jane-doe"},"name":{"type":"string","description":"Display name of the trainer.","example":"Jane Doe"}},"required":["id","name"]},"WorkoutAudio":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the audio asset","example":"68b0557adbaf49d17ee429bb"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the audio was created","example":"2025-08-28T13:11:22.242Z"},"isStock":{"type":"boolean","description":"Whether this is a stock audio asset","example":false},"assetUri":{"type":"string","description":"Time-limited presigned URL to the audio file (M4A, ~7 days).","format":"url","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/example-audio.m4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=..."},"scriptText":{"type":"string","description":"Script text for the audio","example":"Welcome to your workout!"},"type":{"type":"string","description":"Type of audio asset","example":"workoutIntro"},"locale":{"type":"string","description":"Locale/language of the audio","example":"en-US"},"duration":{"type":"number","description":"Duration of the audio in seconds","example":0.875},"status":{"type":"string","description":"Processing status of the audio","example":"generated"}},"required":["id","createdAt","isStock","assetUri","type","locale","duration","status"]},"VideoLinks":{"type":"object","properties":{"url":{"type":"string","description":"Time-limited AWS S3 presigned HTTPS URL to progressive MP4 (typically 1080p). Valid ~7 days — re-fetch via the API; do not treat as a durable identifier. Not HLS/DASH/ABR. Play the string **verbatim** in `<video>` / AVPlayer / ExoPlayer: do not parse/rebuild the query, and do not send `X-Api-Key` on the media request. Byte-range GETs are allowed.","format":"url","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/workout-123.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=..."},"poster":{"type":"object","description":"Public unsigned S3 JPEG still (`Content-Type: image/jpeg`) for `<video poster>` / grid thumbnails. Typical path `.../e/{id}/poster_a_720p.jpg` or `poster_a_1080p.jpg`. Not presigned, no `X-Amz-*` query, no API key — fetch the URL directly as an image. Omitted on playlist **intro** and **outro** (`video` is `{ url }` only). Do not use `url` (the MP4) as the poster. Do not bind a missing poster to `<img src=\"\">` (browsers then request the current HTML page). OpenAPI placeholders on other hosts are not live assets.","format":"url","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg"},"thumbnail":{"type":"object","description":"Same public unsigned S3 JPEG contract as `poster`. On playlist exercise/class/multi/promo/educational segments this is typically the same URL as `poster` unless a distinct cover override exists on list/detail `preview`.","format":"url","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/poster_a_720p.jpg"},"loop":{"type":"number","description":"Playback looping hint. `0` = play the file once. `-1` = keep looping for the whole playlist segment `duration` (typical for `exercise.intro.video` and for `exercise.main.video` when the asset `playsInLoop` is true). The MP4 is often shorter than that `duration` (e.g. a ~27s looping demo in a 60s time-based slot) — that is intended; do not treat file length as the work window. Positive values = a finite loop count if the player supports it.","example":-1,"default":0}},"required":["url"]},"Category":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the category.","example":"cat-hiit-123"},"name":{"type":"string","description":"Display name of the category. Localized based on locale query parameter.","example":"HIIT"}},"required":["id","name"]},"Equipment":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the equipment item.","example":"eq-dumbbell-abc"},"name":{"type":"string","description":"Display name of the equipment. Localized based on locale query parameter.","example":"Dumbbell"}},"required":["id","name"]},"MusicPlaylistLink":{"type":"object","properties":{"url":{"type":"string","description":"URL of the music playlist on an external platform (e.g., Spotify, Apple Music).","format":"url","example":"https://open.spotify.com/playlist/37i9dQZF1DX..."}},"required":["url"]},"MusicPlaylists":{"type":"object","properties":{"spotify":{"description":"Spotify music playlist","allOf":[{"$ref":"#/components/schemas/MusicPlaylistLink"}]},"youtube":{"description":"Youtube music playlist","allOf":[{"$ref":"#/components/schemas/MusicPlaylistLink"}]},"appleMusic":{"description":"Apple Music playlist","allOf":[{"$ref":"#/components/schemas/MusicPlaylistLink"}]},"amazonMusic":{"description":"Amazon Music playlist","allOf":[{"$ref":"#/components/schemas/MusicPlaylistLink"}]}}},"ShareLink":{"type":"object","properties":{"url":{"type":"string","description":"URL that can be shared to provide access or reference to the resource.","format":"url","example":"https://share.hyperhuman.cc/w/a1b2c3d4"}},"required":["url"]},"ImageLinks":{"type":"object","properties":{"url":{"type":"string","description":"Public unsigned S3 HTTPS URL to a JPEG still (typically `Content-Type: image/jpeg`). Not presigned; no API key. Load as `<img src>`. Do not use a video `url` here.","format":"url","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/break-image.jpg"},"thumbnail":{"type":"object","description":"Optional smaller JPEG of the same still. Same public-unsigned S3 contract as `url`.","format":"url","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/break-image-320x180.jpg"}},"required":["url"]},"Organization":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the organization.","example":"org-fitness-first"},"name":{"type":"string","description":"Display name of the organization.","example":"Fitness First Gym"},"logo":{"description":"Links to the organization's logo images (if available).","allOf":[{"$ref":"#/components/schemas/ImageLinks"}]}},"required":["id","name"]},"MuscleGroupPercentage":{"type":"object","properties":{"muscleGroupId":{"type":"string","description":"Unique identifier of the muscle group","example":"507f1f77bcf86cd799439011"},"muscleGroupName":{"type":"string","description":"Localized name of the muscle group","example":"Chest"},"percentage":{"type":"number","description":"Percentage of workout focused on this muscle group","minimum":0,"maximum":100,"example":35.5}},"required":["muscleGroupId","muscleGroupName","percentage"]},"Workout":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the workout.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout. Localized based on locale query parameter.","example":"Full Body Blast"},"description":{"type":"string","description":"Detailed description of the workout, potentially including goals and target audience. Localized based on locale query parameter.","example":"A 30-minute high-intensity interval training session designed to improve cardiovascular fitness and strength."},"audioIntro":{"description":"Localized workout introduction audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"audioOutro":{"description":"Localized workout outro audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"duration":{"type":"number","description":"Estimated workout duration in seconds.","example":1800},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Raw difficulty enum value (beginner|intermediate|advanced). Clients should map to localized strings. Null if not specified.","example":"beginner"},"preview":{"description":"`url` is a time-limited presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (cover / still / clip) — not the MP4, not HTML. Null if no preview is available.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"rating":{"type":"number","nullable":true,"description":"Average user rating (e.g., 1-5). Null if not rated.","example":4.5},"visibility":{"type":"string","enum":["private","public"],"description":"Visibility level of the workout.","example":"public"},"locked":{"type":"boolean","description":"Indicates if the workout requires a subscription or specific entitlement to access.","example":false},"mixBgMusic":{"type":"boolean","description":"Whether to mix background music with workout audio. If true, background music will be played alongside exercise instructions.","example":true},"presentationStyle":{"type":"string","enum":["full","minimal","essential","noOverlays"],"description":"Video overlay presentation style. Controls which UI elements are shown during workout playback.","example":"full"},"skipWorkoutPreview":{"type":"boolean","description":"If true, skip workout preview/intro segment in interactive player","example":false},"skipWorkoutCompletionScreen":{"type":"boolean","description":"If true, skip workout completion/outro screen in interactive player","example":false},"videoAudioMode":{"type":"string","enum":["full","instructionsOnly","beepsOnly","none"],"description":"Audio policy for interactive playback and full-workout export. Controls which audio components are included (voice, beeps, background music).","example":"full"},"categories":{"description":"List of categories associated with the workout (e.g., HIIT, Strength, Yoga). Category names are localized based on locale query parameter.","type":"array","items":{"$ref":"#/components/schemas/Category"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not categories and not used by recommend or generate.","type":"array","items":{"type":"string"}},"allowAssessment":{"type":"boolean","description":"Whether this workout supports AI assessment mode","example":false},"assessmentType":{"type":"string","enum":["mobility_baseline","glp1_muscle_guard","movement_assessment","overall_assessment","learning_tutorial","learning_practice"],"description":"Type of assessment supported (if allowAssessment is true)","example":"mobility_baseline","nullable":true},"equipment":{"description":"List of equipment required or recommended for the workout. Equipment names are localized based on locale query parameter.","type":"array","items":{"$ref":"#/components/schemas/Equipment"}},"musicPlaylists":{"description":"Links to suggested music playlists on various platforms (Spotify, Apple Music, etc.).","allOf":[{"$ref":"#/components/schemas/MusicPlaylists"}]},"shareLink":{"description":"A shareable link for the workout.","allOf":[{"$ref":"#/components/schemas/ShareLink"}]},"organization":{"description":"Reference to the organization that owns/published this workout, if applicable.","allOf":[{"$ref":"#/components/schemas/Organization"}]},"video":{"description":"Links to the full workout video when present on the document (presigned progressive MP4). Prefer GET /export/video/stream_url for the rendered full-workout export URL.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"muscleGroupPercentages":{"description":"Percentage distribution of muscle groups in this workout, sorted by highest percentage first","type":"array","items":{"$ref":"#/components/schemas/MuscleGroupPercentage"}}},"required":["id","createdAt","updatedAt","trainer","name","description","duration","visibility","locked","categories","tags","equipment","shareLink","muscleGroupPercentages"]},"WorkoutResponse":{"type":"object","properties":{"data":{"description":"Contains the detailed workout object.","allOf":[{"$ref":"#/components/schemas/Workout"}]}},"required":["data"]},"PageLinks":{"type":"object","properties":{"next":{"type":"string","description":"URL of the next page. Missing if there is no next page.","example":"https://content.api.hyperhuman.cc/resource/next-page-link"},"total":{"type":"number","description":"Total number of items available across all pages.","example":100}}},"SimilarWorkoutListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the workout.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout. Localized based on locale query parameter.","example":"Full Body Blast"},"description":{"type":"string","description":"Detailed description of the workout, potentially including goals and target audience. Localized based on locale query parameter.","example":"A 30-minute high-intensity interval training session designed to improve cardiovascular fitness and strength."},"audioIntro":{"description":"Localized workout introduction audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"audioOutro":{"description":"Localized workout outro audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"duration":{"type":"number","description":"Estimated workout duration in seconds.","example":1800},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Raw difficulty enum value (beginner|intermediate|advanced). Clients should map to localized strings. Null if not specified.","example":"beginner"},"preview":{"description":"`url` is a time-limited presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (cover / still / clip) — not the MP4, not HTML. Null if no preview is available.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"rating":{"type":"number","nullable":true,"description":"Average user rating (e.g., 1-5). Null if not rated.","example":4.5},"visibility":{"type":"string","enum":["private","public"],"description":"Visibility level of the workout.","example":"public"},"locked":{"type":"boolean","description":"Indicates if the workout requires a subscription or specific entitlement to access.","example":false},"mixBgMusic":{"type":"boolean","description":"Whether to mix background music with workout audio. If true, background music will be played alongside exercise instructions.","example":true},"presentationStyle":{"type":"string","enum":["full","minimal","essential","noOverlays"],"description":"Video overlay presentation style. Controls which UI elements are shown during workout playback.","example":"full"},"skipWorkoutPreview":{"type":"boolean","description":"If true, skip workout preview/intro segment in interactive player","example":false},"skipWorkoutCompletionScreen":{"type":"boolean","description":"If true, skip workout completion/outro screen in interactive player","example":false},"videoAudioMode":{"type":"string","enum":["full","instructionsOnly","beepsOnly","none"],"description":"Audio policy for interactive playback and full-workout export. Controls which audio components are included (voice, beeps, background music).","example":"full"},"categories":{"description":"List of categories associated with the workout (e.g., HIIT, Strength, Yoga). Category names are localized based on locale query parameter.","type":"array","items":{"$ref":"#/components/schemas/Category"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not categories and not used by recommend or generate.","type":"array","items":{"type":"string"}},"allowAssessment":{"type":"boolean","description":"Whether this workout supports AI assessment mode","example":false},"assessmentType":{"type":"string","enum":["mobility_baseline","glp1_muscle_guard","movement_assessment","overall_assessment","learning_tutorial","learning_practice"],"description":"Type of assessment supported (if allowAssessment is true)","example":"mobility_baseline","nullable":true},"matchLabels":{"description":"Up to two short reasons this workout matches the source. Fixed English labels.","example":["Same style","Same muscles"],"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","trainer","name","description","duration","visibility","locked","categories","tags","matchLabels"]},"SimilarWorkoutListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"description":"Ranked similar workouts. `links.next` is omitted. `links.total` is the number returned.","type":"array","items":{"$ref":"#/components/schemas/SimilarWorkoutListItem"}}},"required":["links","data"]},"WorkoutListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the workout.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout. Localized based on locale query parameter.","example":"Full Body Blast"},"description":{"type":"string","description":"Detailed description of the workout, potentially including goals and target audience. Localized based on locale query parameter.","example":"A 30-minute high-intensity interval training session designed to improve cardiovascular fitness and strength."},"audioIntro":{"description":"Localized workout introduction audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"audioOutro":{"description":"Localized workout outro audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"duration":{"type":"number","description":"Estimated workout duration in seconds.","example":1800},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Raw difficulty enum value (beginner|intermediate|advanced). Clients should map to localized strings. Null if not specified.","example":"beginner"},"preview":{"description":"`url` is a time-limited presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (cover / still / clip) — not the MP4, not HTML. Null if no preview is available.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"rating":{"type":"number","nullable":true,"description":"Average user rating (e.g., 1-5). Null if not rated.","example":4.5},"visibility":{"type":"string","enum":["private","public"],"description":"Visibility level of the workout.","example":"public"},"locked":{"type":"boolean","description":"Indicates if the workout requires a subscription or specific entitlement to access.","example":false},"mixBgMusic":{"type":"boolean","description":"Whether to mix background music with workout audio. If true, background music will be played alongside exercise instructions.","example":true},"presentationStyle":{"type":"string","enum":["full","minimal","essential","noOverlays"],"description":"Video overlay presentation style. Controls which UI elements are shown during workout playback.","example":"full"},"skipWorkoutPreview":{"type":"boolean","description":"If true, skip workout preview/intro segment in interactive player","example":false},"skipWorkoutCompletionScreen":{"type":"boolean","description":"If true, skip workout completion/outro screen in interactive player","example":false},"videoAudioMode":{"type":"string","enum":["full","instructionsOnly","beepsOnly","none"],"description":"Audio policy for interactive playback and full-workout export. Controls which audio components are included (voice, beeps, background music).","example":"full"},"categories":{"description":"List of categories associated with the workout (e.g., HIIT, Strength, Yoga). Category names are localized based on locale query parameter.","type":"array","items":{"$ref":"#/components/schemas/Category"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not categories and not used by recommend or generate.","type":"array","items":{"type":"string"}},"allowAssessment":{"type":"boolean","description":"Whether this workout supports AI assessment mode","example":false},"assessmentType":{"type":"string","enum":["mobility_baseline","glp1_muscle_guard","movement_assessment","overall_assessment","learning_tutorial","learning_practice"],"description":"Type of assessment supported (if allowAssessment is true)","example":"mobility_baseline","nullable":true}},"required":["id","createdAt","updatedAt","trainer","name","description","duration","visibility","locked","categories","tags"]},"WorkoutListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutListItem"}},"explanation":{"type":"string","description":"Explanation for how this list was filtered or sorted"}},"required":["links","data"]},"OrganizationWorkoutExerciseRefDto":{"type":"object","properties":{"id":{"type":"string","description":"Exercise id: your organization exercise or a stock exercise (premium needs the plan feature).","example":"60812dea606fc90011eb4406"}},"required":["id"]},"OrganizationWorkoutInstanceDto":{"type":"object","properties":{"kind":{"type":"string","enum":["single-exercise","rest"],"example":"single-exercise"},"exercise":{"description":"Required for `single-exercise`.","allOf":[{"$ref":"#/components/schemas/OrganizationWorkoutExerciseRefDto"}]},"reps":{"type":"number","description":"Repetitions. Send `reps` or `durationSeconds` for an exercise, not both.","minimum":1,"maximum":100},"durationSeconds":{"type":"number","description":"Seconds. Required for `rest`; for an exercise, send this or `reps`.","minimum":5,"maximum":1830},"pace":{"type":"string","enum":["slow","medium","fast"],"description":"Timed exercises only."},"weightLevel":{"type":"string","enum":["light","medium","heavy"],"description":"Rep-based exercises only."},"rpe":{"type":"number","description":"Target effort 0-10.","minimum":0,"maximum":10},"amrap":{"type":"boolean","description":"As many reps as possible. Timed exercises only."},"skipIntro":{"type":"boolean","description":"Skip the exercise intro clip."}},"required":["kind"]},"CreateOrganizationWorkoutDto":{"type":"object","properties":{"name":{"type":"string","description":"Workout name (3-150 characters).","minLength":3,"maxLength":150,"example":"Morning Power HIIT"},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"example":"intermediate"},"categoryIds":{"description":"Workout category ids (24-character hex) from `GET /v1/workouts/metadata`. 1-2.","example":["615aa3f0dbe7140012c59e94"],"type":"array","items":{"type":"string"}},"tags":{"description":"Up to 5 tags.","example":["hiit","morning"],"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["private","public"],"default":"private","description":"Defaults to `private` so nothing reaches members by accident. Send `public` to publish."},"instances":{"description":"Ordered exercises and rests. At least 2 exercises, max 100 exercises and 90 minutes. Start and end with an exercise.","type":"array","items":{"$ref":"#/components/schemas/OrganizationWorkoutInstanceDto"}}},"required":["name","difficulty","categoryIds","instances"]},"UpdateOrganizationWorkoutDto":{"type":"object","properties":{"name":{"type":"string","description":"Workout name (3-150 characters).","minLength":3,"maxLength":150,"example":"Morning Power HIIT"},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"example":"intermediate"},"categoryIds":{"description":"Workout category ids (24-character hex) from `GET /v1/workouts/metadata`. 1-2.","example":["615aa3f0dbe7140012c59e94"],"type":"array","items":{"type":"string"}},"tags":{"description":"Up to 5 tags.","example":["hiit","morning"],"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["private","public"],"default":"private","description":"Defaults to `private` so nothing reaches members by accident. Send `public` to publish."},"instances":{"description":"Ordered exercises and rests. At least 2 exercises, max 100 exercises and 90 minutes. Start and end with an exercise.","type":"array","items":{"$ref":"#/components/schemas/OrganizationWorkoutInstanceDto"}}}},"EndUserProfileDetailsDto":{"type":"object","properties":{"age":{"type":"number","description":"User age. Maps to age groups (16-24: Young, 25-34: Young Adult, 35-44: Early Middle Age, 45-54: Mid Life, 55-64: Late Middle Age, 65-74: Early Senior, 75+: Senior) for appropriate exercise intensity selection.","minimum":16,"maximum":99,"example":32},"gender":{"type":"string","enum":["male","female","other"],"description":"User gender. Influences coach gender matching preference (not guaranteed match).","example":"female"},"fitnessLevels":{"type":"array","description":"User fitness levels. Only the FIRST level is used for exercise difficulty selection. Provide only one for clarity. AI may adjust actual workout difficulty based on exercise availability and safety considerations.","example":["intermediate"],"items":{"type":"string","enum":["beginner","intermediate","advanced"]}},"goalIds":{"description":"Goal IDs the user is interested in. Accepted on the request; may be ignored by the current ranking pipeline.","example":["63c92926f920a9005c4e619c"],"type":"array","items":{"type":"string"}},"trainingDaysPerWeek":{"type":"number","description":"Number of days per week the user wants to train. Accepted on the request; may be ignored by the current ranking pipeline.","minimum":1,"maximum":7,"example":4},"preferredEquipmentCategoryIds":{"description":"Preferred equipment category IDs. Used as guidance (not strict filter). AI may include bodyweight exercises for safety. Use GET /v1/workouts/equipment/metadata to fetch available equipment categories.","example":["67deb36a6a5e49797c122f56","67deb3696a5e49797c122f55"],"type":"array","items":{"type":"string"}},"endUserId":{"type":"string","description":"End user identifier for personalization. Accepts email, external UUID, end-user profile ID, or internal user ID. The resolved user must belong to the same organization as the request.","example":"member@acme.com"}}},"WorkoutRecommendationRequestDto":{"type":"object","properties":{"endUserProfileDetails":{"description":"Detailed user profile information for personalized recommendations","allOf":[{"$ref":"#/components/schemas/EndUserProfileDetailsDto"}]},"categoryIds":{"description":"Optional workout category IDs. Hard-filters the published+public recommend pool with $in on _workoutCategoryIds. Hex ids only (not list custom: tokens). Use GET /v1/workouts/metadata for ids. Omit for the full public pool.","example":["615aa3f0dbe7140012c59e94"],"maxItems":20,"type":"array","items":{"type":"string"}},"locale":{"type":"string","description":"Preferred BCP-47 locale for recommendation text when the stack supports it.","example":"en-US"}}},"CategoryDto":{"type":"object","properties":{"id":{"type":"string","description":"Category ID"},"name":{"type":"string","description":"Category name"}},"required":["id","name"]},"RecommendedWorkoutDto":{"type":"object","properties":{"id":{"type":"string","description":"Workout ID"},"name":{"type":"string","description":"Workout name"},"description":{"type":"string","description":"Workout description"},"duration":{"type":"number","description":"Workout duration in seconds"},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"]},"thumbnailUrl":{"type":"string","description":"URL to workout thumbnail image"},"recommendation":{"type":"string","description":"Reasoning for this recommendation"},"categories":{"description":"Workout categories","type":"array","items":{"$ref":"#/components/schemas/CategoryDto"}},"preview":{"description":"Preview video (playable URL when available). url is empty when only a thumbnail image exists.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]}},"required":["id","name","description","duration","difficulty","thumbnailUrl","recommendation","categories"]},"WorkoutRecommendationResponseDto":{"type":"object","properties":{"workouts":{"description":"List of recommended workouts (max 12)","type":"array","items":{"$ref":"#/components/schemas/RecommendedWorkoutDto"}},"reasoning":{"type":"string","description":"Overall explanation for the recommendation strategy used"}},"required":["workouts","reasoning"]},"WorkoutDurationOptionsDto":{"type":"object","properties":{"minMinutes":{"type":"number","description":"Minimum workout duration in minutes","minimum":5,"example":5},"maxMinutes":{"type":"number","description":"Maximum workout duration in minutes","minimum":5,"example":30}}},"WorkoutGenerationRequestDto":{"type":"object","properties":{"endUserProfileDetails":{"description":"Detailed user profile information for personalized workout generation.","allOf":[{"$ref":"#/components/schemas/EndUserProfileDetailsDto"}]},"exerciseSources":{"type":"array","description":"Preferred source(s) of exercises. Use only `premium_stock` for consistent quality, or `team_exercises` for brand consistency. Avoid mixing `free_stock` with `premium_stock` for visual consistency.","example":["premium_stock"],"items":{"type":"string","enum":["premium_stock","free_stock","team_exercises"]}},"durationOptions":{"description":"Preferred workout duration range in minutes. You can specify minimum and maximum duration to generate workouts within a specific time range.","example":{"minMinutes":5,"maxMinutes":30},"allOf":[{"$ref":"#/components/schemas/WorkoutDurationOptionsDto"}]},"categoryId":{"type":"string","description":"Workout category ID to theme the workout. Use GET /v1/workouts/metadata to fetch available categories (HIIT, Strength, Mobility, Cardio, etc.).","example":"615aa3f0dbe7140012c59e94"},"muscleGroupIds":{"description":"Muscle group IDs to focus on during the workout. The workout will be generated with emphasis on exercises that target these muscle groups. Use the GET /v1/workouts/exercises/metadata endpoint to fetch the available muscle groups. Note that this is used for guidance, not as a strict filter - the workout will still include exercises for complementary muscle groups as needed.","example":["604b0129beaba770c284ff40","604b0165076fe2727354d73e"],"type":"array","items":{"type":"string"}},"includeExerciseCollections":{"description":"Exercise collection names to use as the only allowed exercise pool, narrowed within the selected exercise sources (case-insensitive). Mutually exclusive with excludeExerciseCollections. Prefer this when locking trainer, location, or brand look. Use GET /v1/workouts/exercises/metadata for available collection names and counts. After filtering, the pool must have at least 10 exercises or the request returns 400.","example":["Premium - Studio"],"type":"array","items":{"type":"string"}},"excludeExerciseCollections":{"description":"Exercise collection names to exclude from the exercise pool (case-insensitive). Mutually exclusive with includeExerciseCollections. Use GET /v1/workouts/exercises/metadata for available collection names and counts. Do not simulate include by excluding every other collection — use includeExerciseCollections instead.","example":["Free - Eclectic Home","Premium - Industrial"],"type":"array","items":{"type":"string"}},"userRequirements":{"type":"string","description":"High-level context, definitions, and guidelines for workout generation. Provides customer-specific grounding (e.g., \"intermediate osteoporosis strength training\", \"one-sided exercises, rep schemes\"). Used to inform exercise selection, intensity, and structure. Generate-only name — do not send `userGuidance` (that field is adapt-only; unknown keys → 400 ValidationError).","example":"Intermediate strength / stimulus, one-sided exercises, rep schemes. Focus on controlled movements suitable for osteoporosis patients.","maxLength":2000},"locale":{"type":"string","description":"Optional BCP-47 locale (e.g. \"fr-FR\", \"de-DE\", \"en-GB\"). Localizes the AI workout title and read-side exercise metadata. Omit for English-only output. Unsupported values return 400.","example":"fr-FR"},"methodologyProfileId":{"type":"string","description":"Optional 24-character hex id of a team Programming DNA profile from GET /v1/orgs/{organizationId}/methodologies. Opt-in only — omit means no team methodology is applied. Unknown, personal (non-team), or inactive ids return 400 (same message; omit still means none). Not used by recommend, adapt, or chat."},"addToTeamContent":{"type":"boolean","description":"Save the generated workout to your team library, owned by your team manager. Needs your organization API key, `categoryId`, and enough content minutes (checked before generating). The response then includes the saved `id`. Still one 10x call; the save adds nothing.","default":false},"visibility":{"type":"string","description":"Visibility of the saved workout. Only with `addToTeamContent: true`. Defaults to `private`.","enum":["private","public"],"default":"private"}}},"LocalizedRefDto":{"type":"object","properties":{"id":{"type":"string","description":"Entity id (24-character hex DB id)"},"name":{"type":"string","description":"Localized name resolved for the requested locale (silent en-US fallback)"}},"required":["id","name"]},"ApiExerciseDto":{"type":"object","properties":{"id":{"type":"string","description":"Exercise id (24-character hex DB id)"},"name":{"type":"string","description":"Name of the exercise (canonical English / en-US base)"},"nameLocalized":{"type":"string","description":"Exercise name resolved for the requested locale (silent en-US fallback), same resolution as the workout playlist. Additive localization field.","example":"Pompes"},"thumbnailUrl":{"type":"string","description":"Thumbnail URL for the exercise video"},"videoUri":{"type":"string","description":"Signed main video URI when present. The JSON-receiver embed still resolves playback media via `GET /v1/video-asset/{exerciseId}` using `exercise.id`."},"estimatedRepDuration":{"type":"number","description":"Estimated duration of one repetition in milliseconds. Rep-based work window = reps × this value (independent of MP4 file length)."},"muscleGroups":{"description":"Primary muscle groups targeted (canonical English names)","type":"array","items":{"type":"string"}},"muscleGroupsLocalized":{"description":"Primary muscle groups with id and locale-resolved name. Additive localization field.","type":"array","items":{"$ref":"#/components/schemas/LocalizedRefDto"}},"equipment":{"description":"Equipment needed for this exercise (canonical English names)","type":"array","items":{"type":"string"}},"equipmentLocalized":{"description":"Equipment with id and locale-resolved name. Additive localization field.","type":"array","items":{"$ref":"#/components/schemas/LocalizedRefDto"}}},"required":["id","name"]},"ApiInstanceDto":{"type":"object","properties":{"id":{"type":"string","description":"Instance id (24-character hex DB id)"},"kind":{"type":"string","enum":["rest","single-exercise","multi-exercise","class","promo","educational"],"description":"Instance kind on the wire: `rest` or `single-exercise` (generate/adapt). Other enum values exist for library workouts but are not emitted by generate.","example":"single-exercise"},"durationSeconds":{"type":"number","description":"Planned work window in **seconds** for time-based exercises and rests (already converted from internal milliseconds). This is not the MP4 file length. Smart-clip files are short looping demos; when the asset `playsInLoop` is true (default), loop `GET /v1/video-asset/{id}` until this clock elapses.","example":60},"reps":{"type":"number","description":"Number of repetitions (for reps-based exercises)"},"exercise":{"description":"Exercise details, if this instance is an exercise.","allOf":[{"$ref":"#/components/schemas/ApiExerciseDto"}]},"skipIntro":{"type":"boolean","description":"Whether to skip intro for the exercise video."},"pace":{"type":"string","enum":["slow","medium","fast"],"nullable":true,"description":"Pacing for time-based exercises."},"weightLevel":{"type":"string","enum":["light","medium","heavy"],"nullable":true,"description":"Weight level for reps-based exercises."},"weight":{"type":"number","description":"Prescribed/target weight (0-1000). Unit in weightUnit.","minimum":0,"maximum":1000},"weightUnit":{"type":"string","enum":["metric","imperial"],"description":"Unit for weight: metric (kg) or imperial (lbs)."}},"required":["id","kind"]},"GeneratedWorkoutCategoryDto":{"type":"object","properties":{"id":{"type":"string","description":"Category id (24-character hex DB id)"},"name":{"type":"string","description":"Category name resolved for the requested locale (silent en-US fallback)"}},"required":["id","name"]},"WorkoutGenerationResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Saved workout id. Present only with `addToTeamContent: true`. Fetch the stored copy with `GET /v1/workouts/{id}`.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"name":{"type":"string","description":"Name of the generated workout (canonical English / en-US base)."},"nameTranslations":{"type":"object","description":"Per-locale workout name map produced by the AI. Always includes en-US; includes the requested locale when it is non-English. Additive localization field.","additionalProperties":{"type":"string"},"example":{"en-US":"Full Body HIIT Power","fr-FR":"Puissance HIIT Corps Entier"}},"instances":{"description":"List of instances (exercises and rests) in the workout.","type":"array","items":{"$ref":"#/components/schemas/ApiInstanceDto"}},"totalDurationSeconds":{"type":"number","description":"Estimated total duration of the workout in seconds. Calculated if possible."},"difficulty":{"type":"string","description":"Overall difficulty of the workout, as determined or used by the generator (raw key, e.g. 'intermediate')."},"difficultyLabel":{"type":"string","description":"Difficulty label resolved for the requested locale (silent en-US fallback). Additive localization field."},"categoryId":{"type":"string","description":"The category ID used for generating the workout."},"category":{"description":"Category with id and locale-resolved name. Present when the category is resolvable. Additive localization field.","allOf":[{"$ref":"#/components/schemas/GeneratedWorkoutCategoryDto"}]},"methodology":{"type":"object","description":"Applied team methodology when a profile was used. Null when none applied. Natural-language methodology is guidance, not a guarantee."},"inspection":{"type":"object","description":"Generation Inspector snapshot when a methodology was considered: methodology, hardRulesApplied, violations, complianceStatus (`compliant` | `partial` | `not_applicable`), generationId. Store generationId yourself — there is no public GET-by-id. Hard-rule results are deterministic; text guidelines are not a guarantee."}},"required":["name","instances"]},"AdaptationEndUserProfileDetailsDto":{"type":"object","properties":{"age":{"type":"number","description":"User age","minimum":16,"maximum":99,"example":32},"gender":{"type":"string","enum":["male","female","other"],"description":"User gender","example":"female"},"fitnessLevels":{"type":"array","description":"User fitness levels. First level is primary.","example":["intermediate"],"items":{"type":"string","enum":["beginner","intermediate","advanced"]}},"goalIds":{"description":"Goal IDs","example":["63c92926f920a9005c4e619c"],"type":"array","items":{"type":"string"}},"trainingDaysPerWeek":{"type":"number","description":"Training days per week","minimum":1,"maximum":7,"example":4},"preferredEquipmentCategoryIds":{"description":"Preferred equipment category IDs","type":"array","items":{"type":"string"}}}},"WorkoutAdaptationRequestDto":{"type":"object","properties":{"endUserProfileId":{"type":"string","description":"End user profile ID for fetching 60-day wearable data, workout feedback, and completed sessions","example":"64e3bca9d1b7e600141a9712"},"endUserProfileDetails":{"description":"User profile information for workout adaptation","allOf":[{"$ref":"#/components/schemas/AdaptationEndUserProfileDetailsDto"}]},"exerciseSources":{"type":"array","description":"Exercise sources for potential substitutions","example":["premium_stock","team_exercises"],"items":{"type":"string","enum":["premium_stock","free_stock","team_exercises"]}},"userGuidance":{"type":"string","description":"User free text for guidance/feedback/context/injury/environment/constraints. Adapt-only name — do not send `userRequirements` (that field is generate-only; unknown keys → 400 ValidationError).","example":"I have a slight knee injury, avoid high-impact exercises. Working out at home with limited space.","maxLength":2000}},"required":["endUserProfileDetails","exerciseSources"]},"WorkoutAdaptationMetaDto":{"type":"object","properties":{"path":{"type":"string","enum":["gemini","repaired","fallback_recompose","fallback_basic"]},"noveltyScore":{"type":"number"},"softScore":{"type":"number"},"restComplianceScore":{"type":"number"},"hardConstraintsPassed":{"type":"boolean"}},"required":["path","noveltyScore","softScore","restComplianceScore","hardConstraintsPassed"]},"WorkoutAdaptationChangesReplacedItemDto":{"type":"object","properties":{"instanceId":{"type":"string"},"fromExerciseId":{"type":"string"},"toExerciseId":{"type":"string"}},"required":["instanceId","fromExerciseId","toExerciseId"]},"WorkoutAdaptationChangesDto":{"type":"object","properties":{"addedExerciseIds":{"type":"array","items":{"type":"string"}},"removedInstanceIds":{"type":"array","items":{"type":"string"}},"replaced":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutAdaptationChangesReplacedItemDto"}},"reorderedCount":{"type":"number"},"restPolicyApplied":{"type":"boolean"}},"required":["addedExerciseIds","removedInstanceIds","replaced","reorderedCount","restPolicyApplied"]},"WorkoutAdaptationResponseDto":{"type":"object","properties":{"name":{"type":"string","description":"Adapted workout name"},"instances":{"description":"Adapted instances","type":"array","items":{"$ref":"#/components/schemas/ApiInstanceDto"}},"totalDurationSeconds":{"type":"number","description":"Total duration in seconds"},"difficulty":{"type":"string","description":"Adapted workout difficulty"},"categoryId":{"type":"string","description":"Original category ID (preserved)"},"adaptationReasoning":{"type":"string","description":"Explanation of adaptations made"},"adaptationMeta":{"description":"Machine-readable adaptation metadata","allOf":[{"$ref":"#/components/schemas/WorkoutAdaptationMetaDto"}]},"changes":{"description":"Structured diff of what changed vs source","allOf":[{"$ref":"#/components/schemas/WorkoutAdaptationChangesDto"}]}},"required":["name","instances","adaptationReasoning"]},"AutopilotTaskResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Task ID"},"organizationId":{"type":"string","description":"Organization ID"},"ownerId":{"type":"string","description":"Task owner ID"},"name":{"type":"string","description":"Task name"},"status":{"type":"string","enum":["active","draft"],"description":"Task status"},"scope":{"type":"string","enum":["ai_generate","create_similar","publish_existing"],"description":"Task scope"},"contentType":{"type":"string","enum":["workout","program"],"description":"Content type"},"sourceContentId":{"type":"string","description":"Source content ID (for create_similar)"},"existingContentId":{"type":"string","description":"Existing content ID (for publish_existing)"},"categoryIds":{"description":"Category IDs","type":"array","items":{"type":"string"}},"goalIds":{"description":"Goal IDs","type":"array","items":{"type":"string"}},"durationMin":{"type":"number","description":"Min duration"},"durationMax":{"type":"number","description":"Max duration"},"workoutsPerWeekMin":{"type":"number","description":"Min workouts per week"},"workoutsPerWeekMax":{"type":"number","description":"Max workouts per week"},"difficultyOptions":{"description":"Difficulty options","type":"array","items":{"type":"string"}},"includeFreeStock":{"type":"boolean","description":"Include free stock exercises"},"includePremiumStock":{"type":"boolean","description":"Include premium stock exercises"},"includeTeamContent":{"type":"boolean","description":"Include team exercises"},"includeExerciseCollections":{"description":"Collection names used as the only allowed pool (create-similar workout tasks)","type":"array","items":{"type":"string"}},"excludeExerciseCollections":{"description":"Collection names excluded from the pool (create-similar workout tasks)","type":"array","items":{"type":"string"}},"repeatMode":{"type":"string","enum":["once","daily","weekly","biweekly","monthly"],"description":"Repeat schedule"},"repeatUntil":{"format":"date-time","type":"string","description":"Repeat until date"},"nextRunAt":{"type":"object","description":"Next scheduled execution","format":"date-time","nullable":true},"lastRunAt":{"type":"object","description":"Last execution time","format":"date-time","nullable":true},"assignToClientUserIds":{"description":"Client user IDs for content assignment","type":"array","items":{"type":"string"}},"promptGuidanceMode":{"type":"string","enum":["none","custom","ai_tuned","ai_driven"],"description":"Prompt guidance mode"},"customPromptGuidance":{"type":"string","description":"Custom prompt guidance text"},"createdAt":{"format":"date-time","type":"string","description":"Created at"},"updatedAt":{"format":"date-time","type":"string","description":"Updated at"}},"required":["id","organizationId","ownerId","name","status","scope","contentType","difficultyOptions","includeFreeStock","includePremiumStock","includeTeamContent","repeatMode","createdAt","updatedAt"]},"CreateAutopilotTaskDto":{"type":"object","properties":{"name":{"type":"string","description":"User-friendly task name (max 200 chars)","example":"Daily HIIT Generator"},"scope":{"type":"string","enum":["ai_generate","create_similar","publish_existing"],"description":"Task scope: ai_generate, create_similar, or publish_existing"},"contentType":{"type":"string","enum":["workout","program"],"description":"Content type to create: workout or program"},"sourceContentId":{"type":"string","description":"Source workout/program ID (required for create_similar scope)"},"existingContentId":{"type":"string","description":"Existing workout/program ID (required for publish_existing scope)"},"categoryIds":{"description":"Workout category IDs. One picked randomly per run when multiple.","type":"array","items":{"type":"string"}},"goalIds":{"description":"Program goal IDs. One picked randomly per run when multiple.","type":"array","items":{"type":"string"}},"durationMin":{"type":"number","description":"Min duration (minutes for workouts, weeks for programs)","minimum":1},"durationMax":{"type":"number","description":"Max duration (minutes for workouts, weeks for programs). Must be >= durationMin.","minimum":1},"workoutsPerWeekMin":{"type":"number","description":"Min workouts per week (programs only)","minimum":1,"maximum":7},"workoutsPerWeekMax":{"type":"number","description":"Max workouts per week (programs only). Must be >= workoutsPerWeekMin.","minimum":1,"maximum":7},"difficultyOptions":{"type":"array","description":"Difficulty options (1-3 values). One picked randomly per run when multiple.","example":["beginner","intermediate"],"items":{"type":"string","enum":["beginner","intermediate","advanced"]}},"includeFreeStock":{"type":"boolean","description":"Include free stock exercises","default":true},"includePremiumStock":{"type":"boolean","description":"Include premium stock exercises (requires premiumStock entitlement)","default":false},"includeTeamContent":{"type":"boolean","description":"Include team exercises","default":false},"includeExerciseCollections":{"description":"Exercise collection names to use as the only allowed pool for create-similar workout tasks (case-insensitive). Mutually exclusive with excludeExerciseCollections.","type":"array","items":{"type":"string"}},"excludeExerciseCollections":{"description":"Exercise collection names to exclude from the pool for create-similar workout tasks (case-insensitive). Mutually exclusive with includeExerciseCollections.","type":"array","items":{"type":"string"}},"repeatMode":{"type":"string","enum":["once","daily","weekly","biweekly","monthly"],"description":"Repeat schedule: once, daily, weekly, biweekly, monthly"},"repeatUntil":{"type":"string","description":"Repeat until date (ISO 8601). Omit for indefinite scheduling."},"nextRunAt":{"type":"string","description":"Initial scheduled execution date (ISO 8601). When omitted, computed on activation."},"assignToClientUserIds":{"description":"Client user IDs to assign created content to (max 100)","type":"array","items":{"type":"string"}},"promptGuidanceMode":{"type":"string","enum":["none","custom","ai_tuned","ai_driven"],"description":"Prompt guidance mode: none, custom, ai_tuned, ai_driven","default":"none"},"customPromptGuidance":{"type":"string","description":"Custom prompt guidance text (max 2000 chars). Used when promptGuidanceMode is custom.","maxLength":2000}},"required":["name","scope","contentType","difficultyOptions","repeatMode"]},"UpdateAutopilotTaskDto":{"type":"object","properties":{"name":{"type":"string","description":"Task name (max 200 chars)"},"categoryIds":{"description":"Workout category IDs","type":"array","items":{"type":"string"}},"goalIds":{"description":"Program goal IDs","type":"array","items":{"type":"string"}},"durationMin":{"type":"number","description":"Min duration"},"durationMax":{"type":"number","description":"Max duration"},"workoutsPerWeekMin":{"type":"number","description":"Min workouts per week (programs only)"},"workoutsPerWeekMax":{"type":"number","description":"Max workouts per week (programs only)"},"difficultyOptions":{"type":"array","description":"Difficulty options","items":{"type":"string","enum":["beginner","intermediate","advanced"]}},"includeFreeStock":{"type":"boolean","description":"Include free stock exercises"},"includePremiumStock":{"type":"boolean","description":"Include premium stock exercises"},"includeTeamContent":{"type":"boolean","description":"Include team exercises"},"includeExerciseCollections":{"description":"Exercise collection names to use as the only allowed pool (create-similar workout tasks). Mutually exclusive with excludeExerciseCollections.","type":"array","items":{"type":"string"}},"excludeExerciseCollections":{"description":"Exercise collection names to exclude from the pool (create-similar workout tasks). Mutually exclusive with includeExerciseCollections.","type":"array","items":{"type":"string"}},"repeatMode":{"type":"string","enum":["once","daily","weekly","biweekly","monthly"],"description":"Repeat schedule"},"repeatUntil":{"type":"string","description":"Repeat until date (ISO 8601)"},"nextRunAt":{"type":"string","description":"Next run date (ISO 8601). Use to reschedule an active task."},"assignToClientUserIds":{"description":"Client user IDs to assign content to","type":"array","items":{"type":"string"}},"promptGuidanceMode":{"type":"string","enum":["none","custom","ai_tuned","ai_driven"],"description":"Prompt guidance mode"},"customPromptGuidance":{"type":"string","description":"Custom prompt guidance text (max 2000 chars)","maxLength":2000}}},"ExportDropDto":{"type":"object","properties":{"channelPreset":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"],"description":"Channel preset; if omitted, uses drop channelPreset"},"aspectRatio":{"type":"string","enum":["9:16","1:1","16:9"],"description":"Aspect ratio override"},"duration":{"type":"number","enum":[15,30,60],"description":"Duration in seconds override"}}},"OrganizationConnectedPlatformsResponseDto":{"type":"object","properties":{"connectedPlatforms":{"type":"array","description":"Social platforms (instagram, tiktok, youtube, facebook, linkedin, threads) that have a connected account id stored for this organization","items":{"type":"string","enum":["instagram","tiktok","youtube","facebook","linkedin","threads"]}}},"required":["connectedPlatforms"]},"OrganizationSocialPublishTaskResponseDto":{"type":"object","properties":{"_id":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal id; use `id` instead. Will be removed in the next major Content API release."},"_teamId":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal team id; use `organizationId` instead. Will be removed in the next major Content API release."},"_ownerId":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal owner id; use `ownerId` instead. Will be removed in the next major Content API release."},"name":{"type":"string"},"status":{"type":"string","enum":["active","draft","paused"]},"publishAssetType":{"type":"string","enum":["social_drop","workout_full_video"]},"sourceMode":{"type":"string","enum":["manual_fixed","random_ready","ai_insights","content_mix","ai_pick"]},"dropId":{"type":"string"},"workoutId":{"type":"string"},"publishCopyPacks":{"type":"object","description":"workout_full_video: sanitized copy packs per channel (same shape as drop copyPacks)."},"workoutExportLocale":{"type":"string"},"coverOverridesByChannel":{"type":"object","description":"workout_full_video: S3 object keys for social/AI covers by channel preset and aspect ratio (same shape as Drop.coverOverridesByChannel). Not workout library thumbnails."},"readyDropPick":{"type":"string","enum":["random","latest"]},"allowedDropSourceTypes":{"type":"array","items":{"type":"string","enum":["exercise","exerciseCollection","workout","workoutCollection"]}},"allowedKinds":{"type":"array","description":"content_mix tasks only; empty = all kinds","items":{"type":"string","enum":["clip","tip","fact","myth_fact","insight","trend","quote","offer"]}},"primaryChannelPreset":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"]},"channelPresets":{"type":"array","items":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"]}},"exportAspectRatio":{"type":"string","enum":["9:16","1:1","16:9"]},"exportDurationSeconds":{"type":"number","enum":[15,30,60]},"repeatMode":{"type":"string","enum":["once","daily","weekly","biweekly","monthly"]},"repeatUntil":{"type":"object","nullable":true},"nextRunAt":{"type":"object"},"lastRunAt":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"id":{"type":"string","description":"Automation ID. Use this for all subsequent /v1/orgs/{orgId}/social-publish/{taskId} calls."},"organizationId":{"type":"string","description":"Organization (team) ID that owns this automation."},"ownerId":{"type":"string","description":"User ID of the organization owner that the automation runs on behalf of."},"lastRunOutcome":{"type":"string","enum":["success","failed","skipped_limit","skipped_no_drop","skipped_no_workout_export","skipped_zernio_config","skipped_safety","paused_connection_error"],"description":"Outcome of the most recent execution event for this automation"},"lastErrorSummary":{"type":"string","description":"Error or skip message from the most recent execution when it was not a success"},"lastExecutionAt":{"format":"date-time","type":"string","description":"Timestamp of the most recent execution event"}},"required":["name","status","publishAssetType","sourceMode","readyDropPick","allowedDropSourceTypes","allowedKinds","primaryChannelPreset","channelPresets","repeatMode","createdAt","updatedAt","id","organizationId","ownerId"]},"OrganizationSocialPublishTaskListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSocialPublishTaskResponseDto"}}},"required":["links","data"]},"CreateSocialDropPublishTaskDto":{"type":"object","properties":{"name":{"type":"string","description":"Automation name"},"publishAssetType":{"type":"string","enum":["social_drop","workout_full_video"],"description":"Defaults to social_drop. Use workout_full_video for full WorkoutExport video (not a social drop)."},"sourceMode":{"type":"string","enum":["manual_fixed","random_ready","ai_insights","content_mix","ai_pick"],"description":"Required for social_drop automations. When publishAssetType is workout_full_video, omit to default to manual_fixed."},"dropId":{"type":"string","description":"Required when sourceMode is manual_fixed and publishAssetType is social_drop"},"workoutId":{"type":"string","description":"Required when publishAssetType is workout_full_video"},"publishCopyPacks":{"type":"object","description":"workout_full_video: copy packs per channel (same fields as drop copyPacks). The outbound publish payload uses copy for primaryChannelPreset; if hook and caption are both empty at run time, Gemini generates and the result is saved on the task."},"workoutExportLocale":{"type":"string","description":"Locale for choosing WorkoutExport variant when publishAssetType is workout_full_video"},"locale":{"type":"string","description":"Alias for workoutExportLocale when publishAssetType is workout_full_video. If both are set, workoutExportLocale wins."},"readyDropPick":{"type":"string","enum":["random","latest"],"description":"For random_ready / ai_insights: random among up to 80 most recently updated ready drops, or the newest one. Posts published in the last 30 days are never picked; when none is left the run skips (skipped_no_drop). Ignored for manual_fixed.","default":"random"},"allowedDropSourceTypes":{"type":"array","description":"Pool of drop source types (exercise=clip/video, exerciseCollection=exercise groups, workout, workoutCollection=program). Omit or empty = all types.","items":{"type":"string","enum":["exercise","exerciseCollection","workout","workoutCollection"]}},"allowedKinds":{"type":"array","description":"content_mix tasks: content kinds a run may use. Omit or empty = every kind the task formats support.","items":{"type":"string","enum":["clip","tip","fact","myth_fact","insight","trend","quote","offer"]}},"primaryChannelPreset":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"]},"channelPresets":{"type":"array","description":"Target channel presets for publishing; must include primary.","items":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"]}},"repeatMode":{"type":"string","enum":["once","daily","weekly","biweekly","monthly"]},"repeatUntil":{"type":"string","description":"Repeat until (ISO 8601)"},"nextRunAt":{"type":"string","description":"Next run (ISO 8601)"},"exportAspectRatio":{"type":"string","enum":["9:16","1:1","16:9"],"description":"Export variant aspect ratio override"},"exportDurationSeconds":{"type":"number","enum":[15,30,60],"description":"Export variant duration override (seconds)"}},"required":["name","primaryChannelPreset","channelPresets","repeatMode"]},"OrganizationPatchSocialPublishTaskDto":{"type":"object","properties":{"name":{"type":"string"},"publishAssetType":{"type":"string","enum":["social_drop","workout_full_video"]},"sourceMode":{"type":"string","enum":["manual_fixed","random_ready","ai_insights","content_mix","ai_pick"]},"dropId":{"type":"object","nullable":true,"description":"Id of the drop, or null to clear (omit to leave unchanged)"},"workoutId":{"type":"object","nullable":true,"description":"Id of the workout, or null to clear (omit to leave unchanged)"},"publishCopyPacks":{"type":"object","description":"workout_full_video: merges into existing publishCopyPacks by channel key (same semantics as PATCH drop copyPacks)."},"workoutExportLocale":{"type":"object"},"locale":{"type":"object","description":"Alias for workoutExportLocale on workout_full_video tasks. If both are set in one request, workoutExportLocale wins."},"readyDropPick":{"type":"string","enum":["random","latest"]},"allowedDropSourceTypes":{"type":"array","items":{"type":"string","enum":["exercise","exerciseCollection","workout","workoutCollection"]}},"allowedKinds":{"type":"array","items":{"type":"string","enum":["clip","tip","fact","myth_fact","insight","trend","quote","offer"]}},"primaryChannelPreset":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"]},"channelPresets":{"type":"array","items":{"type":"string","enum":["ig_reels","ig_stories","ig_carousel","tiktok","yt_shorts","fb_reels","yt_longform","ig_post","fb_post","linkedin_post","threads_post"]}},"repeatMode":{"type":"string","enum":["once","daily","weekly","biweekly","monthly"]},"repeatUntil":{"type":"object","nullable":true,"description":"ISO 8601 end of recurrence, or null to clear"},"nextRunAt":{"type":"string"},"exportAspectRatio":{"type":"string","enum":["9:16","1:1","16:9"]},"exportDurationSeconds":{"type":"number","enum":[15,30,60]},"status":{"type":"string","enum":["draft","active"],"description":"Set to active to schedule runs (requires connected accounts for all channel preset platforms). Set to draft to pause and clear nextRunAt. The paused status is system-owned (set on repeated connection failures) and cannot be written; resume with status: active after reconnecting channels."}}},"WorkoutPlaylistResponse":{"type":"object","properties":{"data":{"description":"An ordered array of workout segments. Each object in the array has a single key indicating the segment type (e.g., 'intro', 'exercise', 'break') and the value is the corresponding segment object.","example":[{"intro":{"kind":"workout-intro","id":"intro","duration":5.2}},{"exercise":{"kind":"exercise","id":"exercise_squats_1","exerciseId":"507f1f77bcf86cd799439011","duration":45,"name":"Bodyweight Squats"}},{"class":{"kind":"class","id":"class_strength_1","exerciseId":"507f1f77bcf86cd799439013","duration":1200,"name":"Morning Strength Class","chapters":[{"name":"Goblet Squat","startTimeSec":180.5,"endTimeSec":420,"equipment":[{"id":"60812e08606fc90011eb4408","name":"Kettlebell"}],"muscleGroups":[{"id":"604b0177076fe2727354d743","name":"Quadriceps"}]}]}},{"break":{"kind":"break","id":"break_1","duration":30}},{"exercise":{"kind":"exercise","id":"exercise_pushups_1","exerciseId":"507f1f77bcf86cd799439012","duration":45,"name":"Push-ups"}},{"outro":{"kind":"workout-outro","id":"outro","duration":45.5}}],"type":"array","items":{"type":"string"}},"presentationStyle":{"type":"string","enum":["full","minimal","essential","noOverlays"],"description":"Video overlay presentation style for this workout. Determines which UI elements the player should render. Null if not specified.","example":"full"},"links":{"type":"object","description":"Related links for the workout playlist (currently unused).","example":{}}},"required":["data","links"]},"WorkoutMusicTrack":{"type":"object","properties":{"id":{"type":"string","description":"Track ID","example":"track_123"},"name":{"type":"string","description":"Track name","example":"Upbeat Workout Mix"},"duration":{"type":"number","description":"Track duration in seconds","example":180},"url":{"type":"string","description":"Time-limited AWS S3 presigned HTTPS URL to the track (typically M4A/AAC, ~7 days). Play the string verbatim — do not rebuild the query or send X-Api-Key on the media request.","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/track.m4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=..."},"filename":{"type":"string","description":"Track filename","example":"upbeat-mix.mp4a"},"bpm":{"type":"number","description":"Track BPM (beats per minute)","example":128}},"required":["id","name","duration","url"]},"WorkoutMusicPlaylistResponse":{"type":"object","properties":{"tracks":{"description":"Ordered list of music tracks","type":"array","items":{"$ref":"#/components/schemas/WorkoutMusicTrack"}},"totalDuration":{"type":"number","description":"Total playlist duration in seconds","example":1800},"workoutDuration":{"type":"number","description":"Workout duration in seconds","example":1650}},"required":["tracks","totalDuration","workoutDuration"]},"StartWorkoutSessionBody":{"type":"object","properties":{"endUserId":{"type":"string","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"externalUserId":{"type":"string","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","example":"ext-user-12345"},"organizationId":{"type":"string","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"programPosition":{"type":"number","description":"Active-program slot (0-based) this session should fill when completed. Ignored unless that slot is still this workout."}}},"WorkoutSessionWearableActivity":{"type":"object","properties":{"activityType":{"type":"object","description":"Wearable activity type (null when the provider could not classify it)","nullable":true},"source":{"type":"object","description":"Wearable provider (e.g. Garmin)","nullable":true},"durationSeconds":{"type":"object","description":"Activity length on the wearable (seconds)","nullable":true},"activeCaloriesKcal":{"type":"object","description":"Measured active calories (kcal)","nullable":true},"distanceMeters":{"type":"object","description":"Measured distance (meters)","nullable":true},"hrAvg":{"type":"object","description":"Measured average heart rate (BPM)","nullable":true},"hrMax":{"type":"object","description":"Measured maximum heart rate (BPM)","nullable":true},"hrMin":{"type":"object","description":"Measured minimum heart rate (BPM)","nullable":true},"lowIntensitySeconds":{"type":"object","description":"Seconds spent in the low-intensity effort band","nullable":true},"moderateIntensitySeconds":{"type":"object","description":"Seconds spent in the moderate-intensity effort band","nullable":true},"vigorousIntensitySeconds":{"type":"object","description":"Seconds spent in the vigorous-intensity effort band","nullable":true},"powerAvgWatts":{"type":"object","description":"Average power (watts)","nullable":true},"powerMaxWatts":{"type":"object","description":"Maximum power (watts)","nullable":true},"floorsClimbed":{"type":"object","description":"Floors climbed during the activity","nullable":true},"steps":{"type":"object","description":"Steps during the activity","nullable":true},"paceAvgMinPerKm":{"type":"object","description":"Average pace (minutes per km)","nullable":true},"speedAvgMps":{"type":"object","description":"Average speed (meters per second)","nullable":true},"cadenceAvgRpm":{"type":"object","description":"Average cadence (rpm / spm)","nullable":true},"elevationGainMeters":{"type":"object","description":"Elevation gained (meters)","nullable":true},"sources":{"description":"Every device that contributed data, primary (most data) first. A workout that also arrived through a phone health store counts once (e.g. Fitbit via Apple Health is \"Fitbit\").","example":["Fitbit","Apple Watch"],"type":"array","items":{"type":"string"}},"fieldSources":{"type":"object","description":"Device each metric group came from (heartRate, intensity, calories, distance, steps, cadence, power, elevation, floors)","nullable":true,"example":{"heartRate":"Fitbit","intensity":"Fitbit","calories":"Apple Watch"}}}},"WorkoutSessionLogDraftEntry":{"type":"object","properties":{"instanceId":{"type":"string","description":"Exercise instance (set) id from the workout playlist.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"weight":{"type":"number","description":"Weight in weightUnit.","example":12},"reps":{"type":"number","description":"Reps done.","example":10}},"required":["instanceId"]},"WorkoutSessionLogDraft":{"type":"object","properties":{"weightUnit":{"type":"string","enum":["metric","imperial"],"nullable":true,"example":"metric"},"exerciseData":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutSessionLogDraftEntry"}},"updatedAt":{"format":"date-time","type":"string","description":"When the server stored this draft.","example":"2026-11-09T18:00:00.000Z"}},"required":["exerciseData","updatedAt"]},"WorkoutSession":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the workout session.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the session was created.","example":"2023-10-28T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the session was last updated.","example":"2023-10-28T10:30:15.500Z"},"workoutId":{"type":"string","description":"ID of the workout associated with this session.","example":"12ab3efd45c67c1234566cd1"},"workoutSegmentId":{"type":"string","description":"ID of the current workout segment being played (from playlist). Use this to track which part of the workout the user is on.","example":"seg-exercise-2"},"status":{"type":"string","description":"Current status of the workout session.","enum":["started","completed"],"example":"started"},"duration":{"type":"number","description":"Total actual playback time in seconds (not including pauses). This is the duration the user has been actively engaged with the workout.","example":125.5,"minimum":0},"progress":{"type":"number","description":"Completion progress as a fraction (0.0 = not started, 1.0 = 100% complete). Calculated based on current segment position within the total workout.","example":0.75,"minimum":0,"maximum":1},"wearableActivity":{"description":"Measured biometrics from an overlapping wearable activity reconciled to this workout (if any).","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WorkoutSessionWearableActivity"}]},"logDraft":{"description":"In-player weight / reps logged in this session but not yet sent with the check-in (set via PATCH logDraft). Null when none.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WorkoutSessionLogDraft"}]}},"required":["id","createdAt","updatedAt","workoutId","workoutSegmentId","status","duration","progress"]},"WorkoutSessionResponse":{"type":"object","properties":{"data":{"description":"Contains the detailed workout session object.","allOf":[{"$ref":"#/components/schemas/WorkoutSession"}]}},"required":["data"]},"PatchWorkoutSessionBody":{"type":"object","properties":{"endUserId":{"type":"string","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"externalUserId":{"type":"string","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","example":"ext-user-12345"},"organizationId":{"type":"string","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"workoutSegmentId":{"type":"string","description":"ID of the current workout segment.","example":"seg-exercise-squat-1"},"progressSeconds":{"type":"number","description":"Actual playback time in seconds. This is the primary method for tracking session duration accurately. Send this value on each PATCH to record how much time the user has actually spent playing the workout (excluding paused time). Duration is capped at 2x the expected workout duration.","example":125.5,"minimum":0},"state":{"type":"string","description":"[Deprecated] This field is accepted for backward compatibility but does not affect duration calculation. Duration is tracked via progressSeconds.","enum":["active","paused"],"example":"paused","deprecated":true},"logDraft":{"description":"In-player weight / reps logged so far but not yet sent with the check-in. Stored on the session (no completion, webhook or adaptation side effects) and returned by GET .../sessions/recent so logs survive a quit, reload or device switch. Send it with progressSeconds (a draft-only PATCH leaves duration and progress as they are). null clears it. The whole PATCH is a 400 when the draft is invalid. The final logs go out with POST /v1/workouts/{workoutId}/feedback exerciseData, which clears the draft.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WorkoutSessionLogDraft"}]}}},"EndWorkoutSessionBody":{"type":"object","properties":{"endUserId":{"type":"string","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"externalUserId":{"type":"string","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","example":"ext-user-12345"},"organizationId":{"type":"string","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"sessionId":{"type":"string","description":"The ID of the session to end.","example":"session-uuid-12345"},"progress":{"type":"number","description":"[Deprecated] This field is accepted but the actual progress is calculated from the last progressSeconds sent via PATCH.","example":100,"deprecated":true},"programPosition":{"type":"number","description":"Active-program slot (0-based) this completion should fill. Ignored unless that slot is still this workout."}},"required":["sessionId"]},"CompleteWorkoutSessionBody":{"type":"object","properties":{"endUserId":{"type":"string","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"externalUserId":{"type":"string","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","example":"ext-user-12345"},"organizationId":{"type":"string","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"sessionId":{"type":"string","description":"The ID of the specific workout session to mark as completed with 100% progress.","example":"session-uuid-12345"},"programPosition":{"type":"number","description":"Active-program slot (0-based) this completion should fill. Ignored unless that slot is still this workout."}},"required":["sessionId"]},"WorkoutFeedbackRatingOption":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this rating option","example":"507f1f77bcf86cd799439011"},"label":{"type":"string","description":"Human-readable label for this rating option","example":"Very Good"},"value":{"type":"number","description":"Numeric value representing this rating","example":4,"minimum":1,"maximum":5}},"required":["id","label","value"]},"WorkoutFeedbackDifficultyOption":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this difficulty option","example":"507f1f77bcf86cd799439012"},"label":{"type":"string","description":"Human-readable label for this difficulty level","example":"Challenging"},"value":{"type":"number","description":"Numeric value representing this difficulty level","example":4,"minimum":1,"maximum":5}},"required":["id","label","value"]},"WorkoutFeedbackOptions":{"type":"object","properties":{"rating":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutFeedbackRatingOption"}},"difficulty":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutFeedbackDifficultyOption"}}},"required":["rating","difficulty"]},"WorkoutFeedbackOptionsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WorkoutFeedbackOptions"}},"required":["data"]},"ExerciseFeedbackData":{"type":"object","properties":{"instanceId":{"type":"string","description":"Instance ID from workout playlist segment","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"weight":{"type":"number","description":"Weight used for this exercise (in the unit specified by weightUnit). Can be provided alone or together with reps.","minimum":0,"maximum":1000,"example":25.5},"reps":{"type":"number","description":"Number of reps completed. Can be provided alone or together with weight. Required for AMRAP/time-based exercises or rep-based exercises.","minimum":1,"maximum":100,"example":15}},"required":["instanceId"]},"SubmitWorkoutFeedbackBody":{"type":"object","properties":{"endUserId":{"type":"string","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"externalUserId":{"type":"string","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","example":"ext-user-12345"},"organizationId":{"type":"string","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"workoutSessionId":{"type":"string","description":"The ID of the completed workout session this feedback pertains to.","example":"12ab3efd45c67c1234566cd1"},"ratingId":{"type":"string","description":"Overall rating option ID. Must be one of `data.rating[].id` from `GET /workouts/feedback/options` (a difficulty option id is rejected with 400).","example":"rating-opt-5star"},"difficultyId":{"type":"string","description":"Perceived difficulty option ID. Must be one of `data.difficulty[].id` from `GET /workouts/feedback/options` (a rating option id is rejected with 400).","example":"difficulty-opt-moderate"},"comment":{"type":"string","description":"Optional free-text user comment about the workout.","example":"Great workout, but the music was a bit too loud.","maxLength":1000},"painScore":{"type":"number","description":"Self-reported pain after the session, 0 (none) to 10 (worst). Physio / rehab programs ask for it at check-in; the member's own number, stored as reported and surfaced in the daily digest and the coach view. Omit for non-rehab check-ins.","minimum":0,"maximum":10,"example":3},"weightUnit":{"type":"string","enum":["metric","imperial"],"description":"Unit system for weight values. Required if exerciseData contains weight values.","example":"metric"},"exerciseData":{"description":"Weights and reps per set: one entry per instanceId (exercise instance from the playlist; duplicates or ids not in the workout are 400). Weight needs weightUnit.","type":"array","items":{"$ref":"#/components/schemas/ExerciseFeedbackData"}},"keepProgress":{"type":"boolean","description":"The member ended the workout early (\"End now\"): save the check-in but keep the session progress. A session already ended keeps its progress; an open one is ended at its last PATCHed progress (send the final progressSeconds first). Default false: the check-in completes the session at 100% (natural finish, \"Mark as done\").","example":false}},"required":["workoutSessionId"]},"ExerciseFeedbackDataResponse":{"type":"object","properties":{"instanceId":{"type":"string","description":"Instance ID from workout playlist identifying which exercise this feedback is for","example":"64f1a2b3c4d5e6f7a8b9c0d2"},"weight":{"type":"number","description":"Weight used for this exercise (in weightUnit specified in feedback)","example":25.5},"reps":{"type":"number","description":"Number of repetitions completed for this exercise","example":12,"minimum":0}},"required":["instanceId"]},"WorkoutFeedback":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this feedback record","example":"67d1a2b3c4e5f6789abc0d2"},"createdAt":{"format":"date-time","type":"string","description":"When this feedback was submitted","example":"2025-01-10T09:30:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"When this feedback was last updated","example":"2025-01-10T09:30:00.000Z"},"workoutId":{"type":"string","description":"ID of the workout this feedback is for","example":"12ab3efd45c67c1234566cd1"},"workoutSessionId":{"type":"string","description":"ID of the workout session this feedback is associated with","example":"67d1a2b3c4e5f6789abc0d1"},"rating":{"nullable":true,"description":"User rating of the workout experience","type":"object","allOf":[{"$ref":"#/components/schemas/WorkoutFeedbackRatingOption"}]},"difficulty":{"nullable":true,"description":"User assessment of workout difficulty level","type":"object","allOf":[{"$ref":"#/components/schemas/WorkoutFeedbackDifficultyOption"}]},"comment":{"type":"string","description":"Optional user comment or additional feedback","nullable":true,"example":"Great workout! Felt appropriately challenging."},"painScore":{"type":"object","description":"Self-reported pain after the session, 0-10 (physio / rehab check-ins); null when not asked.","nullable":true,"example":3},"weightUnit":{"type":"string","enum":["metric","imperial"],"nullable":true,"description":"Unit system used for weight measurements","example":"metric"},"exerciseData":{"nullable":true,"description":"Detailed performance data for individual exercises","type":"array","items":{"$ref":"#/components/schemas/ExerciseFeedbackDataResponse"}}},"required":["id","createdAt","updatedAt","workoutId","workoutSessionId","rating","difficulty"]},"WorkoutFeedbackResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WorkoutFeedback"}},"required":["data"]},"PlanWorkoutListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the workout was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the workout.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout. Localized based on locale query parameter.","example":"Full Body Blast"},"description":{"type":"string","description":"Detailed description of the workout, potentially including goals and target audience. Localized based on locale query parameter.","example":"A 30-minute high-intensity interval training session designed to improve cardiovascular fitness and strength."},"audioIntro":{"description":"Localized workout introduction audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"audioOutro":{"description":"Localized workout outro audio. Selected based on locale query parameter and user preferences.","allOf":[{"$ref":"#/components/schemas/WorkoutAudio"}]},"duration":{"type":"number","description":"Estimated workout duration in seconds.","example":1800},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Raw difficulty enum value (beginner|intermediate|advanced). Clients should map to localized strings. Null if not specified.","example":"beginner"},"preview":{"description":"`url` is a time-limited presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (cover / still / clip) — not the MP4, not HTML. Null if no preview is available.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"rating":{"type":"number","nullable":true,"description":"Average user rating (e.g., 1-5). Null if not rated.","example":4.5},"visibility":{"type":"string","enum":["private","public"],"description":"Visibility level of the workout.","example":"public"},"locked":{"type":"boolean","description":"Indicates if the workout requires a subscription or specific entitlement to access.","example":false},"mixBgMusic":{"type":"boolean","description":"Whether to mix background music with workout audio. If true, background music will be played alongside exercise instructions.","example":true},"presentationStyle":{"type":"string","enum":["full","minimal","essential","noOverlays"],"description":"Video overlay presentation style. Controls which UI elements are shown during workout playback.","example":"full"},"skipWorkoutPreview":{"type":"boolean","description":"If true, skip workout preview/intro segment in interactive player","example":false},"skipWorkoutCompletionScreen":{"type":"boolean","description":"If true, skip workout completion/outro screen in interactive player","example":false},"videoAudioMode":{"type":"string","enum":["full","instructionsOnly","beepsOnly","none"],"description":"Audio policy for interactive playback and full-workout export. Controls which audio components are included (voice, beeps, background music).","example":"full"},"categories":{"description":"List of categories associated with the workout (e.g., HIIT, Strength, Yoga). Category names are localized based on locale query parameter.","type":"array","items":{"$ref":"#/components/schemas/Category"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not categories and not used by recommend or generate.","type":"array","items":{"type":"string"}},"allowAssessment":{"type":"boolean","description":"Whether this workout supports AI assessment mode","example":false},"assessmentType":{"type":"string","enum":["mobility_baseline","glp1_muscle_guard","movement_assessment","overall_assessment","learning_tutorial","learning_practice"],"description":"Type of assessment supported (if allowAssessment is true)","example":"mobility_baseline","nullable":true},"positionInPlan":{"type":"number","description":"0-based slot of this workout in the plan sequence. Matches the position keys of `GET .../endusers/{endUserId}/plans/active/progress` and `schedule.todaysWorkout.position`. The same workout id can appear at several positions.","example":0}},"required":["id","createdAt","updatedAt","trainer","name","description","duration","visibility","locked","categories","tags","positionInPlan"]},"PlanWorkoutListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"description":"Workouts in plan order. Slots whose workout is no longer available are omitted, so `positionInPlan` may have gaps.","type":"array","items":{"$ref":"#/components/schemas/PlanWorkoutListItem"}}},"required":["links","data"]},"Goal":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the goal.","example":"goal-strength-gain"},"name":{"type":"string","description":"Display name of the goal. Localized based on locale query parameter.","example":"Strength Gain"},"nameTranslations":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized goal names for different locales","example":{"en-US":"Weight Loss","de-DE":"Gewichtsverlust","fr-FR":"Perte de Poids"}}},"required":["id","name"]},"SimilarPlanListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout plan.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the plan was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the plan was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the plan. Can be null.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout plan. Localized based on locale query parameter.","example":"4-Week Strength Builder"},"description":{"type":"string","description":"Detailed description of the plan, including its purpose and target audience. Localized based on locale query parameter.","example":"A structured 4-week program designed to increase overall strength using compound lifts."},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Overall difficulty level of the plan.","example":"intermediate"},"visibility":{"type":"string","enum":["private","public","end-user-ai-generated"],"description":"Visibility level of the plan.","example":"public"},"durationInWeeks":{"type":"number","description":"Program duration in weeks (1-24). Use for filtering: ?durationInWeeks=8. Total workouts = durationInWeeks × workoutsPerWeek","example":8,"minimum":1,"maximum":24},"workoutsPerWeek":{"type":"number","description":"Weekly workout frequency (1-7). Total workouts = durationInWeeks × workoutsPerWeek","example":3,"minimum":1,"maximum":7},"adaptationReasoning":{"type":"string","description":"AI adaptation reasoning explanation (only present for AI-adapted programs)","example":"Program adapted to reduce intensity based on low sleep scores. Replaced 3 high-intensity workouts with recovery-focused alternatives."},"originalProgramId":{"type":"string","description":"Original program ID if this program was adapted from another (only present for AI-adapted programs)","example":"507f1f77bcf86cd799439016"},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs when present.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"goals":{"description":"List of primary goals this plan is designed for (e.g., Strength, Endurance, Weight Loss).","type":"array","items":{"$ref":"#/components/schemas/Goal"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not goals and not used by recommend or generate.","type":"array","items":{"type":"string"}},"matchLabels":{"description":"Up to two short reasons this program matches the source. Fixed English labels.","example":["Same goal","Same schedule"],"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","name","description","difficulty","visibility","goals","tags","matchLabels"]},"SimilarPlanListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"description":"Ranked similar programs. `links.next` is omitted. `links.total` is the number returned.","type":"array","items":{"$ref":"#/components/schemas/SimilarPlanListItem"}}},"required":["links","data"]},"MuscleGroup":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the muscle group.","example":"mg-legs-abc"},"name":{"type":"string","description":"Display name of the muscle group. Localized based on locale query parameter.","example":"Legs"}},"required":["id","name"]},"ExerciseBundleRefDto":{"type":"object","properties":{"id":{"type":"string","description":"Bundle ID"},"bundleIdentifier":{"type":"string","description":"Asensei bundle identifier"},"downloadUrl":{"type":"string","description":"Pre-signed download URL for bundle JSON content"},"displayName":{"type":"string","description":"Human-readable display name"}},"required":["id","bundleIdentifier","downloadUrl"]},"AudioDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"assetUri":{"type":"string","description":"Time-limited AWS S3 presigned HTTPS URL to the instruction audio (typically M4A, ~7 days). Play the string verbatim — no query rewrite, no X-Api-Key on the media request.","example":"https://hhcontent.s3.eu-central-1.amazonaws.com/example/inst-en-US.m4a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-Signature=..."},"type":{"type":"string"},"locale":{"type":"string"},"scriptText":{"type":"string","description":"Verbatim transcript / script of the spoken instruction (the text the narrator reads in the `assetUri` clip). Useful for closed captions, accessibility, search indexing, and AI summarization. Optional: legacy or stock recordings without a stored script omit this field.","example":"Stand tall with your feet shoulder-width apart. Lower into a squat, keeping your chest up."}},"required":["id","createdAt","assetUri","type","locale"]},"VideoAssetListItem":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"trainer":{"description":"Creator reference for the workspace member who owns this asset in Hyperhuman Teams. The JSON field name remains `trainer` for API compatibility.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string"},"kind":{"type":"string","enum":["single-exercise","multi-exercise","class","promo","educational"],"description":"Video kind. See the VIDEO TYPE GUIDE on the list operation for product names and audio behavior."},"muscleGroups":{"type":"array","items":{"$ref":"#/components/schemas/MuscleGroup"}},"equipment":{"type":"array","items":{"$ref":"#/components/schemas/Equipment"}},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (exercise still / cover) when present — not the MP4.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"collectionName":{"type":"string"},"coach":{"type":"string","enum":["male","female"]},"tags":{"type":"array","items":{"type":"string"}},"skillLevel":{"type":"string","enum":["beginner","intermediate","advanced"]},"categories":{"type":"array","items":{"type":"string","enum":["strength","cardio","mobility","balance","endurance","flexibility","plyometrics","recovery","running"]}},"executionSide":{"type":"string","enum":["both","left","right","alternating"]},"showcasedReps":{"type":"number"},"bundle":{"description":"Asensei movement bundle for this exercise","allOf":[{"$ref":"#/components/schemas/ExerciseBundleRefDto"}]},"playsInLoop":{"type":"boolean","description":"Default true for smart clips (`single-exercise`). When true, playlist `exercise.main.video.loop` is `-1` and players / workout export repeat the clip until the planned segment duration (time-based slot or reps × estimatedRepDuration). When false (typical for original / `multi-exercise` recordings), play the file once. A shorter MP4 than the workout slot (e.g. 27s file in a 60s segment) is intended — the file is the looping demo, not the work window."},"organization":{"nullable":true,"description":"Workspace (organization) this exercise belongs to. `null` when the workspace cannot be resolved.","type":"object","allOf":[{"$ref":"#/components/schemas/Organization"}]},"audioInstructions":{"description":"Locale-specific instruction audio tracks. Emitted only for `kind: single-exercise` (the smart-clip product type that strips original audio in favor of multilingual instructions). Narrowed with the standard locale chain (English fallback). When `locale` is omitted the list uses `en-US`. Empty array for `single-exercise` rows that have not yet been narrated. Always empty for the other kinds (`multi-exercise`, `educational`, `promo`, `class`) which keep their original audio baked into the video.","type":"array","items":{"$ref":"#/components/schemas/AudioDto"}}},"required":["id","createdAt","trainer","name","kind","muscleGroups","equipment","playsInLoop","organization"]},"VideoAssetsListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/VideoAssetListItem"}},"explanation":{"type":"string","description":"Explanation for how this list was filtered or scoped."}},"required":["links","data"]},"StockVideoAssetListItem":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["single-exercise","multi-exercise","class","promo","educational"],"description":"Video kind. See the VIDEO TYPE GUIDE on the list operation for product names and audio behavior."},"muscleGroups":{"type":"array","items":{"$ref":"#/components/schemas/MuscleGroup"}},"equipment":{"type":"array","items":{"$ref":"#/components/schemas/Equipment"}},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (exercise still / cover) when present — not the MP4.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"collectionName":{"type":"string"},"coach":{"type":"string","enum":["male","female"]},"tags":{"type":"array","items":{"type":"string"}},"skillLevel":{"type":"string","enum":["beginner","intermediate","advanced"]},"categories":{"type":"array","items":{"type":"string","enum":["strength","cardio","mobility","balance","endurance","flexibility","plyometrics","recovery","running"]}},"executionSide":{"type":"string","enum":["both","left","right","alternating"]},"showcasedReps":{"type":"number"},"playsInLoop":{"type":"boolean","description":"Default true for smart clips (`single-exercise`). When true, playlist `exercise.main.video.loop` is `-1` and players / workout export repeat the clip until the planned segment duration (time-based slot or reps × estimatedRepDuration). When false (typical for original / `multi-exercise` recordings), play the file once. A shorter MP4 than the workout slot (e.g. 27s file in a 60s segment) is intended — the file is the looping demo, not the work window."},"audioInstructions":{"description":"Locale-specific instruction audio tracks. Emitted only for `kind: single-exercise` (the smart-clip product type that strips original audio in favor of multilingual instructions). Narrowed with the standard locale chain (English fallback). When `locale` is omitted the list uses `en-US`. Empty array for `single-exercise` rows that have not yet been narrated. Always empty for the other kinds (`multi-exercise`, `educational`, `promo`, `class`) which keep their original audio baked into the video.","type":"array","items":{"$ref":"#/components/schemas/AudioDto"}}},"required":["id","createdAt","name","kind","muscleGroups","equipment","playsInLoop"]},"StockVideoAssetsListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/StockVideoAssetListItem"}},"explanation":{"type":"string","description":"Explanation for how this list was filtered or scoped."}},"required":["links","data"]},"TimeBasedConfig":{"type":"object","properties":{"kind":{"type":"string","enum":["timeBased"]},"duration":{"type":"number"},"pace":{"type":"string","enum":["slow","medium","fast"],"nullable":true},"weightLevel":{"type":"string","enum":["light","medium","heavy"],"nullable":true},"rpe":{"type":"number","description":"Rate of Perceived Exertion (0-10). Target intensity level for this exercise.","minimum":0,"maximum":10},"amrap":{"type":"boolean","description":"As Many Reps As Possible mode. Only applicable for time-based exercises."}},"required":["kind","duration"]},"RepsBasedConfig":{"type":"object","properties":{"kind":{"type":"string","enum":["repsBased"]},"reps":{"type":"number"},"weightLevel":{"type":"string","enum":["light","medium","heavy"],"nullable":true},"pace":{"type":"string","enum":["slow","medium","fast"],"nullable":true},"rpe":{"type":"number","description":"Rate of Perceived Exertion (0-10). Target intensity level for this exercise.","minimum":0,"maximum":10}},"required":["kind","reps"]},"SingleExerciseConfig":{"type":"object","properties":{"timeBasedConfig":{"description":"Time based configuration","allOf":[{"$ref":"#/components/schemas/TimeBasedConfig"}]},"repsBasedConfig":{"description":"Reps based configuration","allOf":[{"$ref":"#/components/schemas/RepsBasedConfig"}]}}},"GroupListItem":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"trainer":{"$ref":"#/components/schemas/TrainerRef"},"name":{"type":"string"},"kind":{"type":"string","enum":["circuit","sets"]},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs when present — not the MP4.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"rounds":{"type":"number"},"roundBreakDuration":{"type":"number"},"exerciseBreakDuration":{"type":"number"},"exerciseConfig":{"$ref":"#/components/schemas/SingleExerciseConfig"},"organization":{"nullable":true,"description":"Owning organization. Null for stock (platform) groups.","type":"object","allOf":[{"$ref":"#/components/schemas/Organization"}]}},"required":["id","createdAt","updatedAt","trainer","name","kind","rounds","roundBreakDuration","exerciseBreakDuration","exerciseConfig"]},"GroupListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupListItem"}},"explanation":{"type":"string","description":"Explanation for how this list was filtered or sorted"}},"required":["links","data"]},"Group":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"trainer":{"$ref":"#/components/schemas/TrainerRef"},"name":{"type":"string"},"kind":{"type":"string","enum":["circuit","sets"]},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs when present — not the MP4.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"rounds":{"type":"number"},"roundBreakDuration":{"type":"number"},"exerciseBreakDuration":{"type":"number"},"exerciseConfig":{"$ref":"#/components/schemas/SingleExerciseConfig"},"organization":{"nullable":true,"description":"Owning organization. Null for stock (platform) groups.","type":"object","allOf":[{"$ref":"#/components/schemas/Organization"}]}},"required":["id","createdAt","updatedAt","trainer","name","kind","rounds","roundBreakDuration","exerciseBreakDuration","exerciseConfig"]},"GroupResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Group"}},"required":["data"]},"GroupExerciseInstanceDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"trainer":{"description":"Creator reference for the workspace member who owns this asset in Hyperhuman Teams. The JSON field name remains `trainer` for API compatibility.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string"},"kind":{"type":"string","enum":["single-exercise","multi-exercise","class","promo","educational"],"description":"Video kind. See the VIDEO TYPE GUIDE on the list operation for product names and audio behavior."},"muscleGroups":{"type":"array","items":{"$ref":"#/components/schemas/MuscleGroup"}},"equipment":{"type":"array","items":{"$ref":"#/components/schemas/Equipment"}},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs (exercise still / cover) when present — not the MP4.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"collectionName":{"type":"string"},"coach":{"type":"string","enum":["male","female"]},"tags":{"type":"array","items":{"type":"string"}},"skillLevel":{"type":"string","enum":["beginner","intermediate","advanced"]},"categories":{"type":"array","items":{"type":"string","enum":["strength","cardio","mobility","balance","endurance","flexibility","plyometrics","recovery","running"]}},"executionSide":{"type":"string","enum":["both","left","right","alternating"]},"showcasedReps":{"type":"number"},"bundle":{"description":"Asensei movement bundle for this exercise","allOf":[{"$ref":"#/components/schemas/ExerciseBundleRefDto"}]},"playsInLoop":{"type":"boolean","description":"Default true for smart clips (`single-exercise`). When true, playlist `exercise.main.video.loop` is `-1` and players / workout export repeat the clip until the planned segment duration (time-based slot or reps × estimatedRepDuration). When false (typical for original / `multi-exercise` recordings), play the file once. A shorter MP4 than the workout slot (e.g. 27s file in a 60s segment) is intended — the file is the looping demo, not the work window."},"organization":{"nullable":true,"description":"Workspace (organization) this exercise belongs to. `null` when the workspace cannot be resolved.","type":"object","allOf":[{"$ref":"#/components/schemas/Organization"}]},"audioInstructions":{"description":"Locale-specific instruction audio tracks. Emitted only for `kind: single-exercise` (the smart-clip product type that strips original audio in favor of multilingual instructions). Narrowed with the standard locale chain (English fallback). When `locale` is omitted the list uses `en-US`. Empty array for `single-exercise` rows that have not yet been narrated. Always empty for the other kinds (`multi-exercise`, `educational`, `promo`, `class`) which keep their original audio baked into the video.","type":"array","items":{"$ref":"#/components/schemas/AudioDto"}},"duration":{"type":"number","description":"Duration of this exercise in seconds.","example":30},"reps":{"type":"number","description":"Target reps for reps-based exercises. Null for time-based.","example":12},"pace":{"type":"string","enum":["slow","medium","fast"],"nullable":true,"description":"Recommended pace/tempo.","example":"medium"},"weightLevel":{"type":"string","enum":["light","medium","heavy"],"nullable":true,"description":"Recommended weight level for reps-based exercises.","example":"medium"},"rpe":{"type":"number","description":"Rate of Perceived Exertion (0-10). Target intensity level.","minimum":0,"maximum":10,"example":8},"amrap":{"type":"boolean","description":"As Many Reps As Possible mode. Only applicable for time-based exercises.","example":false},"weight":{"type":"number","description":"Prescribed/target weight (0-1000). Unit in weightUnit.","minimum":0,"maximum":1000},"weightUnit":{"type":"string","enum":["metric","imperial"],"nullable":true,"description":"Unit for weight: metric (kg) or imperial (lbs)."}},"required":["id","createdAt","trainer","name","kind","muscleGroups","equipment","playsInLoop","organization","duration"]},"GroupExercisesListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupExerciseInstanceDto"}}},"required":["links","data"]},"PlanListItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout plan.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the plan was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the plan was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the plan. Can be null.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout plan. Localized based on locale query parameter.","example":"4-Week Strength Builder"},"description":{"type":"string","description":"Detailed description of the plan, including its purpose and target audience. Localized based on locale query parameter.","example":"A structured 4-week program designed to increase overall strength using compound lifts."},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Overall difficulty level of the plan.","example":"intermediate"},"visibility":{"type":"string","enum":["private","public","end-user-ai-generated"],"description":"Visibility level of the plan.","example":"public"},"durationInWeeks":{"type":"number","description":"Program duration in weeks (1-24). Use for filtering: ?durationInWeeks=8. Total workouts = durationInWeeks × workoutsPerWeek","example":8,"minimum":1,"maximum":24},"workoutsPerWeek":{"type":"number","description":"Weekly workout frequency (1-7). Total workouts = durationInWeeks × workoutsPerWeek","example":3,"minimum":1,"maximum":7},"adaptationReasoning":{"type":"string","description":"AI adaptation reasoning explanation (only present for AI-adapted programs)","example":"Program adapted to reduce intensity based on low sleep scores. Replaced 3 high-intensity workouts with recovery-focused alternatives."},"originalProgramId":{"type":"string","description":"Original program ID if this program was adapted from another (only present for AI-adapted programs)","example":"507f1f77bcf86cd799439016"},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs when present.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"goals":{"description":"List of primary goals this plan is designed for (e.g., Strength, Endurance, Weight Loss).","type":"array","items":{"$ref":"#/components/schemas/Goal"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not goals and not used by recommend or generate.","type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","name","description","difficulty","visibility","goals","tags"]},"PlanListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"description":"The array of plan list items for the current page.","type":"array","items":{"$ref":"#/components/schemas/PlanListItem"}},"explanation":{"type":"string","description":"Explanation for how this list was filtered or sorted"}},"required":["links","data"]},"CreateOrganizationPlanDto":{"type":"object","properties":{"name":{"type":"string","description":"Plan name (3-150 characters).","minLength":3,"maxLength":150,"example":"8-Week Strength Base"},"description":{"type":"string","description":"Short description shown to members (up to 600 characters).","maxLength":600,"example":"Three full-body sessions a week."},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"example":"intermediate"},"goalIds":{"description":"Goal ids (24-character hex) from `GET /v1/plans/metadata`. 1 or 2.","example":["63c92926f920a9005c4e619c"],"type":"array","items":{"type":"string"}},"workoutIds":{"description":"Ordered workout ids: your organization workouts or Hyperhuman template workouts. 2-168; a workout may repeat.","example":["64f1a2b3c4d5e6f7a8b9c0d1","64f1a2b3c4d5e6f7a8b9c0d2"],"type":"array","items":{"type":"string"}},"durationInWeeks":{"type":"number","description":"Program length in weeks (1-24).","minimum":1,"maximum":24,"example":8},"workoutsPerWeek":{"type":"number","description":"Workouts per week (1-7).","minimum":1,"maximum":7,"example":3},"tags":{"description":"Up to 5 tags.","example":["strength"],"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["public","private"],"default":"private","description":"Defaults to `private` so nothing reaches members by accident. Send `public` to publish."}},"required":["name","difficulty","goalIds","workoutIds","durationInWeeks","workoutsPerWeek"]},"Plan":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier (UUID) for the workout plan.","example":"12ab3efd45c67c1234566cd1"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the plan was created.","example":"2023-10-26T10:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the plan was last updated.","example":"2023-10-27T11:30:00.000Z"},"trainer":{"description":"Reference to the trainer associated with the plan. Can be null.","allOf":[{"$ref":"#/components/schemas/TrainerRef"}]},"name":{"type":"string","description":"Display name of the workout plan. Localized based on locale query parameter.","example":"4-Week Strength Builder"},"description":{"type":"string","description":"Detailed description of the plan, including its purpose and target audience. Localized based on locale query parameter.","example":"A structured 4-week program designed to increase overall strength using compound lifts."},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Overall difficulty level of the plan.","example":"intermediate"},"visibility":{"type":"string","enum":["private","public","end-user-ai-generated"],"description":"Visibility level of the plan.","example":"public"},"durationInWeeks":{"type":"number","description":"Program duration in weeks (1-24). Use for filtering: ?durationInWeeks=8. Total workouts = durationInWeeks × workoutsPerWeek","example":8,"minimum":1,"maximum":24},"workoutsPerWeek":{"type":"number","description":"Weekly workout frequency (1-7). Total workouts = durationInWeeks × workoutsPerWeek","example":3,"minimum":1,"maximum":7},"adaptationReasoning":{"type":"string","description":"AI adaptation reasoning explanation (only present for AI-adapted programs)","example":"Program adapted to reduce intensity based on low sleep scores. Replaced 3 high-intensity workouts with recovery-focused alternatives."},"originalProgramId":{"type":"string","description":"Original program ID if this program was adapted from another (only present for AI-adapted programs)","example":"507f1f77bcf86cd799439016"},"preview":{"description":"`url` is a presigned progressive MP4 (~7 days). `poster` / `thumbnail` are public unsigned S3 JPEGs when present.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]},"goals":{"description":"List of primary goals this plan is designed for (e.g., Strength, Endurance, Weight Loss).","type":"array","items":{"$ref":"#/components/schemas/Goal"}},"tags":{"description":"Optional trainer-defined tags for library filter and search. Not goals and not used by recommend or generate.","type":"array","items":{"type":"string"}},"organization":{"description":"Reference to the organization that owns/published this plan, if applicable.","allOf":[{"$ref":"#/components/schemas/Organization"}]},"shareLink":{"description":"A shareable link for the plan.","allOf":[{"$ref":"#/components/schemas/ShareLink"}]}},"required":["id","createdAt","updatedAt","name","description","difficulty","visibility","goals","tags","shareLink"]},"PlanResponse":{"type":"object","properties":{"data":{"description":"Contains the detailed plan object.","allOf":[{"$ref":"#/components/schemas/Plan"}]}},"required":["data"]},"UpdateOrganizationPlanDto":{"type":"object","properties":{"name":{"type":"string","description":"Plan name (3-150 characters).","minLength":3,"maxLength":150,"example":"8-Week Strength Base"},"description":{"type":"string","description":"Short description shown to members (up to 600 characters).","maxLength":600,"example":"Three full-body sessions a week."},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"example":"intermediate"},"goalIds":{"description":"Goal ids (24-character hex) from `GET /v1/plans/metadata`. 1 or 2.","example":["63c92926f920a9005c4e619c"],"type":"array","items":{"type":"string"}},"workoutIds":{"description":"Ordered workout ids: your organization workouts or Hyperhuman template workouts. 2-168; a workout may repeat.","example":["64f1a2b3c4d5e6f7a8b9c0d1","64f1a2b3c4d5e6f7a8b9c0d2"],"type":"array","items":{"type":"string"}},"durationInWeeks":{"type":"number","description":"Program length in weeks (1-24).","minimum":1,"maximum":24,"example":8},"workoutsPerWeek":{"type":"number","description":"Workouts per week (1-7).","minimum":1,"maximum":7,"example":3},"tags":{"description":"Up to 5 tags.","example":["strength"],"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["public","private"],"default":"private","description":"Defaults to `private` so nothing reaches members by accident. Send `public` to publish."}}},"PlanRecommendationRequestDto":{"type":"object","properties":{"endUserProfileDetails":{"description":"Detailed user profile information for personalized recommendations","allOf":[{"$ref":"#/components/schemas/EndUserProfileDetailsDto"}]},"goalIds":{"description":"Optional goal IDs at the root of the body (mobile clients; max 2; first = primary). Merged with endUserProfileDetails.goalIds for library matching.","example":["63c92926f920a9005c4e61a0"],"maxItems":2,"type":"array","items":{"type":"string"}},"locale":{"type":"string","description":"Preferred BCP-47 locale for recommendation text when the stack supports it.","example":"en-US"}}},"GoalDto":{"type":"object","properties":{"id":{"type":"string","description":"Goal ID"},"name":{"type":"string","description":"Goal name"}},"required":["id","name"]},"RecommendedPlanDto":{"type":"object","properties":{"id":{"type":"string","description":"Plan ID"},"name":{"type":"string","description":"Plan name"},"description":{"type":"string","description":"Plan description"},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"]},"thumbnailUrl":{"type":"object","description":"URL to plan thumbnail image","nullable":true},"recommendation":{"type":"string","description":"Reasoning for this recommendation"},"goals":{"description":"Plan goals","type":"array","items":{"$ref":"#/components/schemas/GoalDto"}},"preview":{"description":"Preview video (playable URL when available). url is empty when only a thumbnail image exists.","allOf":[{"$ref":"#/components/schemas/VideoLinks"}]}},"required":["id","name","description","difficulty","thumbnailUrl","recommendation","goals"]},"PlanRecommendationResponseDto":{"type":"object","properties":{"plans":{"description":"List of recommended plans (max 12)","type":"array","items":{"$ref":"#/components/schemas/RecommendedPlanDto"}},"reasoning":{"type":"string","description":"Overall explanation for the recommendation strategy used"}},"required":["plans","reasoning"]},"DurationOptionsDto":{"type":"object","properties":{"minWeeks":{"type":"number","description":"Minimum program duration in weeks","minimum":1,"maximum":24,"example":4},"maxWeeks":{"type":"number","description":"Maximum program duration in weeks","minimum":1,"maximum":24,"example":8}}},"PlanGenerationRequestDto":{"type":"object","properties":{"goalIds":{"description":"Array of goal IDs for the program (max 2; first = primary, second = secondary)","example":["507f1f77bcf86cd799439011","507f1f77bcf86cd799439012"],"maxItems":2,"type":"array","items":{"type":"string"}},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Difficulty level for the program","example":"intermediate"},"workoutsPerWeek":{"type":"number","description":"Number of workouts per week","minimum":1,"maximum":7,"example":3},"durationOptions":{"description":"Duration preferences for the program","allOf":[{"$ref":"#/components/schemas/DurationOptionsDto"}]},"endUserProfileDetails":{"description":"Detailed user profile information for personalized program generation","allOf":[{"$ref":"#/components/schemas/EndUserProfileDetailsDto"}]},"workoutCollectionSources":{"type":"array","description":"Sources of workout collections for plan generation (`template` | `team`). Defaults to both if omitted. Field name is `workoutCollectionSources` — not `workoutSources` (that name is only valid on plan adapt).","example":["team","template"],"items":{"type":"string","enum":["team","template"]}},"categoryIds":{"description":"Optional workout category IDs. Hard-filters the generate pool (public team/template via buildWorkoutSourceQuery) with $in on _workoutCategoryIds. Hex ids only (not list custom: tokens). Empty pool or fewer than 3 matches → 400. Use GET /v1/workouts/metadata for ids. Omit for the full source pool.","example":["615aa3f0dbe7140012c59e94"],"maxItems":20,"type":"array","items":{"type":"string"}},"userRequirements":{"type":"string","description":"High-level context, definitions, and guidelines for program generation. Provides customer-specific grounding for training methodologies, progression schemes, and program structure. Generate-only name — do not send `userGuidance` (that field is adapt-only; unknown keys → 400 ValidationError).","example":"Progressive overload with 3-week cycles. Include deload weeks every 4th week. Focus on unilateral movements for balance.","maxLength":2000},"locale":{"type":"string","description":"Optional BCP-47 locale (e.g. \"fr-FR\", \"de-DE\", \"en-GB\"). Localizes the AI program name/description and nested workout fields. Omit for English-only output. Unsupported values return 400.","example":"fr-FR"},"methodologyProfileId":{"type":"string","description":"Optional 24-character hex id of a team Programming DNA profile from GET /v1/orgs/{organizationId}/methodologies. Opt-in only — omit means no team methodology is applied. Unknown, personal (non-team), or inactive ids return 400 (same message; omit still means none). Not used by recommend, adapt, or chat."},"addToTeamContent":{"type":"boolean","description":"Save the generated plan to your team library, owned by your team manager. Needs your organization API key (checked before generating). The response then includes the saved `id`. Use `endUserProfileDetails.endUserId` or `addToTeamContent`, not both. Still one 10x call; the save adds nothing.","default":false},"visibility":{"type":"string","description":"Visibility of the saved plan. Only with `addToTeamContent: true`. Defaults to `private`.","enum":["public","private"],"default":"private"}}},"ApiWorkoutDto":{"type":"object","properties":{"id":{"type":"string","description":"Workout ID","example":"507f1f77bcf86cd799439017"},"name":{"type":"string","description":"Workout name (canonical English base)","example":"Upper Body Strength"},"nameLocalized":{"type":"string","description":"Workout name resolved for the requested locale (silent en-US fallback). Additive localization field.","example":"Force du haut du corps"},"duration":{"type":"number","description":"Workout duration in milliseconds (`GET /v1/workouts/{id}` and `GET /v1/plans/{id}/workouts` report `duration` in seconds; divide by 1000 to compare).","example":900000},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Workout difficulty level","example":"intermediate"},"description":{"type":"string","description":"Workout description (canonical English base)"},"descriptionLocalized":{"type":"string","description":"Workout description resolved for the requested locale (silent en-US fallback). Additive localization field."}},"required":["id","name","duration","difficulty"]},"PlanGenerationResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Stored program id. Present when the request included `endUserProfileDetails.endUserId` (member plan) or `addToTeamContent: true` (team library plan); otherwise nothing was stored.","example":"507f1f77bcf86cd799439017"},"name":{"type":"string","description":"Generated plan name (canonical English base)","example":"4-Week Intermediate General Fitness"},"nameTranslations":{"type":"object","description":"Per-locale plan name. Always includes en-US; includes the requested locale when a non-English locale was requested.","example":{"en-US":"4-Week Intermediate General Fitness","fr-FR":"Forme Générale Intermédiaire 4 Semaines"}},"description":{"type":"string","description":"Generated plan description (canonical English base)","example":"A comprehensive 8-week program designed to build strength and muscle mass."},"descriptionTranslations":{"type":"object","description":"Per-locale plan description. Always includes en-US; includes the requested locale when a non-English locale was requested.","example":{"en-US":"A comprehensive 8-week program designed to build strength and muscle mass.","fr-FR":"Un programme complet de 8 semaines conçu pour développer la force et la masse musculaire."}},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Plan difficulty level","example":"intermediate"},"difficultyLabel":{"type":"string","description":"Localized human-readable difficulty label for the requested locale (silent en-US fallback).","example":"Intermédiaire"},"goalIds":{"description":"Array of goal IDs the plan addresses","example":["507f1f77bcf86cd799439011","507f1f77bcf86cd799439012"],"type":"array","items":{"type":"string"}},"workouts":{"description":"Array of workouts in the plan","type":"array","items":{"$ref":"#/components/schemas/ApiWorkoutDto"}},"durationInWeeks":{"type":"number","description":"Total number of weeks in the program","example":8},"workoutsPerWeek":{"type":"number","description":"Number of workouts per week","example":3},"methodology":{"type":"object","description":"Applied team methodology when a profile was used. Null when none applied. Natural-language methodology is guidance, not a guarantee."},"inspection":{"type":"object","description":"Generation Inspector snapshot when a methodology was considered: methodology, hardRulesApplied, violations, complianceStatus (`compliant` | `partial` | `not_applicable`), generationId. Store generationId yourself — there is no public GET-by-id. Hard-rule results are deterministic; text guidelines are not a guarantee."}},"required":["name","nameTranslations","description","descriptionTranslations","difficulty","goalIds","workouts","durationInWeeks","workoutsPerWeek"]},"PlanAdaptationRequestDto":{"type":"object","properties":{"endUserProfileId":{"type":"string","description":"End user profile ID (24-char hex org member id). Required on Content API — adapted programs are persisted under this user (omit → 400). Also used for wearable/session/feedback context. When this user has the source plan active, only the next workout slot is adapted. For a freshly generated end-user plan that is not active, the full future schedule is adapted in place.","example":"64e3bca9d1b7e600141a9712"},"endUserProfileDetails":{"description":"User profile information for program adaptation","allOf":[{"$ref":"#/components/schemas/AdaptationEndUserProfileDetailsDto"}]},"workoutSources":{"type":"array","description":"Workout sources for additions/replacements (`template` | `team`). Field name is `workoutSources` — not `workoutCollectionSources` (that name is only valid on plan generate).","example":["template","team"],"items":{"type":"string","enum":["template","team"]}},"userGuidance":{"type":"string","description":"User free text for guidance/feedback/context/injury/environment/constraints. Adapt-only name — do not send `userRequirements` (that field is generate-only; unknown keys → 400 ValidationError).","example":"I have a slight knee injury, avoid high-impact exercises. Reduce program intensity for recovery.","maxLength":2000}},"required":["endUserProfileId","endUserProfileDetails","workoutSources"]},"ApiAdaptedWorkoutDto":{"type":"object","properties":{"id":{"type":"string","description":"Workout ID","example":"507f1f77bcf86cd799439017"},"name":{"type":"string","description":"Workout name","example":"Upper Body Strength"},"duration":{"type":"number","description":"Workout duration in seconds","example":2700},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Workout difficulty"},"description":{"type":"string","description":"Workout description"},"position":{"type":"number","description":"Position in program (0-based)"},"action":{"type":"string","description":"Action taken","enum":["kept","replaced","added"]}},"required":["id","name"]},"PlanAdaptationResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Adapted program ID","example":"507f1f77bcf86cd799439017"},"name":{"type":"string","description":"Adapted program name","example":"Adapted: 8-Week Strength Program"},"description":{"type":"string","description":"Program description"},"workouts":{"description":"Workouts in adapted program","type":"array","items":{"$ref":"#/components/schemas/ApiAdaptedWorkoutDto"}},"totalWorkouts":{"type":"number","description":"Total number of workouts"},"durationInWeeks":{"type":"number","description":"Program duration in weeks"},"workoutsPerWeek":{"type":"number","description":"Workouts per week"},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Program difficulty"},"adaptationReasoning":{"type":"string","description":"Explanation of adaptations made"},"wasDuplicated":{"type":"boolean","description":"True if program was duplicated from team program"},"originalProgramId":{"type":"string","description":"Original program ID if duplicated"}},"required":["id","name","workouts","totalWorkouts","durationInWeeks","workoutsPerWeek","adaptationReasoning"]},"OrganizationMetadataResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the organization","example":"12ab3efd45c67c1234566cd1"},"name":{"type":"string","description":"The name of the organization","example":"Hyperhuman LLC"},"handle":{"type":"object","description":"The organization handle (typically used in URLs)","example":"hyperhuman"},"logoUrl":{"type":"object","description":"URL to the organization logo","example":"https://assets.example.com/logos/hyperhuman-logo.png"},"watermarkUrl":{"type":"object","description":"URL to the brand watermark used in workout video exports and the embedded player. Square PNG with transparent background recommended.","example":"https://assets.example.com/logos/hyperhuman-watermark.png"},"description":{"type":"object","description":"The description of the organization","example":"A company dedicated to fitness and wellness solutions"},"website":{"type":"object","description":"The website URL of the organization","example":"https://hyperhuman.cc"},"brandMainColor":{"type":"object","description":"The primary brand color (hex format)","example":"#11CC88"},"brandSecondaryColor":{"type":"object","description":"The secondary brand color (hex format)","example":"#F3F8F8"},"brandTextColor":{"type":"object","description":"The text color that goes with the brand colors (hex format)","example":"#FFFFFF"},"clientsJoinSetting":{"type":"string","description":"Setting that controls how clients can join the organization","enum":["OPEN","INVITE_ONLY","SUBSCRIPTION_REQUIRED"],"example":"OPEN","default":"OPEN"},"hasAssenseiModuleActive":{"type":"boolean","description":"Whether the organization has the Asensei Assessment module active (AI form analysis)","example":false},"hasWearableModuleActive":{"type":"boolean","description":"Whether the organization has the ROOK Wearables module active (health data sync)","example":false},"hasWhiteLabelAppActive":{"type":"boolean","description":"Whether the organization has a White-Label App active (custom branded consumer app)","example":false},"iosAppStoreId":{"type":"object","description":"Numeric iOS App Store ID of the branded app. Used by the end-user web app to build App Store links and deep links. Only meaningful when hasWhiteLabelAppActive is true.","example":"1559570894"},"androidPackageName":{"type":"object","description":"Android package name of the branded app. Used by the end-user web app to build Google Play links and the custom deep-link scheme. Only meaningful when hasWhiteLabelAppActive is true.","example":"cc.hyperhuman.club"},"aiChatEnabled":{"type":"boolean","description":"Member-app visibility for AI chat (admin toggle AND (OPEN/INVITE_ONLY member grant OR org chat capability)). Standard-app `/v1/chat` writes also AND the admin toggle (explicit false 403s). Org API keys ignore App Features.","example":true},"aiGenerationEnabled":{"type":"boolean","description":"Member-app visibility for AI workout/program generation (admin toggle AND (OPEN/INVITE_ONLY member grant OR org generation capability)). Standard-app `.../workouts/generate` and `.../plans/generate` also AND the admin toggle (explicit false 403s). Org API keys ignore App Features.","example":true},"aiAdaptationEnabled":{"type":"boolean","description":"Member-app visibility for AI workout/program adaptation (admin toggle AND (OPEN/INVITE_ONLY member grant OR org adaptation capability)). Standard-app `.../adapt` writes also AND the admin toggle (explicit false 403s). Org API keys ignore App Features. Auto-adapt skips when this is false.","example":true},"aiRecommendationEnabled":{"type":"boolean","description":"Member-app visibility for AI recommend. Defaults to true when unset. Does **not** gate Content API `.../recommend` routes.","example":true},"insightsEnabled":{"type":"boolean","description":"Member-app visibility for Daily Digest / Health HQ. Pure capability (no admin toggle): true when the team plan carries dailyDigestInsights or the org sells an insights-entitled club tier. Content API insights routes still enforce their own capability checks.","example":true},"insightsMode":{"type":"string","description":"Team-level insight mode (coach, physio, weight_management, wellness): the admin setting, else inferred from the business type, else coach. Member apps use it to pick the digest lexicon and check-in fields. A member profile override (EndUserProfile.insightMode) still wins for that member; see GET /v1/me/profile.","enum":["coach","physio","weight_management","wellness"],"example":"coach"},"painCheckInEnabled":{"type":"boolean","description":"Whether post-workout check-ins should ask for a 0-10 pain score (POST /v1/workouts/{workoutId}/feedback painScore). True for physio / rehab teams. The embedded player honours it automatically; hosts can override per embed with the painCheckIn embed option.","example":false},"setLoggingEnabled":{"type":"boolean","description":"Whether members can log weight and reps during playback (sent with POST /v1/workouts/{workoutId}/feedback exerciseData). Team admin setting, on by default. The embedded player honours it for attributed sessions; hosts can override per embed with the setLogging embed option.","example":true}},"required":["id","name","clientsJoinSetting","hasAssenseiModuleActive","hasWearableModuleActive","hasWhiteLabelAppActive","aiChatEnabled","aiGenerationEnabled","aiAdaptationEnabled","aiRecommendationEnabled","insightsEnabled","insightsMode","painCheckInEnabled","setLoggingEnabled"]},"OrganizationBrandingNewsItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique item ID generated from article URL and title.","example":"rss-12244532"},"title":{"type":"string","description":"Article title.","example":"How to Build a Sustainable Training Routine"},"description":{"type":"string","description":"Short article summary.","example":"A practical guide for building consistency across training cycles."},"url":{"type":"string","description":"Article URL.","example":"https://example.com/articles/sustainable-training-routine"},"imageUrl":{"type":"string","description":"Article image URL if available.","example":"https://cdn.example.com/images/article-cover.jpg"},"source":{"type":"string","description":"Source name derived from feed host.","example":"Example"},"channelTitle":{"type":"string","description":"Feed/channel title when available.","example":"Example Fitness Journal"},"categories":{"description":"Article categories/tags.","example":["Training","Recovery"],"type":"array","items":{"type":"string"}},"publishedAt":{"type":"string","description":"Published date in ISO format.","example":"2026-05-11T17:30:00.000Z"}},"required":["id","title","url","source","categories","publishedAt"]},"OrganizationBrandingNewsResponse":{"type":"object","properties":{"items":{"description":"News items for organization branding section.","type":"array","items":{"$ref":"#/components/schemas/OrganizationBrandingNewsItemDto"}}},"required":["items"]},"TeamClientsJoinSetting":{"type":"string","enum":["OPEN","INVITE_ONLY","SUBSCRIPTION_REQUIRED"],"description":"High-level team join setting that controls client access"},"FreeJoinOptionDto":{"type":"object","properties":{"id":{"type":"string","description":"Product unique identifier","example":"507f1f77bcf86cd799439011"},"name":{"type":"string","description":"Product name/title","example":"Club Free Plan"},"description":{"type":"string","description":"Product description","example":"Free access with basic features"},"hasAutoJoin":{"type":"boolean","description":"Whether this product includes auto-join capability","example":true},"stripeProductId":{"type":"string","description":"Stripe product ID for payment processing","example":"prod_SMcyPrDHt0ROlQ"}},"required":["id","name","description","hasAutoJoin","stripeProductId"]},"OrganizationJoinOptionsResponse":{"type":"object","properties":{"clientsJoinSetting":{"description":"High-level team join setting that controls client access","example":"OPEN","allOf":[{"$ref":"#/components/schemas/TeamClientsJoinSetting"}]},"canJoinDirectly":{"type":"boolean","description":"Whether users can join directly without any requirements (OPEN setting)","example":true},"requiresSubscription":{"type":"boolean","description":"Whether the team requires a subscription to join (SUBSCRIPTION_REQUIRED setting)","example":false},"inviteOnlyMode":{"type":"boolean","description":"Whether the team only allows invited users to join (INVITE_ONLY setting)","example":false},"hasFreePlanWithAutoJoin":{"type":"boolean","description":"Whether the team offers any free plans with auto-join capability","example":true},"freeJoinOptions":{"description":"Available free products that include auto-join capability","type":"array","items":{"$ref":"#/components/schemas/FreeJoinOptionDto"}},"totalProductsAvailable":{"type":"number","description":"Total number of subscription products available (including paid)","example":3}},"required":["clientsJoinSetting","canJoinDirectly","requiresSubscription","inviteOnlyMode","hasFreePlanWithAutoJoin","freeJoinOptions"]},"AssignWorkoutsBody":{"type":"object","properties":{"workoutIds":{"description":"Workout ids to assign (24-character hex). Max 10. All-or-nothing: any ineligible id returns 400 and nothing is written.","example":["64f1a2b3c4d5e6f7a8b9c0d1"],"type":"array","items":{"type":"string"}},"sendAssignmentEmail":{"type":"boolean","description":"When true (default), send the Hyperhuman content-assigned email for newly assigned workouts, still gated by the end user content-consumption email preference. Set false when you send your own email.","example":true},"sendAssignmentPush":{"type":"boolean","description":"When true (default), send the content-assigned push notification for newly assigned workouts. Club push is still gated by the end user push preference. Set false to skip Hyperhuman push.","example":true}},"required":["workoutIds"]},"UnassignWorkoutsBody":{"type":"object","properties":{"workoutIds":{"description":"Workout ids to remove from the end user library (24-character hex). Max 10. Missing access rows and ids that are not this organization's content are ignored.","example":["64f1a2b3c4d5e6f7a8b9c0d1"],"type":"array","items":{"type":"string"}}},"required":["workoutIds"]},"AssignPlansBody":{"type":"object","properties":{"planIds":{"description":"Plan ids to assign (24-character hex). Max 5. All-or-nothing: any ineligible id returns 400 and nothing is written. Does not start the plan as active.","example":["60f1b3b3b3b3b3b3b3b3b3b3"],"type":"array","items":{"type":"string"}},"sendAssignmentEmail":{"type":"boolean","description":"When true (default), send the Hyperhuman content-assigned email for newly assigned programs, still gated by the end user content-consumption email preference. Set false when you send your own email.","example":true},"sendAssignmentPush":{"type":"boolean","description":"When true (default), send the content-assigned push notification for newly assigned programs. Club push is still gated by the end user push preference. Set false to skip Hyperhuman push.","example":true}},"required":["planIds"]},"UnassignPlansBody":{"type":"object","properties":{"planIds":{"description":"Plan ids to remove from the end user library (24-character hex). Max 5. Missing access rows and ids that are not this organization's content are ignored. Removing the active plan also ends enrollment.","example":["60f1b3b3b3b3b3b3b3b3b3b3"],"type":"array","items":{"type":"string"}}},"required":["planIds"]},"PlanProgressResponseDto":{"type":"object","properties":{"data":{"type":"object","nullable":true,"description":"A map where keys are position indices (as strings) and values contain completion status, latest completion date, and workout details. Returns `null` when the user has no active plan.","additionalProperties":{"type":"object","properties":{"completed":{"type":"boolean"},"latestCompletionDate":{"type":"string","format":"date-time"},"workoutName":{"type":"string"},"difficulty":{"type":"string"},"duration":{"type":"number"},"categories":{"type":"array","items":{"type":"string"}},"workoutId":{"type":"string"},"positionInPlan":{"type":"number"},"skipped":{"type":"boolean"},"skippedAt":{"type":"string","format":"date-time"}}},"example":{"0":{"completed":true,"latestCompletionDate":"2023-07-22T15:30:45.123Z","workoutName":"Full Body HIIT","difficulty":"intermediate","duration":1800000,"categories":["Strength","HIIT","Full Body"],"workoutId":"60f1b3b3b3b3b3b3b3b3b3b3","positionInPlan":0},"1":{"completed":false,"latestCompletionDate":null,"workoutName":"Lower Body Strength","difficulty":"advanced","duration":2400000,"categories":["Strength","Lower Body"],"workoutId":"60f1b3b3b3b3b3b3b3b3b3b4","positionInPlan":1},"2":{"completed":false,"latestCompletionDate":null,"workoutName":"Full Body HIIT","difficulty":"intermediate","duration":1800000,"categories":["Strength","HIIT","Full Body"],"workoutId":"60f1b3b3b3b3b3b3b3b3b3b3","positionInPlan":2}}}},"required":["data"]},"ActivePlanSummary":{"type":"object","properties":{"id":{"type":"string","description":"Plan id (same as `planId`)."},"name":{"type":"string"},"description":{"type":"object","nullable":true},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"],"nullable":true},"durationInWeeks":{"type":"object","nullable":true},"workoutsPerWeek":{"type":"object","nullable":true},"adaptationReasoning":{"type":"object","description":"AI reasoning stored on the enrolled copy when the plan was adapted.","nullable":true}},"required":["id","name"]},"ActivePlanScheduleWorkout":{"type":"object","properties":{"position":{"type":"number","description":"0-based position in the plan sequence (matches `positionInPlan` on `.../plans/active/progress`)."},"workoutId":{"type":"string"},"name":{"type":"string"},"difficulty":{"type":"string","enum":["beginner","intermediate","advanced"]},"duration":{"type":"number","description":"Workout duration in milliseconds (differs from the seconds used by workout list/detail)."},"categories":{"type":"array","items":{"type":"string"}}},"required":["position","workoutId","name","difficulty","duration","categories"]},"ActivePlanLastCompletedWorkout":{"type":"object","properties":{"position":{"type":"number","description":"0-based position in the plan sequence."},"workoutId":{"type":"string"},"workoutName":{"type":"string"},"completionDate":{"format":"date-time","type":"string"}},"required":["position","workoutId","workoutName","completionDate"]},"ActivePlanSchedule":{"type":"object","properties":{"workoutsPerWeek":{"type":"number"},"durationInWeeks":{"type":"number"},"currentWeekNumber":{"type":"number","description":"1-based week number since `startDate`, capped at `durationInWeeks`. Unfinished slots in this week stay due after the plan length."},"daysSinceStart":{"type":"number"},"completedWorkouts":{"type":"number"},"totalWorkouts":{"type":"number"},"expectedWorkoutsCompleted":{"type":"number","description":"Workouts the member should have completed by now based on time elapsed."},"completionPercentage":{"type":"number","description":"0-100."},"programFinished":{"type":"boolean","description":"True when every slot is completed or skipped. With dropMissedAtWeekEnd off, true only when every slot is completed. completionPercentage counts completed slots only, so it can be below 100."},"completedWorkoutToday":{"type":"boolean","description":"Whether a workout of this plan was completed today."},"todaysWorkout":{"description":"Next open slot. Absent when a workout was already completed today, or when no slot is unfinished and not skipped. Use programFinished to tell a finished plan apart. With dropMissedAtWeekEnd off and only skipped slots left, the first of them in the latest unfinished week.","allOf":[{"$ref":"#/components/schemas/ActivePlanScheduleWorkout"}]},"lastCompletedWorkout":{"$ref":"#/components/schemas/ActivePlanLastCompletedWorkout"}},"required":["workoutsPerWeek","durationInWeeks","currentWeekNumber","daysSinceStart","completedWorkouts","totalWorkouts","expectedWorkoutsCompleted","completionPercentage","programFinished","completedWorkoutToday"]},"ActivePlan":{"type":"object","properties":{"id":{"type":"string","description":"Enrollment (plan access) id.","example":"60f1b3b3b3b3b3b3b3b3b3b3"},"planId":{"type":"string","description":"Plan id. Use with `GET /v1/plans/{id}` and `GET /v1/plans/{id}/workouts`.","example":"60f1b3b3b3b3b3b3b3b3b3b4"},"endUserId":{"type":"string","description":"End user (platform user) id.","example":"6821e6ad9d20276ef3c3c9ec"},"isActive":{"type":"boolean","description":"Whether this plan is the end user's active plan."},"autoAdapt":{"type":"boolean","description":"Whether automatic next-workout adaptation is enabled for this enrollment."},"dropMissedAtWeekEnd":{"type":"boolean","description":"Whether unfinished workouts in fully elapsed weeks before the current week are skipped without counting as completed. The current week stays due after the plan length."},"startDate":{"format":"date-time","type":"string","description":"Progress window start. Only sessions completed on or after this date count toward `GET .../plans/active/progress`.","nullable":true},"endDate":{"format":"date-time","type":"string","description":"Set when the plan was ended (`POST .../plans/{planId}/end`) or replaced by another active plan.","nullable":true},"lastAutoAdaptAt":{"format":"date-time","type":"string","description":"Last automatic adaptation run for this enrollment.","nullable":true},"lastAutoAdaptTrigger":{"type":"object","description":"Trigger of the last automatic adaptation (e.g. session completion, feedback).","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"_id":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal id; use `id` instead. Will be removed in the next major Content API release."},"workoutCollectionId":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal plan id; use `planId` instead. Will be removed in the next major Content API release."},"traineeId":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal user id; use `endUserId` instead. Will be removed in the next major Content API release."},"plan":{"description":"Summary of the enrolled plan. Full details via `GET /v1/plans/{planId}`.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ActivePlanSummary"}]},"schedule":{"description":"Time-based pacing for the active enrollment. Absent when the schedule could not be computed.","allOf":[{"$ref":"#/components/schemas/ActivePlanSchedule"}]}},"required":["id","planId","endUserId","isActive","autoAdapt","dropMissedAtWeekEnd","createdAt","updatedAt"]},"ActivePlanResponse":{"type":"object","properties":{"data":{"nullable":true,"description":"The active plan, or `null` when the end user has no active plan.","type":"object","allOf":[{"$ref":"#/components/schemas/ActivePlan"}]}}},"StartPlanBody":{"type":"object","properties":{"planId":{"type":"string","description":"The plan ID to start as the active plan.","example":"60f1b3b3b3b3b3b3b3b3b3b3"},"restart":{"type":"boolean","description":"When true, resets the plan start date so only workouts completed after this call count toward progress. When false or omitted and this plan is already active, the existing access is returned unchanged.","example":false},"autoAdapt":{"type":"boolean","description":"Enable automatic next-workout adaptation for this active enrollment.","example":false},"dropMissedAtWeekEnd":{"type":"boolean","description":"When omitted on start, unfinished slots in fully elapsed weeks before the current week are skipped and do not count as completed. That week stays due after the plan length. Send false to keep missed workouts due.","example":true}},"required":["planId"]},"PlanAccess":{"type":"object","properties":{"id":{"type":"string","description":"Enrollment (plan access) id.","example":"60f1b3b3b3b3b3b3b3b3b3b3"},"planId":{"type":"string","description":"Plan id. Use with `GET /v1/plans/{id}` and `GET /v1/plans/{id}/workouts`.","example":"60f1b3b3b3b3b3b3b3b3b3b4"},"endUserId":{"type":"string","description":"End user (platform user) id.","example":"6821e6ad9d20276ef3c3c9ec"},"isActive":{"type":"boolean","description":"Whether this plan is the end user's active plan."},"autoAdapt":{"type":"boolean","description":"Whether automatic next-workout adaptation is enabled for this enrollment."},"dropMissedAtWeekEnd":{"type":"boolean","description":"Whether unfinished workouts in fully elapsed weeks before the current week are skipped without counting as completed. The current week stays due after the plan length."},"startDate":{"format":"date-time","type":"string","description":"Progress window start. Only sessions completed on or after this date count toward `GET .../plans/active/progress`.","nullable":true},"endDate":{"format":"date-time","type":"string","description":"Set when the plan was ended (`POST .../plans/{planId}/end`) or replaced by another active plan.","nullable":true},"lastAutoAdaptAt":{"format":"date-time","type":"string","description":"Last automatic adaptation run for this enrollment.","nullable":true},"lastAutoAdaptTrigger":{"type":"object","description":"Trigger of the last automatic adaptation (e.g. session completion, feedback).","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"_id":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal id; use `id` instead. Will be removed in the next major Content API release."},"workoutCollectionId":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal plan id; use `planId` instead. Will be removed in the next major Content API release."},"traineeId":{"type":"string","deprecated":true,"description":"Deprecated. Legacy internal user id; use `endUserId` instead. Will be removed in the next major Content API release."}},"required":["id","planId","endUserId","isActive","autoAdapt","dropMissedAtWeekEnd","createdAt","updatedAt"]},"PlanAccessResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanAccess"}},"required":["data"]},"UpdateActivePlanSettingsBody":{"type":"object","properties":{"autoAdapt":{"type":"boolean","description":"Enable or disable automatic next-workout adaptation on the active enrollment.","example":true},"dropMissedAtWeekEnd":{"type":"boolean","description":"Skip unfinished workouts in fully elapsed weeks before the current week without counting them as completed. That week stays due after the plan length. Turning this off keeps skips that already happened.","example":false}}},"EndUserProfileDto":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"externalUUID":{"type":"string","description":"External unique identifier provided by the API client"},"joinedDate":{"format":"date-time","type":"string","description":"When the user joined the team"},"status":{"type":"string","description":"User membership status","enum":["active","suspended"]},"endUserId":{"type":"string","description":"Internal user ID. Present only when the API key is for this organization and the end user has an active (non-suspended) team membership. Use in enduser-scoped endpoints (e.g. plans, insights).","example":"507f1f77bcf86cd799439011"}},"required":["email","joinedDate","status"]},"EndUserProfileListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EndUserProfileDto"}},"total":{"type":"number","deprecated":true,"description":"Deprecated. Use `links.total` instead. Kept for one minor version for backwards compatibility."}},"required":["links","data","total"]},"EndUserInviteItem":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the user to invite"},"externalUUID":{"type":"string","description":"External unique identifier for this user"},"firstName":{"type":"string","description":"First name of the user"},"lastName":{"type":"string","description":"Last name of the user"}},"required":["email"]},"InviteEndUsersDto":{"type":"object","properties":{"users":{"description":"List of users to invite","type":"array","items":{"$ref":"#/components/schemas/EndUserInviteItem"}},"sendInviteEmail":{"type":"boolean","description":"Optional per-request override for Hyperhuman transactional invite emails. Omit to use the organization Invite emails setting (on by default). `false` skips Hyperhuman invite email for this batch when you send your own. `true` sends even if the organization setting is off. When present, this field wins over the organization setting. Pending invite records are always created either way. Updating an existing pending invite never re-sends email.","example":false}},"required":["users"]},"UserIdentifierDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the user"},"externalUUID":{"type":"string","description":"External UUID of the user"}}},"CreateWebhookBody":{"type":"object","properties":{"url":{"type":"string","description":"HTTPS URL that receives events. Must be public: private, loopback and link-local addresses are refused. Max 2048 characters.","example":"https://api.example.com/hyperhuman/webhooks"},"events":{"type":"array","description":"Event types to receive. `*` subscribes to all current and future types. Unknown types return 400.","example":["workout_session.completed","plan.completed"],"items":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready","*"]}},"description":{"type":"string","description":"Note for your team. Max 200 characters.","example":"Leaderboard service"}},"required":["url","events"]},"WebhookLastDeliveryDto":{"type":"object","properties":{"at":{"format":"date-time","type":"string"},"statusCode":{"type":"number","nullable":true,"description":"HTTP status. Null when no response arrived (timeout, DNS, TLS)."},"ok":{"type":"boolean","description":"True for a 2xx."}},"required":["at","ok"]},"WebhookEndpointWithSecretDto":{"type":"object","properties":{"id":{"type":"string","example":"6721f0c4a1b2c3d4e5f60718"},"url":{"type":"string","example":"https://api.example.com/hyperhuman/webhooks"},"description":{"type":"string","nullable":true,"example":"Leaderboard service"},"events":{"type":"array","items":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready","*"]}},"status":{"type":"string","enum":["enabled","disabled"]},"disabledReason":{"type":"string","enum":["manual","failing","gone"],"nullable":true,"description":"`manual` (turned off by your team), `failing` (3 days of failed deliveries) or `gone` (your server answered 410)."},"lastDelivery":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WebhookLastDeliveryDto"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"secret":{"type":"string","description":"Signing secret (`whsec_...`). Returned only on create and on `rotateSecret: true`. Store it now.","example":"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"}},"required":["id","url","events","status","createdAt","updatedAt"]},"WebhookEndpointDto":{"type":"object","properties":{"id":{"type":"string","example":"6721f0c4a1b2c3d4e5f60718"},"url":{"type":"string","example":"https://api.example.com/hyperhuman/webhooks"},"description":{"type":"string","nullable":true,"example":"Leaderboard service"},"events":{"type":"array","items":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready","*"]}},"status":{"type":"string","enum":["enabled","disabled"]},"disabledReason":{"type":"string","enum":["manual","failing","gone"],"nullable":true,"description":"`manual` (turned off by your team), `failing` (3 days of failed deliveries) or `gone` (your server answered 410)."},"lastDelivery":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WebhookLastDeliveryDto"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","url","events","status","createdAt","updatedAt"]},"WebhookEndpointListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointDto"}}},"required":["links","data"]},"UpdateWebhookBody":{"type":"object","properties":{"url":{"type":"string","description":"New HTTPS URL. Same rules as on create."},"events":{"type":"array","description":"Replaces the subscribed event types.","items":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready","*"]}},"description":{"type":"string","description":"Note for your team. Send an empty string to clear it."},"status":{"type":"string","description":"`disabled` stops deliveries now (pending retries are dropped; events stay in the feed). `enabled` turns it back on.","enum":["enabled","disabled"]},"rotateSecret":{"type":"boolean","description":"`true` returns a new `secret`. The old one stops working at once."}}},"TestWebhookBody":{"type":"object","properties":{"type":{"type":"string","description":"Event type of the sample. The sample uses fake ids and is not stored or retried.","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready"],"example":"workout_session.completed"}},"required":["type"]},"WebhookTestResultDto":{"type":"object","properties":{"ok":{"type":"boolean","description":"True when your endpoint answered 2xx."},"statusCode":{"type":"number","nullable":true,"example":200},"durationMs":{"type":"number","example":142},"error":{"type":"string","nullable":true,"example":null}},"required":["ok","durationMs"]},"WebhookDeliveryDto":{"type":"object","properties":{"id":{"type":"string","example":"6721f0c4a1b2c3d4e5f60719"},"eventId":{"type":"string","description":"Event id, also sent as the `webhook-id` header.","example":"evt_6721f0c4a1b2c3d4e5f60718"},"eventType":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready"]},"status":{"type":"string","enum":["pending","succeeded","failed"],"description":"`pending` (queued or retrying), `succeeded`, `failed` (retries ran out or the endpoint was turned off)."},"attempts":{"type":"number","example":1},"lastStatusCode":{"type":"number","nullable":true,"example":200},"lastError":{"type":"string","nullable":true,"example":"HTTP 500"},"lastAttemptAt":{"format":"date-time","type":"string","nullable":true},"nextAttemptAt":{"format":"date-time","type":"string","nullable":true,"description":"Next retry while `pending`."},"createdAt":{"format":"date-time","type":"string"}},"required":["id","eventId","eventType","status","attempts","createdAt"]},"WebhookDeliveryListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryDto"}}},"required":["links","data"]},"WebhookEndUserDto":{"type":"object","properties":{"endUserId":{"type":"string","example":"6650aa000000000000000000"},"externalUserId":{"type":"string","nullable":true,"example":"crm-12345"}},"required":["endUserId"]},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"Dedupe key. Same value as the `webhook-id` header.","example":"evt_6721f0c4a1b2c3d4e5f60718"},"type":{"type":"string","enum":["workout_session.completed","plan.started","plan.progress_updated","plan.completed","insights.digest_ready"]},"apiVersion":{"type":"string","example":"2026-11"},"occurredAt":{"type":"string","example":"2026-10-29T18:42:11.000Z"},"organizationId":{"type":"string","example":"63415bf67a9c7000126616c1"},"endUser":{"nullable":true,"description":"Null for anonymous sessions.","type":"object","allOf":[{"$ref":"#/components/schemas/WebhookEndUserDto"}]},"data":{"type":"object","description":"Event data. Shape depends on `type`; see the Webhooks overview."}},"required":["id","type","apiVersion","occurredAt","organizationId","data"]},"WebhookEventListResponse":{"type":"object","properties":{"links":{"description":"Pagination envelope. Use `links.next` to fetch the next page; `links.total` is the count across all pages and is omitted on endpoints where it is too expensive to compute.","allOf":[{"$ref":"#/components/schemas/PageLinks"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}}},"required":["links","data"]},"InsightSignalDto":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier of the detected signal.","example":"streak-at-risk-workout"},"kind":{"type":"string","description":"Kind of detected signal. Kinds are additive: clients must render unknown kinds generically (label + detail).","enum":["streak_at_risk","personal_best","milestone","day_of_week_pattern","time_of_day_pattern","adherence_trend","pace","correlation","plateau","recovery_debt","activity_logged","activity_volume","cta","ai_pattern","weekly_streak","strength_pr","load","completion_depth","program_milestone","variety","progression","onboarding","rest_day","form","plan_adapted","sleep","sleep_regularity","rhr_trend","hrv_trend","strain","steps","hydration","weight_trend","fitness_level","body_composition","readiness_contributor","week_ahead","week_review","session_complete","slot_skipped","muscle_guard_recheck","strength_days","protein_target","weight_rate","low_energy_pattern","pain_flare","pain_dose_ok","pain_trend","pain_free_streak","rom_progress","reassess_due"],"example":"streak_at_risk"},"pillar":{"type":"string","description":"Home pillar of the signal. Each signal belongs to exactly one pillar.","enum":["health_pulse","training","recovery","movement","nutrition","body"],"example":"training"},"priority":{"type":"number","description":"Priority (1 = highest). Celebrations are 1, act-now nudges 2, attention items 3, trends 4-5, CTAs 6, AI-proposed patterns 7.","example":2},"label":{"type":"string","description":"Short user-facing text for the signal (in the digest locale when AI generation succeeded).","example":"5-day streak on the line. Train today."},"detail":{"type":"string","description":"Optional supporting evidence.","example":"Current workout streak: 5 days"},"celebration":{"type":"boolean","description":"True for achievements worth celebrating (new best, milestone).","example":false},"isNewToday":{"type":"boolean","description":"True when the signal was triggered by today's data.","example":false},"source":{"type":"string","description":"Signal source. AI-proposed patterns carry lower trust than deterministic ones.","enum":["deterministic","ai"],"example":"deterministic"},"copyKey":{"type":"string","description":"Stable copy template key (e.g. streak_at_risk.workout) so clients can map deterministic signals to their own copy tables.","example":"streak_at_risk.workout"},"params":{"type":"object","description":"Values the copy template was filled with (numbers and names), so clients can re-template the signal in their own words.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]},"example":{"n":1,"t":2,"needed":1}}},"required":["id","kind","pillar","priority","label","source"]},"InsightPillarDto":{"type":"object","properties":{"type":{"type":"string","description":"The type of insight pillar.","enum":["health_pulse","training","recovery","movement","nutrition","body"],"example":"health_pulse"},"status":{"type":"string","description":"Status indicator for this pillar.","enum":["green","yellow","red"],"example":"green"},"headline":{"type":"string","description":"Headline summarizing the pillar insight (one short sentence, two max). Does not include pillar type prefix.","example":"82, up 5. Push today."},"action":{"type":"string","description":"Recommended action for this pillar (verb-led, doable today).","example":"Start Full Body Strength, 25 min."},"confidence":{"type":"number","description":"Confidence score for this pillar (0-1).","example":0.85},"score":{"type":"number","description":"Score value if applicable (0-100).","example":82},"delta":{"type":"number","description":"Change from baseline/average.","example":5},"deltaDirection":{"type":"string","description":"Direction of change.","enum":["up","down","stable"],"example":"up"},"driver":{"type":"string","description":"Primary driver for health pulse pillar.","enum":["sleep","exercise","body","nutrition","adherence"],"example":"sleep"},"weeklyCompletions":{"type":"number","description":"Number of workouts completed this week.","example":4},"streak":{"type":"number","description":"Current workout streak in days.","example":5},"formScore":{"type":"number","description":"Average form score from AI assessments.","example":78},"formTrend":{"type":"string","description":"Form score trend.","enum":["improving","declining","stable","insufficient-data"],"example":"improving"},"recentCoachingFocus":{"type":"string","description":"Most common coaching feedback.","example":"Keep your knees aligned with your toes"},"isFallback":{"type":"boolean","description":"Indicates if this pillar used fallback data.","example":false},"nutritionScore":{"type":"number","description":"Nutrition score (0-100) for nutrition pillar.","example":72},"caloriesConsumedKcal":{"type":"number","description":"Calories consumed (kcal) for nutrition pillar.","example":1850},"personalBests":{"type":"array","description":"Personal best metrics for this pillar (90-day window).","items":{"type":"object","properties":{"metric":{"type":"string"},"value":{"type":"number"},"label":{"type":"string"}}}},"streaks":{"type":"array","description":"Streaks for this pillar (90-day window).","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"number"},"label":{"type":"string"}}}},"milestones":{"type":"array","description":"Milestones for this pillar (90-day window). Only present on the day a milestone is crossed.","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"number"},"label":{"type":"string"}}}},"insights":{"description":"Detected signals assigned to this pillar (max 3, sorted by priority).","type":"array","items":{"$ref":"#/components/schemas/InsightSignalDto"}},"trend7d":{"type":"array","description":"Last 7 local days of the pillar primary metric (oldest first, null for missing days) for a sparkline. health_pulse = overall score, recovery = sleep score, movement = activity score or steps, body = body score or weight, nutrition = nutrition score.","items":{"type":"number","nullable":true},"example":[71,74,null,78,80,79,82]},"why":{"description":"Reasons behind the headline/action (max 3, numbers first). Present on every pillar when data allows.","example":["HRV below baseline","Sleep down 12 points over 3 nights"],"type":"array","items":{"type":"string"}}},"required":["type","status","headline","action","confidence"]},"DigestReadinessDto":{"type":"object","properties":{"band":{"type":"string","enum":["push","maintain","recover"],"example":"maintain"},"recommendedIntensity":{"type":"string","enum":["light","moderate","high"],"example":"moderate"},"message":{"type":"string","description":"One-line explanation of the band.","example":"Moderate effort today - HRV below baseline."},"contributors":{"description":"Up to 3 contributors that moved the band, most decisive first.","example":["HRV below baseline","Short night (5h 40m)"],"type":"array","items":{"type":"string"}}},"required":["band","recommendedIntensity","message"]},"DigestWeekStrengthTargetDto":{"type":"object","properties":{"completed":{"type":"number","description":"Completed strength days in the current Monday-based week.","example":1},"planned":{"type":"number","description":"Weekly strength-day target (2, or 3 with a muscle goal / advanced level).","example":2}},"required":["completed","planned"]},"DigestWeekDto":{"type":"object","properties":{"completed":{"type":"number","description":"Completed workouts in the current Monday-based week (user timezone).","example":2},"planned":{"type":"number","description":"Weekly target from the program or profile; 0 when none.","example":4},"status":{"type":"string","enum":["on_track","behind","ahead","no_target"],"example":"on_track"},"daysRemaining":{"type":"number","description":"Days left in the week after today.","example":3},"weeklyStreakWeeks":{"type":"number","description":"Monday-based weeks in a row with at least one completed workout.","example":6},"strengthTarget":{"description":"Strength-day sub-target for the week strip. Present in weight_management mode only.","allOf":[{"$ref":"#/components/schemas/DigestWeekStrengthTargetDto"}]}},"required":["completed","planned","status","daysRemaining","weeklyStreakWeeks"]},"DigestHeroDto":{"type":"object","properties":{"kind":{"type":"string","description":"Which hero the mode picked. readiness in coach mode; strength_days (weight_management), pain_trend or prescription_adherence (physio), sleep_regularity (wellness), each falling back to readiness when its data is missing.","enum":["readiness","strength_days","pain_trend","prescription_adherence","sleep_regularity"],"example":"strength_days"},"value":{"type":"string","description":"Short value to render large (e.g. \"1/2\", \"3/10\", \"Maintain\").","example":"1/2"},"label":{"type":"string","description":"One line under the value.","example":"Strength days this week. One more keeps muscle."},"status":{"type":"string","enum":["green","yellow","red"],"example":"yellow"}},"required":["kind","value","label","status"]},"UserDigestResponse":{"type":"object","properties":{"userId":{"type":"string","description":"User ID the digest is for.","example":"63415bf67a9c7000126616c1"},"organizationId":{"type":"string","description":"Organization ID.","example":"63415bf67a9c7000126616c1"},"date":{"format":"date-time","type":"string","description":"Date the digest is for.","example":"2026-01-10T00:00:00.000Z"},"pillars":{"description":"Array of insight pillars (3-5 items).","type":"array","items":{"$ref":"#/components/schemas/InsightPillarDto"}},"todaysFocus":{"type":"string","description":"The single most important action for today.","example":"Complete: Full Body Strength Workout"},"dataCompleteness":{"type":"number","description":"Data completeness score (0-1). Higher means more data sources available. Weights depend on dataProfile.","example":0.75},"dataProfile":{"type":"string","description":"Completeness profile: \"wearable\" when any device data exists, otherwise \"workout_only\" (workout signals carry the full weight). Use it to phrase the limited-data tag.","enum":["wearable","workout_only"],"example":"workout_only"},"generatedAt":{"format":"date-time","type":"string","description":"Timestamp when the digest was generated.","example":"2026-01-10T08:30:00.000Z"},"highlights":{"description":"Top detected signals across all pillars (deterministic patterns, celebrations, CTAs, and AI-proposed extras), sorted by priority.","type":"array","items":{"$ref":"#/components/schemas/InsightSignalDto"}},"variant":{"type":"string","description":"Digest flavor: \"daily\" on most days, \"week_ahead\" on Mondays, \"week_review\" on Sundays (user local weekday).","enum":["daily","week_ahead","week_review"],"example":"daily"},"readiness":{"description":"Readiness hero for the Today screen (same call as the health_pulse/recovery pillars).","allOf":[{"$ref":"#/components/schemas/DigestReadinessDto"}]},"week":{"description":"Weekly pacing snapshot for the header chip.","allOf":[{"$ref":"#/components/schemas/DigestWeekDto"}]},"locale":{"type":"string","description":"BCP-47 locale the AI copy was generated in (deterministic labels are localized in the same call; fallback digests stay en-US).","example":"en-US"},"timeZone":{"type":"string","description":"IANA timezone used for day boundaries in this digest.","example":"Europe/Bucharest"},"shareText":{"type":"string","description":"Short shareable line for a share sheet (top celebration of the day or the Sunday week review). Absent when nothing is worth sharing.","example":"New best: Back Squat 80 kg x 5."},"mode":{"type":"string","description":"Insight mode the digest was generated under. Resolved from the member profile override, then the team default, then the team business type, then the primary goal. Clients pick chrome labels and the readiness lexicon from it: coach (Push/Maintain/Recover), physio (Progress/Hold/Ease), weight_management (Train/Steady/Light), wellness (Go/Steady/Rest).","enum":["coach","physio","weight_management","wellness"],"example":"coach"},"hero":{"description":"One glanceable hero for the Today screen, chosen by mode. Deterministic (never AI-generated), so it is stable across regenerations.","allOf":[{"$ref":"#/components/schemas/DigestHeroDto"}]}},"required":["userId","organizationId","date","pillars","todaysFocus","dataCompleteness","generatedAt"]},"PillarDetailResponse":{"type":"object","properties":{"type":{"type":"string","description":"The type of insight pillar.","enum":["health_pulse","training","recovery","movement","nutrition","body"],"example":"health_pulse"},"status":{"type":"string","description":"Status indicator for this pillar.","enum":["green","yellow","red"],"example":"green"},"headline":{"type":"string","description":"Headline summarizing the pillar insight (one short sentence, two max). Does not include pillar type prefix.","example":"82, up 5. Push today."},"action":{"type":"string","description":"Recommended action for this pillar (verb-led, doable today).","example":"Start Full Body Strength, 25 min."},"confidence":{"type":"number","description":"Confidence score for this pillar (0-1).","example":0.85},"score":{"type":"number","description":"Score value if applicable (0-100).","example":82},"delta":{"type":"number","description":"Change from baseline/average.","example":5},"deltaDirection":{"type":"string","description":"Direction of change.","enum":["up","down","stable"],"example":"up"},"driver":{"type":"string","description":"Primary driver for health pulse pillar.","enum":["sleep","exercise","body","nutrition","adherence"],"example":"sleep"},"weeklyCompletions":{"type":"number","description":"Number of workouts completed this week.","example":4},"streak":{"type":"number","description":"Current workout streak in days.","example":5},"formScore":{"type":"number","description":"Average form score from AI assessments.","example":78},"formTrend":{"type":"string","description":"Form score trend.","enum":["improving","declining","stable","insufficient-data"],"example":"improving"},"recentCoachingFocus":{"type":"string","description":"Most common coaching feedback.","example":"Keep your knees aligned with your toes"},"isFallback":{"type":"boolean","description":"Indicates if this pillar used fallback data.","example":false},"nutritionScore":{"type":"number","description":"Nutrition score (0-100) for nutrition pillar.","example":72},"caloriesConsumedKcal":{"type":"number","description":"Calories consumed (kcal) for nutrition pillar.","example":1850},"personalBests":{"type":"array","description":"Personal best metrics for this pillar (90-day window).","items":{"type":"object","properties":{"metric":{"type":"string"},"value":{"type":"number"},"label":{"type":"string"}}}},"streaks":{"type":"array","description":"Streaks for this pillar (90-day window).","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"number"},"label":{"type":"string"}}}},"milestones":{"type":"array","description":"Milestones for this pillar (90-day window). Only present on the day a milestone is crossed.","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"number"},"label":{"type":"string"}}}},"insights":{"description":"Detected signals assigned to this pillar (max 3, sorted by priority).","type":"array","items":{"$ref":"#/components/schemas/InsightSignalDto"}},"trend7d":{"type":"array","description":"Last 7 local days of the pillar primary metric (oldest first, null for missing days) for a sparkline. health_pulse = overall score, recovery = sleep score, movement = activity score or steps, body = body score or weight, nutrition = nutrition score.","items":{"type":"number","nullable":true},"example":[71,74,null,78,80,79,82]},"why":{"description":"Reasons behind the headline/action (max 3, numbers first). Present on every pillar when data allows.","example":["HRV below baseline","Sleep down 12 points over 3 nights"],"type":"array","items":{"type":"string"}},"lastWorkout":{"type":"object","description":"Last workout information for training pillar."},"nextSession":{"type":"object","description":"Next scheduled session for training pillar."},"bestLever":{"type":"string","description":"Best training lever for training pillar.","enum":["strength","cardio","mobility"]},"sleepScore":{"type":"number","description":"Sleep score for recovery pillar.","example":75},"mainIssue":{"type":"string","description":"Main issue identified for recovery pillar.","example":"Sleep efficiency"},"yesterdayIntensity":{"type":"string","description":"Yesterday's workout intensity for recovery pillar.","enum":["low","moderate","high"]},"sleepDurationMin":{"type":"number","description":"Last night sleep duration in minutes (recovery pillar, typed wearable column).","example":412},"sleepEfficiencyPct":{"type":"number","description":"Last night sleep efficiency in percent (recovery pillar).","example":91},"deepSleepMin":{"type":"number","description":"Last night deep sleep in minutes (recovery pillar).","example":84},"remSleepMin":{"type":"number","description":"Last night REM sleep in minutes (recovery pillar).","example":96},"spo2AvgPct":{"type":"number","description":"Last night average blood oxygen saturation in percent (recovery pillar).","example":96},"restingHeartRate":{"type":"number","description":"Resting heart rate in bpm (recovery and body pillars).","example":56},"activityLevel":{"type":"string","description":"Activity level for movement pillar.","enum":["low","moderate","high"]},"suggestedMinutes":{"type":"number","description":"Suggested movement minutes for movement pillar.","example":20},"cardioTrend":{"type":"string","description":"Cardio trend for movement pillar.","enum":["improving","declining","stable","insufficient-data"]},"stepsToday":{"type":"number","description":"Steps on the digest day (movement pillar).","example":8420},"avgSteps7d":{"type":"number","description":"7-day average steps (movement pillar).","example":7650},"mvpaMinutes7d":{"type":"number","description":"Moderate + vigorous intensity minutes over the last 7 days, WHO floor is 150 (movement pillar).","example":120},"floorsToday":{"type":"number","description":"Floors climbed on the digest day (movement pillar).","example":14},"avgFloors28d":{"type":"number","description":"28-day average floors climbed per day (movement pillar).","example":9},"bodyScore":{"type":"number","description":"Body score for body pillar.","example":72},"weeklyTrend":{"type":"string","description":"Weekly trend for body pillar.","enum":["improving","declining","stable","insufficient-data"]},"streakDays":{"type":"number","description":"Streak days for body/momentum pillar.","example":7},"biggestLever":{"type":"string","description":"Biggest lever for improvement.","enum":["sleep","nutrition","movement"]},"weightKg":{"type":"number","description":"Latest logged body weight in kg (body pillar).","example":78.4},"weightChange4WeeksKg":{"type":"number","description":"Weekly-average weight change over 4 weeks in kg, direction and magnitude only (body pillar).","example":-0.8},"bodyFatPct":{"type":"number","description":"Latest smart-scale body fat in % within 30 days, an estimate (body pillar).","example":22.4},"bonePct":{"type":"number","description":"Latest smart-scale bone mass in % of body weight within 30 days (body pillar).","example":4.1},"bodyWaterPct":{"type":"number","description":"Latest smart-scale body water in % of body weight within 30 days (body pillar).","example":55.2},"proteinG":{"type":"number","description":"Protein (g) for nutrition pillar.","example":120},"carbsG":{"type":"number","description":"Carbohydrates (g) for nutrition pillar.","example":200},"fatG":{"type":"number","description":"Fat (g) for nutrition pillar.","example":65},"mealsLoggedToday":{"type":"number","description":"Number of meals/entries logged today for nutrition pillar.","example":6},"nutritionMeals":{"type":"array","description":"Per-entry nutrition breakdown for the day (up to 20 entries). Photo-logged entries include a meal description.","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"caloriesKcal":{"type":"number"},"proteinG":{"type":"number"},"carbsG":{"type":"number"},"fatG":{"type":"number"},"description":{"type":"string"}}}},"nutritionWin":{"type":"string","description":"Positive nutrition behavior identified for nutrition pillar.","example":"Good protein intake (195g)"},"nutritionWatch":{"type":"string","description":"Area to improve for nutrition pillar.","example":"High calorie day – confirm aligned with goal"},"waterMlToday":{"type":"number","description":"Water intake on the digest day in mL (nutrition pillar, from the wearable or health app).","example":1800},"avgWaterMl7d":{"type":"number","description":"7-day average water intake in mL (nutrition pillar).","example":2100},"bmrKcal":{"type":"number","description":"Device estimate of resting burn in kcal/day, 14-day median rounded to 50 (nutrition pillar).","example":1750},"readinessBand":{"type":"string","description":"Readiness band indicating training capacity for today.","enum":["push","maintain","recover"],"example":"maintain"},"readinessMessage":{"type":"string","description":"Short message explaining the readiness recommendation.","example":"Moderate effort today - sleep down vs baseline."},"recommendedIntensity":{"type":"string","description":"Recommended workout intensity based on readiness.","enum":["light","moderate","high"],"example":"moderate"},"hrvBand":{"type":"string","description":"HRV status relative to personal baseline.","enum":["low","normal","high"],"example":"normal"},"riskLevel":{"type":"string","description":"Risk level for burnout/overreaching.","enum":["low","moderate","high"],"example":"moderate"},"riskTriggers":{"description":"Factors that triggered the risk flag (max 3).","example":["Sleep trend declining","RPE consistently high"],"type":"array","items":{"type":"string"}},"formCue":{"type":"string","description":"Primary form cue to focus on today.","example":"Keep knees tracking over toes"},"formSuggestion":{"type":"string","description":"Suggested adjustment if form is declining.","example":"Slow tempo + lighter load today"},"repAccuracy":{"type":"number","description":"Average rep accuracy from AI assessments.","example":82},"pacingStatus":{"type":"string","description":"Program pacing status for the current week.","enum":["on_track","behind","ahead"],"example":"on_track"},"pacingMessage":{"type":"string","description":"Short message about program pacing.","example":"3/4 workouts this week. On pace."},"workoutsPlannedThisWeek":{"type":"number","description":"Planned workouts per week based on user profile.","example":4},"workoutsCompletedThisWeek":{"type":"number","description":"Workouts completed this week.","example":3},"currentWeek":{"type":"number","description":"Current week number in the program (1-based).","example":2},"totalWeeks":{"type":"number","description":"Total weeks in the program.","example":8},"alternativeActions":{"description":"Safe alternative actions (max 2).","example":["Do Full Body Strength at moderate intensity","Swap to 15 min of mobility and an easy walk"],"type":"array","items":{"type":"string"}},"loadBand":{"type":"string","description":"Descriptive weekly load band vs the 4-week average (training pillar). Never an injury-risk score.","enum":["light","steady","heavy"],"example":"steady"},"weeklyStreakWeeks":{"type":"number","description":"Monday-based weeks in a row with a workout (training pillar, 2+ only).","example":6},"strengthBests":{"type":"array","description":"Top strength bests over 90 days (training pillar, users who log weights). Weights in kg; estimated1RmKg uses Epley on sets of 1-10 reps.","items":{"type":"object","properties":{"exerciseName":{"type":"string"},"weightKg":{"type":"number"},"reps":{"type":"number"},"estimated1RmKg":{"type":"number"}}}},"strengthDaysThisWeek":{"type":"number","description":"Completed strength days in the current Monday-based week (training pillar, weight_management mode).","example":1},"strengthDaysTarget":{"type":"number","description":"Weekly strength-day target (training pillar, weight_management mode).","example":2},"proteinTargetG":{"type":"number","description":"Daily protein target in grams (nutrition pillar, weight_management mode). Coach override or a g/kg rule on the latest weight.","example":128},"proteinAvg7dG":{"type":"number","description":"7-day average protein in grams over logged days (nutrition pillar, weight_management mode).","example":104},"painScoreLast":{"type":"number","description":"Member-reported pain (0-10) at the latest check-in (training pillar, physio mode).","example":3},"painAvg7d":{"type":"number","description":"7-day average of reported pain (training pillar, physio mode).","example":3.5},"painAvg28d":{"type":"number","description":"28-day average of reported pain (training pillar, physio mode).","example":4.2},"painGreenStreak":{"type":"number","description":"Consecutive most-recent check-ins with pain 3/10 or under (training pillar, physio mode).","example":4},"painTrend":{"description":"Last up to 7 pain check-ins, oldest first, for a pain sparkline (training pillar, physio mode).","example":[6,5,5,4,3,3,2],"type":"array","items":{"type":"number"}}},"required":["type","status","headline","action","confidence"]},"NutritionPhotoEstimateItemDto":{"type":"object","properties":{"name":{"type":"string","description":"Detected food item name","example":"Grilled chicken breast"},"estimatedPortion":{"type":"string","description":"Estimated portion size","example":"150 g"},"caloriesKcal":{"type":"number","description":"Estimated calories in kcal","example":248},"proteinG":{"type":"number","description":"Estimated protein in grams","example":46},"carbsG":{"type":"number","description":"Estimated carbohydrates in grams","example":0},"fatG":{"type":"number","description":"Estimated fat in grams","example":5}},"required":["name"]},"NutritionPhotoTotalsDto":{"type":"object","properties":{"caloriesKcal":{"type":"number","description":"Calories in kcal","example":522},"proteinG":{"type":"number","description":"Protein in grams","example":53},"carbsG":{"type":"number","description":"Carbohydrates in grams","example":56},"fatG":{"type":"number","description":"Fat in grams","example":7}},"required":["caloriesKcal","proteinG","carbsG","fatG"]},"NutritionPhotoEstimateDto":{"type":"object","properties":{"isFood":{"type":"boolean","description":"Whether the photo shows food","example":true},"confidence":{"type":"number","description":"Confidence of the macro estimate (0-1)","example":0.86},"mealDescription":{"type":"string","description":"Plain-language description of the detected meal","example":"Grilled chicken breast with white rice and mixed salad"},"items":{"description":"Per-item food breakdown","type":"array","items":{"$ref":"#/components/schemas/NutritionPhotoEstimateItemDto"}},"totals":{"description":"Estimated macro totals for the meal","allOf":[{"$ref":"#/components/schemas/NutritionPhotoTotalsDto"}]}},"required":["isFood","confidence","mealDescription","items","totals"]},"AnalyzeNutritionPhotoData":{"type":"object","properties":{"pendingLogId":{"type":"string","description":"Pending log id to pass to the confirm endpoint","example":"665f1b2a9c7000126616c1aa"},"expiresAt":{"format":"date-time","type":"string","description":"Expiry of the pending log (1 hour after analysis)","example":"2026-06-12T13:24:00.000Z"},"estimate":{"$ref":"#/components/schemas/NutritionPhotoEstimateDto"}},"required":["pendingLogId","expiresAt","estimate"]},"AnalyzeNutritionPhotoResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AnalyzeNutritionPhotoData"}},"required":["data"]},"NutritionPhotoTotalsOverrideDto":{"type":"object","properties":{"caloriesKcal":{"type":"number","description":"Corrected calories in kcal","minimum":0,"example":600},"proteinG":{"type":"number","description":"Corrected protein in grams","minimum":0,"example":45},"carbsG":{"type":"number","description":"Corrected carbohydrates in grams","minimum":0,"example":70},"fatG":{"type":"number","description":"Corrected fat in grams","minimum":0,"example":12}}},"ConfirmNutritionPhotoLogBody":{"type":"object","properties":{"totals":{"description":"Optional corrected totals to log instead of the AI estimate. Items and description stay as estimated.","allOf":[{"$ref":"#/components/schemas/NutritionPhotoTotalsOverrideDto"}]}}},"ConfirmNutritionPhotoLogData":{"type":"object","properties":{"logged":{"description":"Values that were logged","allOf":[{"$ref":"#/components/schemas/NutritionPhotoTotalsDto"}]},"dayTotals":{"type":"object","description":"Day's running totals after this log","properties":{"caloriesConsumedKcal":{"type":"number","example":1290},"proteinG":{"type":"number","example":98},"carbsG":{"type":"number","example":132},"fatG":{"type":"number","example":41}}},"nutritionScore":{"type":"object","description":"Nutrition score for the day (0-100), null when not computable","nullable":true,"example":78},"mealDescription":{"type":"string","description":"Detected meal description (persisted on the nutrition entry)","example":"Grilled chicken breast with white rice and mixed salad"},"items":{"description":"Per-item food breakdown (persisted on the nutrition entry)","type":"array","items":{"$ref":"#/components/schemas/NutritionPhotoEstimateItemDto"}}},"required":["logged","dayTotals","nutritionScore","mealDescription","items"]},"ConfirmNutritionPhotoLogResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConfirmNutritionPhotoLogData"}},"required":["data"]},"OrganizationLogNutritionBody":{"type":"object","properties":{"date":{"type":"string","description":"Date for the log entry (ISO 8601 or YYYY-MM-DD). Defaults to today.","example":"2026-08-05"},"caloriesKcal":{"type":"number","description":"Calories in kcal","minimum":0,"example":450},"proteinG":{"type":"number","description":"Protein in grams","minimum":0,"example":25},"carbsG":{"type":"number","description":"Carbohydrates in grams","minimum":0,"example":50},"fatG":{"type":"number","description":"Fat in grams","minimum":0,"example":15},"externalId":{"type":"string","description":"Stable partner id for this meal entry. Re-posting the same externalId replaces the previous contribution instead of adding a duplicate (safe to retry), and enables DELETE by externalId.","maxLength":120,"example":"partner-meal-5521"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"}}},"OrganizationLogNutritionData":{"type":"object","properties":{"logged":{"description":"Values that were logged by this call","allOf":[{"$ref":"#/components/schemas/NutritionPhotoTotalsDto"}]},"dayTotals":{"type":"object","description":"Day's running totals after this log","properties":{"caloriesConsumedKcal":{"type":"number","example":1290},"proteinG":{"type":"number","example":98},"carbsG":{"type":"number","example":132},"fatG":{"type":"number","example":41}}},"nutritionScore":{"type":"object","description":"Nutrition score for the day (0-100), null when not computable","nullable":true,"example":78},"externalId":{"type":"object","description":"The externalId this entry was stored with, null when none was provided.","nullable":true,"example":"partner-meal-5521"}},"required":["logged","dayTotals","nutritionScore","externalId"]},"OrganizationLogNutritionResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OrganizationLogNutritionData"}},"required":["data"]},"ActivityHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"activity"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Required for activity entries.","maxLength":120,"example":"run-8842"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"startAt":{"type":"string","description":"Activity start time (ISO 8601). Required.","example":"2026-08-05T07:30:00.000Z"},"endAt":{"type":"string","description":"Activity end time (ISO 8601). Derived from durationSeconds when omitted.","example":"2026-08-05T08:15:00.000Z"},"activityType":{"type":"string","description":"Activity type label (free-form). Common values: Running, Cycling, Walking, Swimming, Hiking, Yoga, Strength Training, HIIT, Rowing. Omit when unclassified. Swim-specific fields apply only to swimming sessions.","example":"Running"},"durationSeconds":{"type":"number","description":"Total duration in seconds","minimum":0,"example":2700},"distanceMeters":{"type":"number","description":"Distance in meters","minimum":0,"example":8200},"steps":{"type":"number","description":"Steps during the activity","minimum":0,"example":7900},"activeCaloriesKcal":{"type":"number","description":"Active calories in kcal","minimum":0,"example":512},"hrAvg":{"type":"number","description":"Average heart rate (bpm)","minimum":0,"example":148},"hrMax":{"type":"number","description":"Max heart rate (bpm)","minimum":0,"example":176},"hrMin":{"type":"number","description":"Min heart rate (bpm)","minimum":0,"example":92},"hrResting":{"type":"number","description":"Resting heart rate (bpm)","minimum":0,"example":58},"paceAvgMinPerKm":{"type":"number","description":"Average pace (min/km). Derived from distance/duration when omitted.","minimum":0,"example":5.5},"paceMaxMinPerKm":{"type":"number","description":"Fastest split pace (min/km)","minimum":0,"example":4.9},"speedAvgMps":{"type":"number","description":"Average speed (m/s)","minimum":0,"example":3.1},"speedMaxMps":{"type":"number","description":"Max speed (m/s)","minimum":0,"example":4.4},"cadenceAvgRpm":{"type":"number","description":"Average cadence (rpm)","minimum":0,"example":86},"cadenceMaxRpm":{"type":"number","description":"Max cadence (rpm)","minimum":0,"example":102},"lowIntensitySeconds":{"type":"number","description":"Seconds at low intensity","minimum":0,"example":300},"moderateIntensitySeconds":{"type":"number","description":"Seconds at moderate intensity","minimum":0,"example":900},"vigorousIntensitySeconds":{"type":"number","description":"Seconds at vigorous intensity","minimum":0,"example":1500},"elevationGainMeters":{"type":"number","description":"Elevation gain in meters","minimum":0,"example":120},"elevationLossMeters":{"type":"number","description":"Elevation loss in meters","minimum":0,"example":95},"floorsClimbed":{"type":"number","description":"Floors climbed","minimum":0,"example":12},"swimDistanceMeters":{"type":"number","description":"Swim distance in meters (pool swims)","minimum":0,"example":1500},"swimLaps":{"type":"number","description":"Number of swim laps","minimum":0,"example":30},"swimStrokes":{"type":"number","description":"Number of swim strokes","minimum":0,"example":620},"poolLengthMeters":{"type":"number","description":"Pool length in meters","minimum":0,"example":25}},"required":["dataType","startAt"]},"SleepHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"sleep"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"sleepScore":{"type":"number","description":"Sleep score (0-100)","minimum":0,"maximum":100,"example":82},"sleepEfficiency":{"type":"number","description":"Sleep efficiency (1-100). Used as sleep score fallback when sleepScore is omitted.","minimum":0,"maximum":100,"example":91},"hrvRmssd":{"type":"number","description":"HRV RMSSD in milliseconds","minimum":0,"example":46},"hrvSdnn":{"type":"number","description":"HRV SDNN in milliseconds","minimum":0,"example":52},"hrAvg":{"type":"number","description":"Average heart rate during sleep (bpm)","minimum":0,"example":54},"hrResting":{"type":"number","description":"Resting heart rate (bpm)","minimum":0,"example":52},"hrMax":{"type":"number","description":"Max heart rate during sleep (bpm)","minimum":0,"example":74},"hrMin":{"type":"number","description":"Min heart rate during sleep (bpm)","minimum":0,"example":47}},"required":["dataType"]},"StepsHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"steps"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"steps":{"type":"number","description":"Accumulated steps for the day","minimum":0,"example":10412}},"required":["dataType","steps"]},"BodyMetricsHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"body_metrics"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"weightKg":{"type":"number","description":"Body weight in kilograms","minimum":0,"example":78.4},"heightCm":{"type":"number","description":"Height in centimeters","minimum":0,"example":181},"bmi":{"type":"number","description":"Body mass index. Derived from weightKg/heightCm when omitted.","minimum":0,"example":23.9}},"required":["dataType"]},"HeartRateHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"heart_rate"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"hrvRmssd":{"type":"number","description":"HRV RMSSD in milliseconds","minimum":0,"example":44},"hrvSdnn":{"type":"number","description":"HRV SDNN in milliseconds","minimum":0,"example":49},"hrAvg":{"type":"number","description":"Average heart rate (bpm)","minimum":0,"example":64},"hrResting":{"type":"number","description":"Resting heart rate (bpm)","minimum":0,"example":55},"hrMax":{"type":"number","description":"Max heart rate (bpm)","minimum":0,"example":132},"hrMin":{"type":"number","description":"Min heart rate (bpm)","minimum":0,"example":48}},"required":["dataType"]},"HydrationHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"hydration"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"waterIntakeMl":{"type":"number","description":"Water intake for the day in milliliters (daily total; the latest entry for a day wins, entries are not summed)","minimum":0,"example":2100}},"required":["dataType","waterIntakeMl"]},"OxygenationHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"oxygenation"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"spo2AvgPct":{"type":"number","description":"Average blood oxygen saturation (percent)","minimum":0,"maximum":100,"example":97}},"required":["dataType","spo2AvgPct"]},"ScoresHealthDataEntryDto":{"type":"object","properties":{"dataType":{"type":"string","description":"Type of health data carried by this entry.","enum":["activity","sleep","steps","body_metrics","heart_rate","hydration","oxygenation","scores"],"example":"scores"},"externalId":{"type":"string","description":"Stable partner id for the record - idempotency and correction key. Re-posting the same (dataType, externalId) updates the entry instead of duplicating it. Required for activity entries; day-scoped types default to a per-day key (\"day-YYYY-MM-DD\") when omitted.","maxLength":120,"example":"partner-record-1234"},"recordedAt":{"type":"string","description":"Event time (ISO 8601). Determines the calendar day the data lands on for day-scoped types. Defaults to ingestion time. Must not be in the future and at most 90 days in the past.","example":"2026-08-05T22:45:00.000Z"},"source":{"type":"string","description":"Provenance label for the pushed data (e.g. your app or device name). Surfaces in dataSources.","maxLength":50,"example":"AcmeHealthApp"},"overallHealthScore":{"type":"number","description":"Partner-computed overall health score (0-100)","minimum":0,"maximum":100,"example":79},"physicalScore":{"type":"number","description":"Partner-computed physical/activity score (0-100)","minimum":0,"maximum":100,"example":74},"sleepScore":{"type":"number","description":"Partner-computed sleep score (0-100)","minimum":0,"maximum":100,"example":85},"bodyScore":{"type":"number","description":"Partner-computed body score (0-100)","minimum":0,"maximum":100,"example":81},"nutritionScore":{"type":"number","description":"Partner-computed nutrition score (0-100)","minimum":0,"maximum":100,"example":68}},"required":["dataType"]},"LogHealthDataBody":{"type":"object","properties":{"entries":{"type":"array","description":"Health data entries to ingest (max 50 per request). Each entry is processed independently (best-effort batch): failures are reported per entry in the response, valid entries are still applied.","minItems":1,"maxItems":50,"items":{"oneOf":[{"$ref":"#/components/schemas/ActivityHealthDataEntryDto"},{"$ref":"#/components/schemas/SleepHealthDataEntryDto"},{"$ref":"#/components/schemas/StepsHealthDataEntryDto"},{"$ref":"#/components/schemas/BodyMetricsHealthDataEntryDto"},{"$ref":"#/components/schemas/HeartRateHealthDataEntryDto"},{"$ref":"#/components/schemas/HydrationHealthDataEntryDto"},{"$ref":"#/components/schemas/OxygenationHealthDataEntryDto"},{"$ref":"#/components/schemas/ScoresHealthDataEntryDto"}],"discriminator":{"propertyName":"dataType","mapping":{"activity":"#/components/schemas/ActivityHealthDataEntryDto","sleep":"#/components/schemas/SleepHealthDataEntryDto","steps":"#/components/schemas/StepsHealthDataEntryDto","body_metrics":"#/components/schemas/BodyMetricsHealthDataEntryDto","heart_rate":"#/components/schemas/HeartRateHealthDataEntryDto","hydration":"#/components/schemas/HydrationHealthDataEntryDto","oxygenation":"#/components/schemas/OxygenationHealthDataEntryDto","scores":"#/components/schemas/ScoresHealthDataEntryDto"}}},"example":[{"dataType":"activity","externalId":"run-8842","source":"AcmeHealthApp","activityType":"Running","startAt":"2026-08-05T07:30:00.000Z","endAt":"2026-08-05T08:15:00.000Z","durationSeconds":2700,"distanceMeters":8200,"steps":7900,"activeCaloriesKcal":512,"hrAvg":148,"hrMax":176,"paceAvgMinPerKm":5.5},{"dataType":"sleep","recordedAt":"2026-08-05T08:00:00.000Z","source":"AcmeHealthApp","sleepScore":82,"sleepEfficiency":91,"hrvRmssd":46,"hrResting":52},{"dataType":"steps","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","steps":10412},{"dataType":"body_metrics","recordedAt":"2026-08-05T07:00:00.000Z","source":"AcmeHealthApp","weightKg":78.4,"heightCm":181},{"dataType":"heart_rate","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","hrvRmssd":44,"hrAvg":64,"hrResting":55},{"dataType":"hydration","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","waterIntakeMl":2100},{"dataType":"oxygenation","recordedAt":"2026-08-05T21:00:00.000Z","source":"AcmeHealthApp","spo2AvgPct":97},{"dataType":"scores","recordedAt":"2026-08-05T22:00:00.000Z","source":"AcmeHealthApp","overallHealthScore":79,"physicalScore":74,"sleepScore":85,"bodyScore":81,"nutritionScore":68}]}},"required":["entries"]},"HealthDataEntryResultDto":{"type":"object","properties":{"index":{"type":"number","description":"Position of the entry in the request entries array","example":0},"dataType":{"type":"string","description":"Data type of the entry","example":"sleep"},"externalId":{"type":"object","description":"Resolved idempotency key: the provided externalId, or the day-derived default for day-scoped types. Null when the entry was rejected before a key could be resolved.","nullable":true,"example":"day-2026-08-05"},"status":{"type":"string","description":"Outcome for this entry: created (new record), updated (idempotent upsert of an existing key), or rejected.","enum":["created","updated","rejected"],"example":"created"},"reason":{"type":"string","description":"Machine-readable failure reason. Only present when status is rejected.","example":"Entry timestamp cannot be in the future"}},"required":["index","dataType","externalId","status"]},"LogHealthDataSummaryDto":{"type":"object","properties":{"total":{"type":"number","description":"Total entries in the request","example":3},"succeeded":{"type":"number","description":"Entries applied (created or updated)","example":2},"failed":{"type":"number","description":"Entries rejected","example":1}},"required":["total","succeeded","failed"]},"LogHealthDataData":{"type":"object","properties":{"results":{"description":"Per-entry outcome, in request order","type":"array","items":{"$ref":"#/components/schemas/HealthDataEntryResultDto"}},"summary":{"$ref":"#/components/schemas/LogHealthDataSummaryDto"}},"required":["results","summary"]},"LogHealthDataResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LogHealthDataData"}},"required":["data"]},"CurrentApiStatsDto":{"type":"object","properties":{"currentHour":{"type":"string","description":"Current hour timestamp (ISO 8601 format)","example":"2023-11-06T14:00:00Z"},"currentHourRequests":{"type":"number","description":"Number of requests made in the current hour","example":45},"totalDayRequests":{"type":"number","description":"Total number of requests made today","example":234},"currentDate":{"type":"string","description":"Current date (YYYY-MM-DD format)","example":"2023-11-06"}},"required":["currentHour","currentHourRequests","totalDayRequests","currentDate"]},"RateLimitsDto":{"type":"object","properties":{"hourly":{"type":"object","description":"Hourly rate limit from subscription entitlement","example":1000,"nullable":true},"daily":{"type":"object","description":"Daily rate limit from subscription entitlement","example":15000,"nullable":true}}},"OrganizationStatsResponse":{"type":"object","properties":{"organizationId":{"type":"string","description":"The unique identifier of the organization","example":"63415bf67a9c7000126616c1"},"organizationName":{"type":"string","description":"The name of the organization","example":"My Fitness Company"},"currentStats":{"description":"Current API usage statistics","allOf":[{"$ref":"#/components/schemas/CurrentApiStatsDto"}]},"rateLimits":{"description":"Rate limits from subscription entitlement","allOf":[{"$ref":"#/components/schemas/RateLimitsDto"}]},"timestamp":{"type":"string","description":"Response timestamp (ISO 8601 format)","example":"2023-11-06T14:30:00Z"}},"required":["organizationId","organizationName","currentStats","rateLimits","timestamp"]},"StartConversationBody":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization id (required). Prefer the 24-character hex id from Settings → Integrations. The literal `default` resolves to the API key's team organization (team-scoped keys). Club or standard keys without a team must send the hex id.","example":"63415bf67a9c7000126616c1"},"initialMessage":{"type":"string","description":"Initial message to start the conversation","example":"What exercises should I do for chest?","minLength":1,"maxLength":2000},"userEmail":{"type":"string","description":"End-user email. Provide this **or** `userExternalUUID` (at least one is required). Sending neither returns 400.","example":"user@example.com"},"userExternalUUID":{"type":"string","description":"External unique identifier for the end user. Provide this **or** `userEmail` (at least one is required). Sending neither returns 400.","example":"user-12345"}},"required":["organizationId","initialMessage"]},"ChatConversationDto":{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID"},"title":{"type":"string","description":"Conversation title"},"messageCount":{"type":"number","description":"Number of messages in conversation"},"lastMessageAt":{"format":"date-time","type":"string","description":"Last message timestamp"},"createdAt":{"format":"date-time","type":"string","description":"Conversation creation timestamp"}},"required":["id","messageCount","createdAt"]},"ChatMessageDto":{"type":"object","properties":{"id":{"type":"string","description":"Message ID"},"role":{"type":"string","description":"Message role","enum":["user","assistant"]},"content":{"type":"string","description":"Message content"},"createdAt":{"format":"date-time","type":"string","description":"Message creation timestamp"},"metadata":{"type":"object","description":"Message metadata (reasoning, topics, nutritionLogged, contentPreview, pendingAction, confirmedResult)","additionalProperties":true},"status":{"type":"string","description":"Message delivery status","enum":["pending","delivered","failed"]}},"required":["id","role","content","createdAt","status"]},"ChatConversationResponse":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/ChatConversationDto"},"response":{"$ref":"#/components/schemas/ChatMessageDto"}},"required":["conversation","response"]},"PaginationDto":{"type":"object","properties":{"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Items per page"},"total":{"type":"number","description":"Total number of items"},"totalPages":{"type":"number","description":"Total number of pages"}},"required":["page","limit","total","totalPages"]},"ChatConversationsResponse":{"type":"object","properties":{"conversations":{"type":"array","items":{"$ref":"#/components/schemas/ChatConversationDto"}},"pagination":{"$ref":"#/components/schemas/PaginationDto"}},"required":["conversations","pagination"]},"ChatMessagesResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageDto"}},"pagination":{"$ref":"#/components/schemas/PaginationDto"}},"required":["messages","pagination"]},"SendMessageBody":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization id (required). Prefer the 24-character hex id from Settings → Integrations. The literal `default` resolves to the API key's team organization (team-scoped keys). Club or standard keys without a team must send the hex id.","example":"63415bf67a9c7000126616c1"},"content":{"type":"string","description":"Message content","example":"What exercises should I do for chest?","minLength":1,"maxLength":2000},"userEmail":{"type":"string","description":"End-user email. Provide this **or** `userExternalUUID` (at least one is required). Sending neither returns 400.","example":"user@example.com"},"userExternalUUID":{"type":"string","description":"External unique identifier for the end user. Provide this **or** `userEmail` (at least one is required). Sending neither returns 400.","example":"user-12345"}},"required":["organizationId","content"]},"SendMessageResponse":{"type":"object","properties":{"userMessage":{"description":"The user message that was sent","allOf":[{"$ref":"#/components/schemas/ChatMessageDto"}]},"assistantMessage":{"description":"The AI assistant response","allOf":[{"$ref":"#/components/schemas/ChatMessageDto"}]},"conversation":{"description":"Updated conversation information","allOf":[{"$ref":"#/components/schemas/ChatConversationDto"}]}},"required":["userMessage","assistantMessage","conversation"]},"ConfirmActionBody":{"type":"object","properties":{"pendingActionId":{"type":"string","description":"Pending action ID from assistantMessage.metadata.pendingAction.id","example":"507f1f77bcf86cd799439011"},"organizationId":{"type":"string","description":"Organization id (required). Prefer the 24-character hex id from Settings → Integrations. The literal `default` resolves to the API key's team organization (team-scoped keys). Club or standard keys without a team must send the hex id.","example":"63415bf67a9c7000126616c1"},"userEmail":{"type":"string","description":"End-user email. Provide this **or** `userExternalUUID` (at least one is required). Sending neither returns 400.","example":"user@example.com"},"userExternalUUID":{"type":"string","description":"External unique identifier for the end user. Provide this **or** `userEmail` (at least one is required). Sending neither returns 400.","example":"user-12345"}},"required":["pendingActionId","organizationId"]},"NutritionOverviewLoggedDto":{"type":"object","properties":{"caloriesKcal":{"type":"number"},"proteinG":{"type":"number"},"carbsG":{"type":"number"},"fatG":{"type":"number"}},"required":["caloriesKcal","proteinG","carbsG","fatG"]},"NutritionOverviewDayTotalsDto":{"type":"object","properties":{"caloriesConsumedKcal":{"type":"number"},"proteinG":{"type":"number"},"carbsG":{"type":"number"},"fatG":{"type":"number"}},"required":["caloriesConsumedKcal","proteinG","carbsG","fatG"]},"NutritionOverviewDto":{"type":"object","properties":{"logged":{"$ref":"#/components/schemas/NutritionOverviewLoggedDto"},"dayTotals":{"$ref":"#/components/schemas/NutritionOverviewDayTotalsDto"},"nutritionScore":{"type":"object","nullable":true}},"required":["logged","dayTotals","nutritionScore"]},"ConfirmActionResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"string"},"nutritionOverview":{"description":"Present when action was log_nutrition and success is true","allOf":[{"$ref":"#/components/schemas/NutritionOverviewDto"}]},"instructionForReply":{"type":"string","description":"Instruction for displaying the nutrition reply (log_nutrition only)"},"adaptedWorkout":{"description":"On-the-fly adapted workout (adapt_workout). Render and store locally.","allOf":[{"$ref":"#/components/schemas/WorkoutAdaptationResponseDto"}]},"generatedWorkout":{"description":"On-the-fly generated workout (generate_workout). Render and store locally.","allOf":[{"$ref":"#/components/schemas/WorkoutGenerationResponseDto"}]},"adaptedProgram":{"description":"On-the-fly adapted program (adapt_program). Render and store locally.","allOf":[{"$ref":"#/components/schemas/PlanAdaptationResponseDto"}]},"generatedProgram":{"description":"On-the-fly generated program (generate_program). Same shape as POST /v1/orgs/{orgId}/plans/generate. Render and store locally.","allOf":[{"$ref":"#/components/schemas/PlanGenerationResponseDto"}]}},"required":["success"]},"CreatePairingSessionDto":{"type":"object","properties":{"displayName":{"type":"string","description":"Human-readable name for the TV / display (max 255 characters).","example":"Living Room TV","maxLength":255},"organizationId":{"type":"string","description":"Organization (workspace) id the display belongs to — opaque 24-character hex string. Team-scoped keys default to their own organization; a mismatch returns 403.","example":"63415bf67a9c7000126616c1"}},"required":["displayName"]},"CastSocketIOConnectionDto":{"type":"object","properties":{"serverUrl":{"type":"string","description":"Content API host for the Socket.IO client. Prefer this over a hardcoded URL.","example":"https://content.api.hyperhuman.cc"},"namespace":{"type":"string","description":"Socket.IO namespace for HyperCast realtime events.","example":"/cast/pairing"},"fullUrl":{"type":"string","description":"Full Socket.IO URL (`serverUrl` + `namespace`). Pass this to the client constructor.","example":"https://content.api.hyperhuman.cc/cast/pairing"}},"required":["serverUrl","namespace","fullUrl"]},"CreatePairingSessionResponse":{"type":"object","properties":{"sessionId":{"type":"string","description":"Pairing session id (24-character hex).","example":"68d4f663bb28382457b3dc9d"},"pairingCode":{"type":"string","description":"6-digit pairing code shown on the display.","example":"401305"},"qrCodeData":{"type":"string","description":"URL encoded in the display QR. In-app scanners parse `sessionId` and `code` from the query string. Do not hardcode the host.","example":"https://member.hyperhuman.cc/cast?sessionId=68d4f663bb28382457b3dc9d&code=401305"},"expiresAt":{"format":"date-time","type":"string","description":"Session expiry (80 minutes from creation).","example":"2026-08-27T09:29:31.680Z"},"socketIO":{"description":"Socket.IO connection info for optional live-status clients.","allOf":[{"$ref":"#/components/schemas/CastSocketIOConnectionDto"}]}},"required":["sessionId","pairingCode","qrCodeData","expiresAt","socketIO"]},"CastConnectedDeviceDto":{"type":"object","properties":{"deviceId":{"type":"string","description":"Opaque device id supplied at join.","example":"device-xyz-123"},"deviceName":{"type":"string","description":"Human-readable device name supplied at join.","example":"My Phone"},"deviceType":{"type":"string","description":"Device class supplied at join.","example":"mobile","enum":["mobile","tablet","desktop","smart_tv"]},"connectedAt":{"format":"date-time","type":"string","description":"When the controller paired to this session.","example":"2026-08-27T08:10:00.000Z"},"lastSeen":{"format":"date-time","type":"string","description":"Last heartbeat / activity timestamp.","example":"2026-08-27T08:12:00.000Z"}},"required":["deviceId","deviceName","deviceType","connectedAt","lastSeen"]},"CastCurrentWorkoutDto":{"type":"object","properties":{"id":{"type":"string","description":"Workout resource id currently loaded on the display (24-character hex).","example":"507f1f77bcf86cd799439011"}},"required":["id"]},"PairingSessionInfoResponse":{"type":"object","properties":{"sessionId":{"type":"string","description":"Pairing session id (24-character hex).","example":"68d4f663bb28382457b3dc9d"},"pairingCode":{"type":"string","description":"6-digit pairing code for this session.","example":"401305"},"displayName":{"type":"string","description":"Display name supplied at session create.","example":"Living Room TV"},"isActive":{"type":"boolean","description":"Whether the session is still active.","example":true},"expiresAt":{"format":"date-time","type":"string","description":"Session expiry (80 minutes from creation).","example":"2026-08-27T09:29:31.680Z"},"connectedDevice":{"description":"Currently paired controller, or `null` when no device is connected. A single object — not an array.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/CastConnectedDeviceDto"}]},"currentWorkout":{"description":"Workout currently loaded on the display, or `null`.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/CastCurrentWorkoutDto"}]}},"required":["sessionId","pairingCode","displayName","isActive","expiresAt"]},"CastActionResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Workout sent to display"}},"required":["success","message"]},"DeviceInfoDto":{"type":"object","properties":{"deviceId":{"type":"string","description":"Opaque controller device id you generate and reuse for this pairing (e.g. `device-` + random). Not a Hyperhuman resource id.","example":"device-xyz-123"},"deviceName":{"type":"string","description":"Human-readable device name shown on the display (max 255 characters).","example":"My Phone","maxLength":255},"deviceType":{"type":"string","description":"Controller device class. Allowed: `mobile`, `tablet`, `desktop`, `smart_tv`.","enum":["mobile","tablet","desktop","smart_tv"],"example":"mobile"}},"required":["deviceId","deviceName","deviceType"]},"JoinPairingSessionDto":{"type":"object","properties":{"sessionId":{"type":"string","description":"Pairing session id parsed from the display QR URL (`sessionId` query) — opaque 24-character hex string.","example":"68d4f663bb28382457b3dc9d"},"pairingCode":{"type":"string","description":"6-digit pairing code parsed from the display QR URL (`code` query). Exactly 6 numeric digits.","example":"401305"},"deviceInfo":{"description":"Controller device identity. Generate `deviceId` yourself and reuse it on later cast/control calls.","allOf":[{"$ref":"#/components/schemas/DeviceInfoDto"}]}},"required":["sessionId","pairingCode","deviceInfo"]},"JoinPairingSessionResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"sessionId":{"type":"string","description":"Pairing session id to use on subsequent cast/control calls (24-character hex).","example":"68d4f663bb28382457b3dc9d"},"displayName":{"type":"string","description":"Display name of the paired TV.","example":"Living Room TV"},"socketIO":{"description":"Socket.IO connection info for optional live-status clients.","allOf":[{"$ref":"#/components/schemas/CastSocketIOConnectionDto"}]}},"required":["success","sessionId","displayName","socketIO"]},"JoinByCodeDto":{"type":"object","properties":{"pairingCode":{"type":"string","description":"6-digit pairing code shown on the TV display. Exactly 6 numeric digits.","example":"401305","maxLength":6},"deviceInfo":{"description":"Controller device identity. Generate `deviceId` yourself and reuse it on later cast/control calls.","allOf":[{"$ref":"#/components/schemas/DeviceInfoDto"}]}},"required":["pairingCode","deviceInfo"]},"CastWorkoutDto":{"type":"object","properties":{"workoutId":{"type":"string","description":"Workout resource id to load on the display — opaque 24-character hex string. Must be a created or published workout.","example":"507f1f77bcf86cd799439011"},"workoutData":{"type":"object","description":"Deprecated. The display loads the workout by `workoutId`; omit this field.","deprecated":true},"deviceId":{"type":"string","description":"Controller `deviceId` from the join call. Must still be paired to this session.","example":"device-xyz-123"},"locale":{"type":"string","description":"Optional BCP-47 locale (e.g. `fr-FR`). Localizes display text and locale-aware media when supported; falls back to English. Omit `example` on first Try-it-out if you do not need a non-English player.","example":"fr-FR"}},"required":["workoutId","deviceId"]},"StartCastWorkoutSessionBody":{"type":"object","properties":{"endUserId":{"type":"string","description":"Attribute the session to a specific end user, by internal Hyperhuman user id or email. Resolved against the API key team. Ignored when a member Bearer token is present.","example":"64f1a2b3c4d5e6f7a8b9c0d1"},"externalUserId":{"type":"string","description":"Attribute the session to a specific end user by their external UUID (the externalUUID stored on the team membership). Alternative to endUserId.","example":"ext-user-12345"},"organizationId":{"type":"string","description":"Organization (team) id the end user belongs to. Required for standard/club keys that span organizations; defaults to the API key team for team-scoped keys.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"workoutId":{"type":"string","description":"Workout resource id to start — opaque 24-character hex string. Must already be loaded via `POST .../workout`.","example":"507f1f77bcf86cd799439011"},"deviceId":{"type":"string","description":"Controller `deviceId` from the join call. Must still be paired to this session.","example":"device-xyz-123"},"locale":{"type":"string","description":"Optional BCP-47 locale (e.g. `fr-FR`). Same rules as `POST .../workout`.","example":"fr-FR"}},"required":["workoutId","deviceId"]},"StartCastWorkoutResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Workout session started"},"workoutSessionId":{"type":"string","description":"Workout session id created for this playback (24-character hex). Same resource family as `POST /v1/workouts/{id}/sessions/start`.","example":"67d1a2b3c4e5f6789abc0d1e"}},"required":["success","message","workoutSessionId"]},"WorkoutControlBody":{"type":"object","properties":{"action":{"type":"string","description":"Literal control action. `done_exercise` completes the current exercise and advances (use for rep-based only). `done` completes the workout.","enum":["play","pause","next","prev","restart","done_exercise","done"],"example":"pause"},"deviceId":{"type":"string","description":"Controller `deviceId` from the join call. Must still be paired to this session.","example":"device-xyz-123"},"exerciseId":{"type":"string","description":"Optional current exercise / segment id for context on `next` / `prev` / `done_exercise`.","example":"507f1f77bcf86cd799439022"},"progressSeconds":{"type":"number","description":"Optional playback progress in seconds to persist with the command.","example":125.5}},"required":["action","deviceId"]},"CastWorkoutStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"workoutState":{"type":"string","description":"Authoritative playback state.","enum":["idle","playing","paused","completed"],"example":"playing"},"currentExerciseId":{"type":"string","description":"Current exercise / segment id when known.","example":"507f1f77bcf86cd799439022"},"currentExerciseIndex":{"type":"number","description":"Zero-based index into the workout `instances` array (control path). Distinct from class-chapter fields.","example":2},"progressSeconds":{"type":"number","description":"Playback progress in seconds.","example":125.5},"currentExerciseIsRepBased":{"type":"boolean","description":"Whether the current exercise is rep-based. Show `done_exercise` only when true.","example":true},"currentExerciseReps":{"type":"object","description":"Rep count for a rep-based exercise; omitted or null for time-based.","example":10,"nullable":true},"currentExerciseDuration":{"type":"object","description":"Duration in seconds for a time-based exercise; omitted or null for rep-based.","example":45,"nullable":true},"currentExerciseName":{"type":"string","description":"Active exercise / segment name reported by the display.","example":"Push-ups"},"currentChapterIndex":{"type":"number","description":"Zero-based index of the active class chapter (display cursor).","example":1},"currentChapterCount":{"type":"number","description":"Total chapters in the active class.","example":8},"currentChapterName":{"type":"string","description":"Name of the active class chapter.","example":"Warm-up"}},"required":["success","workoutState"]},"DisconnectDeviceDto":{"type":"object","properties":{"deviceId":{"type":"string","description":"Controller `deviceId` from the join call to unpair. Playback on the display keeps running.","example":"device-xyz-123"}},"required":["deviceId"]}}}}