{"openapi":"3.1.0","info":{"title":"HealthOS API","description":"HealthOS API — the account and health-data platform behind the HealthOS app.\n\nThe **user read API** (token-authenticated, `/api/v1/health` and `/api/v1/export`)\nlets external agents and scripts read a user's projected health data and full\ncanonical Apple Health archive. Create a personal token under\n`/api/v1/tokens` with the read scope you need, then send it as\n`Authorization: Bearer <token>`.\n\nRead scopes: `health:summary:read`, `health:metrics:read`, `health:sleep:read`,\n`health:workouts:read`, `health:nutrition:read`, `health:glucose:read`,\n`health:labs:read`, `health:dna:read`, `health:export:read`.\n\nAll list endpoints paginate with an opaque `cursor`; time ranges use ISO-8601\n`from`/`to`; timestamps are UTC unless a `tz` is supplied.\n","version":"0.1.0"},"paths":{"/api/sync/pull":{"get":{"tags":["sync"],"summary":"Pull Changes","description":"WatermelonDB sync pull endpoint.\nReturns changes for each table since last_pulled_at. A grantee \"viewing as\"\nan owner pulls the *owner's* data.","operationId":"pull_changes_api_sync_pull_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"last_pulled_at","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Pulled At"}},{"name":"identity_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Identity Version"}},{"name":"schema_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schema Version"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Pull Changes Api Sync Pull Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sync/push":{"post":{"tags":["sync"],"summary":"Push Changes","description":"Apply a WatermelonDB push atomically within the authenticated account.","operationId":"push_changes_api_sync_push_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"identity_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Identity Version"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Changes"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Push Changes Api Sync Push Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["auth"],"summary":"Delete Me","description":"Permanently delete the current user's account and all associated data.\n\nRequired by the App Store Review Guidelines (5.1.1(v)) for any app that\nsupports account creation. Deletes every row keyed by user_id across all\ntables, then the user record itself.\n\nA background worker (e.g. an in-flight export job) can INSERT a new\n`user_id`-keyed row between the sweep and the commit; that surfaces as a\nforeign-key violation at commit time, which previously left the whole\naccount behind. Retry the sweep a few times so a concurrent write is\ncaught and removed instead of aborting the deletion.","operationId":"delete_me_api_auth_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["auth"],"summary":"Update Me","operationId":"update_me_api_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/web/login":{"post":{"tags":["auth"],"summary":"Web Login","operationId":"web_login_api_auth_web_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/email/start":{"post":{"tags":["auth"],"summary":"Email Code Start","description":"Email a sign-in code. Always answers ``{\"ok\": true}`` for a well-formed\naddress, whether or not an account exists (no account enumeration).\n429 past 5 codes/hour per address or 20/hour per IP.","operationId":"email_code_start_api_auth_email_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeStartIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeStartOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/email/verify":{"post":{"tags":["auth"],"summary":"Email Code Verify","description":"Exchange an emailed code for a bearer token (native app). Creates the\naccount on first sign-in (``is_new_user: true``). 400 wrong/expired/used\ncode; 429 after 5 wrong guesses on one code (\"request a new code\").","operationId":"email_code_verify_api_auth_email_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeTokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/web/email/verify":{"post":{"tags":["auth"],"summary":"Web Email Code Verify","description":"Web twin of /email/verify: sets the HttpOnly session cookie instead of\nreturning a token.","operationId":"web_email_code_verify_api_auth_web_email_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeWebSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/web/session":{"get":{"tags":["auth"],"summary":"Web Session","operationId":"web_session_api_auth_web_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSessionOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/web/logout":{"post":{"tags":["auth"],"summary":"Web Logout","operationId":"web_logout_api_auth_web_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/sessions/revoke-all":{"post":{"tags":["auth"],"summary":"Sign Out Everywhere","description":"Sign out everywhere (AC-6): bump the session epoch so every JWT and\ncookie minted before now is rejected on its next request.","operationId":"sign_out_everywhere_api_auth_sessions_revoke_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/sessions":{"get":{"tags":["auth"],"summary":"List Sessions","operationId":"list_sessions_api_auth_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/sessions/{sid}/revoke":{"post":{"tags":["auth"],"summary":"Revoke Session","operationId":"revoke_session_api_auth_sessions__sid__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/profile-photo":{"post":{"tags":["auth"],"summary":"Upload Profile Photo","operationId":"upload_profile_photo_api_auth_profile_photo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_profile_photo_api_auth_profile_photo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/apple":{"post":{"tags":["auth"],"summary":"Apple Login","operationId":"apple_login_api_auth_apple_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppleLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/web/apple":{"post":{"tags":["auth"],"summary":"Web Apple Login","operationId":"web_apple_login_api_auth_web_apple_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppleLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/share":{"post":{"tags":["auth"],"summary":"Share Data","description":"Create a pending, read-only access grant (plan §4). The invitee keeps\ntheir own account; nothing is shared until they accept.","operationId":"share_data_api_auth_share_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDataIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/grants":{"get":{"tags":["auth"],"summary":"List Grants","operationId":"list_grants_api_auth_grants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/grants/{grant_id}/accept":{"post":{"tags":["auth"],"summary":"Accept Grant","operationId":"accept_grant_api_auth_grants__grant_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/grants/{grant_id}/revoke":{"post":{"tags":["auth"],"summary":"Revoke Grant","operationId":"revoke_grant_api_auth_grants__grant_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/newsletter/subscribe":{"post":{"tags":["newsletter"],"summary":"Subscribe","operationId":"subscribe_api_newsletter_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsletterSubscribeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/newsletter/subscribers":{"get":{"tags":["newsletter"],"summary":"List Subscribers","description":"Admin endpoint — returns all newsletter subscribers.","operationId":"list_subscribers_api_newsletter_subscribers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/privacy/requests":{"post":{"tags":["privacy"],"summary":"Create Privacy Request","description":"Log a privacy request, alert the team, and acknowledge it by email.","operationId":"create_privacy_request_api_privacy_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivacyRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Always returns 200 so callers cannot enumerate registered emails.\nSends a reset link if the email is known. Rate-limited per address and per\nIP whether or not the address exists (so a 429 reveals nothing either).","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/glucose/process-sibionics":{"post":{"tags":["glucose"],"summary":"Process Sibionics Payload","operationId":"process_sibionics_payload_api_glucose_process_sibionics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SibionicsPayloadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SibionicsPayloadOut"},"type":"array","title":"Response Process Sibionics Payload Api Glucose Process Sibionics Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/glucose/sibionics/rebuild-from-raw":{"post":{"tags":["glucose"],"summary":"Sibionics Rebuild From Raw","description":"Developer/admin recovery: wipe backend glucose for this sensor and replay raw_sensor_data through JNI (same as Juggluco pipeline).","operationId":"sibionics_rebuild_from_raw_api_glucose_sibionics_rebuild_from_raw_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SibionicsRebuildFromRawIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SibionicsRebuildFromRawOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/glucose/readings":{"post":{"tags":["glucose"],"summary":"Create Reading","operationId":"create_reading_api_glucose_readings_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlucoseReadingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlucoseReadingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["glucose"],"summary":"List Readings","operationId":"list_readings_api_glucose_readings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since_hours","in":"query","required":false,"schema":{"type":"integer","maximum":43800,"minimum":1,"default":24,"title":"Since Hours"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":1,"default":500,"title":"Limit"}},{"name":"sensor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Id"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GlucoseReadingOut"},"title":"Response List Readings Api Glucose Readings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["glucose"],"summary":"Delete All Readings","operationId":"delete_all_readings_api_glucose_readings_delete","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/glucose/readings/batch":{"post":{"tags":["glucose"],"summary":"Create Readings Batch","operationId":"create_readings_batch_api_glucose_readings_batch_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GlucoseReadingIn"},"type":"array","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"integer","title":"Response Create Readings Batch Api Glucose Readings Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/glucose/raw/batch":{"post":{"tags":["glucose"],"summary":"Create Raw Readings Batch","operationId":"create_raw_readings_batch_api_glucose_raw_batch_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RawSensorDataIn"},"type":"array","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"integer","title":"Response Create Raw Readings Batch Api Glucose Raw Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/glucose/trends":{"get":{"tags":["glucose"],"summary":"Trends","operationId":"trends_api_glucose_trends_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since_hours","in":"query","required":false,"schema":{"type":"integer","maximum":43800,"minimum":1,"default":6,"title":"Since Hours"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meals/daily_nutrition":{"get":{"tags":["meals"],"summary":"Get Daily Nutrition","operationId":"get_daily_nutrition_api_meals_daily_nutrition_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_ms","in":"query","required":true,"schema":{"type":"integer","title":"Start Ms"}},{"name":"end_ms","in":"query","required":true,"schema":{"type":"integer","title":"End Ms"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyNutritionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meals/all":{"delete":{"tags":["meals"],"summary":"Delete All Meals","operationId":"delete_all_meals_api_meals_all_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/meals/analyze":{"post":{"tags":["meals"],"summary":"Analyze Food","description":"Identify a meal from photo(s) and/or a description (Claude, app/services/meal_vision.py).\n\nRails, in order: input limits (422/413: at most meals_analyze_max_images\nphotos of meals_analyze_max_image_bytes each, description up to\nmeals_analyze_max_description_chars) → AI consent when\nAI_CONSENT_ENFORCED (403 {\"detail\": {\"code\": \"needs_consent\", \"kind\":\n\"meal_photo\"}}; given via POST /api/v1/consents/meal_photo) → per-user daily cap (429 rate_limited) and USD\nbudget (429 ai_budget_exhausted, with reset_at). Every call is recorded in\nthe ai_usage_ledger table. Fails with 502/504 rather than inventing a result.","operationId":"analyze_food_api_meals_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_food_api_meals_analyze_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/meals/suggest_name":{"post":{"tags":["meals"],"summary":"Suggest Meal Name","description":"A short AI dish name (\"Chicken Rice Bowl\") for a meal, from its food names.\n\nBody {\"items\": [{\"name\", \"grams\"?}] (1-30, names trimmed, <=120 chars),\n\"hour\"?: 0-23 local}. Answers {\"name\"}; nothing is stored — the client\nwrites it into the meal's synced meal_name column and falls back to its\nown name on any error. Same rails as /meals/analyze: 503 while\nMEAL_VISION_ENABLED is off, 403 needs_consent (kind meal_photo) when\nAI_CONSENT_ENFORCED, 429 rate_limited (meals_suggest_name_daily_cap) /\nai_budget_exhausted, 502 on model failure, 504 on timeout.","operationId":"suggest_meal_name_api_meals_suggest_name_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealNameSuggestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealNameSuggestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/meals/insight":{"post":{"tags":["meals"],"summary":"Meal Insight","description":"A plain-language read of one meal for the meal detail screen.\n\nBody {\"items\": [{\"name\", \"grams\"?}] (1-30), \"meal_id\"?, \"name\"?, \"hour\"?: 0-23\nlocal, \"totals\"?: {label: amount}, \"glucose\"?: {label: mg/dL}, \"lang\"?: en|ar}.\nAnswers {\"headline\", \"analysis\", \"suggestion\", \"tags\": [{\"label\", \"tone\"}],\n\"emoji\"}. Cached per account on everything the answer depends on, so a\nrepeat request (any device) is free: no ledger row, no model call. Same\nrails as /meals/suggest_name, with its own daily cap (meals_insight_daily_cap).","operationId":"meal_insight_api_meals_insight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealInsightIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealInsightOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/meals/emojis":{"post":{"tags":["meals"],"summary":"Meal Emojis","description":"One fitting emoji per dish name ({\"names\": [..1-40]} -> {\"emojis\": {name: emoji}}).\n\nEach name is cached per account, so only names never seen before cost a\n(single, batched) model call. Counts against meals_suggest_name_daily_cap.","operationId":"meal_emojis_api_meals_emojis_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealEmojisIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealEmojisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/meals/photo":{"post":{"tags":["meals"],"summary":"Create Meal With Photo","operationId":"create_meal_with_photo_api_meals_photo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_meal_with_photo_api_meals_photo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealLogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/meals":{"get":{"tags":["meals"],"summary":"List Meals","operationId":"list_meals_api_meals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"start_ms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Ms"}},{"name":"end_ms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Ms"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MealLogOut"},"title":"Response List Meals Api Meals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meals/{meal_id}":{"patch":{"tags":["meals"],"summary":"Update Meal","operationId":"update_meal_api_meals__meal_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"meal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealLogUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealLogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["meals"],"summary":"Delete Meal","operationId":"delete_meal_api_meals__meal_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"meal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/meals/{meal_id}/photo":{"post":{"tags":["meals"],"summary":"Upload Photo For Existing Meal","operationId":"upload_photo_for_existing_meal_api_meals__meal_id__photo_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"meal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meal Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_photo_for_existing_meal_api_meals__meal_id__photo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealLogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/foods/search":{"get":{"tags":["foods"],"summary":"Search Foods","description":"Search the food catalogue (USDA + CNF/CoFID/NEVO/AFCD) using Typesense.\n\nPublic: works without auth. When a valid user is present, ranking is\npersonalized (country / food_source_priority boost + recently-logged foods).","operationId":"search_foods_api_foods_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FoodSearchResult"},"title":"Response Search Foods Api Foods Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/foods/stats":{"get":{"tags":["foods"],"summary":"Get Food Stats","description":"Food catalogue coverage: total foods and per-source counts. Public.","operationId":"get_food_stats_api_foods_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Food Stats Api Foods Stats Get"}}}}}}},"/api/foods/recommendations":{"get":{"tags":["foods"],"summary":"Get Food Recommendations","description":"Get smart food recommendations based on user history, time of day, and global popularity.","operationId":"get_food_recommendations_api_foods_recommendations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FoodSearchResult"},"title":"Response Get Food Recommendations Api Foods Recommendations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/foods/barcode/{code}":{"get":{"tags":["foods"],"summary":"Search By Barcode","description":"Search for a food by barcode (GTIN/UPC).","operationId":"search_by_barcode_api_foods_barcode__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FoodSearchResult"},"title":"Response Search By Barcode Api Foods Barcode  Code  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/foods/core-bundle":{"get":{"tags":["foods"],"summary":"Get Core Food Bundle","description":"Everyday foods with full nutrients and portions, for instant and\noffline search on the device (see services/food_core_bundle.py). 503\nwhile the first build runs; the app tries again on a later launch.","operationId":"get_core_food_bundle_api_foods_core_bundle_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Core Food Bundle Api Foods Core Bundle Get"}}}}}}},"/api/foods/{fdc_id}/full-match":{"get":{"tags":["foods"],"summary":"Get Full Data Match","description":"For a product with label-only nutrition (most barcodes), the generic\nfood with full vitamin/mineral data that best matches it, so the app can\noffer to fill the missing nutrients from it as an estimate. `match` is\nnull when the product already has full data or nothing matches well.","operationId":"get_full_data_match_api_foods__fdc_id__full_match_get","parameters":[{"name":"fdc_id","in":"path","required":true,"schema":{"type":"string","title":"Fdc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Full Data Match Api Foods  Fdc Id  Full Match Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/foods/{fdc_id}":{"get":{"tags":["foods"],"summary":"Get Food Detail","description":"Get full details for a specific food, including all nutrients and portions.","operationId":"get_food_detail_api_foods__fdc_id__get","parameters":[{"name":"fdc_id","in":"path","required":true,"schema":{"type":"string","title":"Fdc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/insights/score":{"get":{"tags":["insights"],"summary":"Score","operationId":"score_api_insights_score_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/insights/suggestions":{"get":{"tags":["insights"],"summary":"Suggestions","operationId":"suggestions_api_insights_suggestions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionsOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/insights/predictive-alerts":{"get":{"tags":["insights"],"summary":"Predictive Alerts","operationId":"predictive_alerts_api_insights_predictive_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictiveAlertsOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/insights/cards":{"get":{"tags":["insights"],"summary":"Get Insight Cards","operationId":"get_insight_cards_api_insights_cards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InsightCardOut"},"type":"array","title":"Response Get Insight Cards Api Insights Cards Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/devices/token":{"post":{"tags":["devices"],"summary":"Upsert Device Token","operationId":"upsert_device_token_api_devices_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTokenIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/devices/sensor/unbind":{"post":{"tags":["devices"],"summary":"Unbind Sensor Session","operationId":"unbind_sensor_session_api_devices_sensor_unbind_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"serial_number","in":"query","required":true,"schema":{"type":"string","title":"Serial Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/sensor":{"post":{"tags":["devices"],"summary":"Upsert Sensor Session","operationId":"upsert_sensor_session_api_devices_sensor_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorSessionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/health/apple/import/batch":{"post":{"tags":["health"],"summary":"Apple Health Import Batch","description":"Import sleep and workout samples from Apple Health.","operationId":"apple_health_import_batch_api_health_apple_import_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSyncIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/health/sleep":{"get":{"tags":["health"],"summary":"Get Sleep Samples","description":"Get sleep samples for the last N days.","operationId":"get_sleep_samples_api_health_sleep_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SleepSampleOut"},"title":"Response Get Sleep Samples Api Health Sleep Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts":{"get":{"tags":["health"],"summary":"Get Workout Samples","description":"Get workout samples for the last N days.","operationId":"get_workout_samples_api_health_workouts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutSampleOut"},"title":"Response Get Workout Samples Api Health Workouts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/apple/import":{"post":{"tags":["health"],"summary":"Apple Health Import","description":"Point-in-time metrics from Apple Health (HRV, resting HR, steps, active\nenergy, body weight, respiratory rate, heart rate).\n\nSleep and workouts go to /apple/import/batch instead — they are intervals.\n\nIDEMPOTENT. The background sync re-uploads a rolling window on every run, so\nwithout this the same sample lands once per sync and every average computed\ndownstream is wrong. Dedupe is on (timestamp, metric_type, source), read in\none query over the batch's own time range rather than a query per sample.\n\nNot race-proof — two syncs overlapping in flight can both miss and both\ninsert. That needs a unique index on health_metrics, which needs a migration\nthat de-duplicates what is already in the table, so it is deliberately left\nfor that change rather than half-done here.","operationId":"apple_health_import_api_health_apple_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppleHealthImportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/health/metrics":{"get":{"tags":["health"],"summary":"Get Health Metrics","operationId":"get_health_metrics_api_health_metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"metric_type","in":"query","required":true,"schema":{"type":"string","title":"Metric Type"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HealthMetricOut"},"title":"Response Get Health Metrics Api Health Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/insight":{"post":{"tags":["health"],"summary":"Workout Insight","description":"A plain-language read of one workout for the workout detail screen.\n\nBody {\"activity\", \"workout_id\"?, \"hour\"?, \"stats\"?: {label: value},\n\"recent\"?: {label: value}, \"history\"?: {label: value} (this session vs\nearlier ones of the same kind), \"glucose\"?: {label: mg/dL}, \"lang\"?: en|ar};\nanswers like /meals/insight. Cached per account, same rails and daily cap\n(meals_insight_daily_cap, ledger feature workout_insight).","operationId":"workout_insight_api_health_workouts_insight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutInsightIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealInsightOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscriptions/create-subscription":{"post":{"tags":["subscriptions"],"summary":"Create Subscription","description":"Create a Stripe subscription and return the client secret for the PaymentSheet.","operationId":"create_subscription_api_subscriptions_create_subscription_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Subscription Api Subscriptions Create Subscription Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions/verify":{"post":{"tags":["subscriptions"],"summary":"Verify Subscription","description":"Verify the user's subscription status directly with Stripe.\nUseful for local development when webhooks might not be reachable.","operationId":"verify_subscription_api_subscriptions_verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Verify Subscription Api Subscriptions Verify Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscriptions/webhook":{"post":{"tags":["subscriptions"],"summary":"Stripe Webhook","description":"Stripe webhook to handle subscription events.","operationId":"stripe_webhook_api_subscriptions_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/waitlist/join":{"post":{"tags":["waitlist"],"summary":"Join Waitlist","operationId":"join_waitlist_api_waitlist_join_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinWaitlistIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/confirm":{"post":{"tags":["waitlist"],"summary":"Confirm Waitlist","operationId":"confirm_waitlist_api_waitlist_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmWaitlistIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/product-interests":{"get":{"tags":["product-interests"],"summary":"List Product Interests","operationId":"list_product_interests_api_product_interests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProductInterestOut"},"type":"array","title":"Response List Product Interests Api Product Interests Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["product-interests"],"summary":"Submit Product Interest","operationId":"submit_product_interest_api_product_interests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductInterestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductInterestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/stripe/setup-intent":{"post":{"tags":["stripe"],"summary":"Create Setup Intent","operationId":"create_setup_intent_api_stripe_setup_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupIntentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stripe/auth-intent":{"post":{"tags":["stripe"],"summary":"Create Auth Intent","operationId":"create_auth_intent_api_stripe_auth_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthIntentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stripe/cancel-intent":{"post":{"tags":["stripe"],"summary":"Cancel Intent","operationId":"cancel_intent_api_stripe_cancel_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelIntentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stripe/config":{"get":{"tags":["stripe"],"summary":"Get Stripe Config","description":"Expose the publishable key (safe to be public) + kit price so the landing\npage can initialize Stripe.js without storing any key of its own.","operationId":"get_stripe_config_api_stripe_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stripe/kit-intent":{"post":{"tags":["stripe"],"summary":"Create Kit Intent","description":"Create a PaymentIntent for the full, fully-refundable HealthOS kit price.\nUsed by the landing-page checkout — the secret key stays in this backend.","operationId":"create_kit_intent_api_stripe_kit_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitIntentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/qingping/link":{"post":{"tags":["qingping"],"summary":"Link Qingping Account","description":"Link the Qingping account to the user using Client Credentials.","operationId":"link_qingping_account_api_qingping_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/qingping/webhook":{"post":{"tags":["qingping"],"summary":"Qingping Webhook","description":"Receive real-time sensor data from Qingping Cloud Push.","operationId":"qingping_webhook_api_qingping_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/qingping/sync":{"get":{"tags":["qingping"],"summary":"Sync Qingping Data","description":"Fetch historical data for the user's devices and return it.","operationId":"sync_qingping_data_api_qingping_sync_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/auth/login":{"post":{"tags":["admin"],"summary":"Admin Login","description":"Admin sign-in for the panel.\n\nThis used to hand an admin token to anyone who knew an admin's email\naddress — the password was never checked (fixed 2026-09-17). It now\nverifies the hash, shares the login throttle with the app's own login\n(10 failures per IP+email per 15 minutes), and answers every failure the\nsame way so the endpoint can't be used to discover who is an admin.","operationId":"admin_login_api_admin_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Admin Login Api Admin Auth Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["admin"],"summary":"Admin Login Options","operationId":"admin_login_options_api_admin_auth_login_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/dashboard/stats":{"get":{"tags":["admin"],"summary":"Get Dashboard Stats","operationId":"get_dashboard_stats_api_admin_dashboard_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Dashboard Stats Api Admin Dashboard Stats Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/users":{"get":{"tags":["admin"],"summary":"Get Users","operationId":"get_users_api_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Users Api Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"Get User Detail","operationId":"get_user_detail_api_admin_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get User Detail Api Admin Users  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/glucose/aggregate":{"get":{"tags":["admin"],"summary":"Get Glucose Aggregate","operationId":"get_glucose_aggregate_api_admin_glucose_aggregate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Glucose Aggregate Api Admin Glucose Aggregate Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/sensors":{"get":{"tags":["admin"],"summary":"Get Sensors","operationId":"get_sensors_api_admin_sensors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Sensors Api Admin Sensors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/raw-sensor-data":{"get":{"tags":["admin"],"summary":"Get Raw Sensor Data","operationId":"get_raw_sensor_data_api_admin_raw_sensor_data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"sensor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":50000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Raw Sensor Data Api Admin Raw Sensor Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/insights":{"get":{"tags":["admin"],"summary":"Get Insights","operationId":"get_insights_api_admin_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Insights Api Admin Insights Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/insights/trigger/{user_id}":{"post":{"tags":["admin"],"summary":"Trigger Insights","operationId":"trigger_insights_api_admin_insights_trigger__user_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Trigger Insights Api Admin Insights Trigger  User Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/food":{"get":{"tags":["admin"],"summary":"Get Food","operationId":"get_food_api_admin_food_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Food Api Admin Food Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/events":{"get":{"tags":["admin"],"summary":"Get Events","operationId":"get_events_api_admin_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Events Api Admin Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/notifications":{"get":{"tags":["admin"],"summary":"Get Notifications","operationId":"get_notifications_api_admin_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Notifications Api Admin Notifications Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/notifications/send":{"post":{"tags":["admin"],"summary":"Send Notification","operationId":"send_notification_api_admin_notifications_send_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Send Notification Api Admin Notifications Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/system/status":{"get":{"tags":["admin"],"summary":"Get System Status","operationId":"get_system_status_api_admin_system_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get System Status Api Admin System Status Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/system/trigger-nightly":{"post":{"tags":["admin"],"summary":"Trigger Nightly","operationId":"trigger_nightly_api_admin_system_trigger_nightly_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Trigger Nightly Api Admin System Trigger Nightly Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/system/trigger-resync":{"post":{"tags":["admin"],"summary":"Trigger Resync","operationId":"trigger_resync_api_admin_system_trigger_resync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Trigger Resync Api Admin System Trigger Resync Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audio/upload":{"post":{"tags":["audio"],"summary":"Upload Audio Snippet","operationId":"upload_audio_snippet_api_audio_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_audio_snippet_api_audio_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audio/events/sync":{"post":{"tags":["audio"],"summary":"Sync Audio Events","operationId":"sync_audio_events_api_audio_events_sync_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":{"items":{"type":"object"},"type":"array"},"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/media/profile/{filename}":{"get":{"tags":["media"],"summary":"Profile Media","operationId":"profile_media_api_media_profile__filename__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/meals/{filename}":{"get":{"tags":["media"],"summary":"Meal Media","operationId":"meal_media_api_media_meals__filename__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/audio/{filename}":{"get":{"tags":["media"],"summary":"Audio Media","operationId":"audio_media_api_media_audio__filename__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sensors/status":{"get":{"tags":["sensors"],"summary":"Sensor Status","operationId":"sensor_status_api_sensors_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensorStatusOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/push/vapid-public-key":{"get":{"tags":["push"],"summary":"Vapid Public Key","operationId":"vapid_public_key_api_push_vapid_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Vapid Public Key Api Push Vapid Public Key Get"}}}}}}},"/api/push/subscribe":{"post":{"tags":["push"],"summary":"Subscribe","operationId":"subscribe_api_push_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Subscribe Api Push Subscribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/push/test":{"post":{"tags":["push"],"summary":"Test Push","operationId":"test_push_api_push_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Test Push Api Push Test Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/stripe/checkout-session":{"post":{"tags":["stripe"],"summary":"Create Checkout Session","description":"Create a hosted Stripe Checkout Session for the in-app founding kit.\n\nThe web client redirects to the returned `url`; Stripe hosts the payment page\nand sends the buyer back to `success_url` / `cancel_url`. No card data ever\ntouches our frontend or backend.","operationId":"create_checkout_session_api_stripe_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/blood/parse":{"post":{"tags":["blood"],"summary":"Parse Blood Report","description":"Extract biomarkers from an uploaded lab report (PDF or image). In-app.\n\nWith AI_CONSENT_ENFORCED: 403 {\"detail\": {\"code\": \"needs_consent\", \"kind\":\n\"blood_report\"}} until POST /api/v1/consents/blood_report.","operationId":"parse_blood_report_api_blood_parse_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_blood_report_api_blood_parse_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/blood/parse-public":{"post":{"tags":["blood"],"summary":"Parse Blood Report Public","description":"Unauthenticated variant powering the free interpreter at healthosx.com/blood.\n\nThe markers are parsed in memory and returned straight to the browser, which\nevaluates them client-side against the reference-range catalog. Nothing is\nstored unless the visitor ticked the optional consent (`keep_report`), in\nwhich case the file is kept for parser review for at most 12 months.\nRate limited per IP.","operationId":"parse_blood_report_public_api_blood_parse_public_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_blood_report_public_api_blood_parse_public_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blood/submissions":{"post":{"tags":["blood"],"summary":"Record Submission","description":"Count one pass through the free interpreter. Stores nothing about it.\n\nThe free tool used to keep each visitor's values, answers and email here.\nIt no longer does: health data from an anonymous web tool is not worth the\nliability, and the privacy policy promises we keep none of it. What remains\nis a bare \"someone used /blood\" event (marker count + country, no values,\nno email, no user agent) so the ops feed still shows usage.\n\nOld clients still post the full payload; it is accepted and discarded.\nAlways returns 200 with `recorded: false`.","operationId":"record_submission_api_blood_submissions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodSubmissionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["blood"],"summary":"List Submissions","description":"Most recent submissions, newest first — for reviewing demand and coverage.","operationId":"list_submissions_api_blood_submissions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blood/chat-public":{"post":{"tags":["blood"],"summary":"Blood Chat Public","description":"Answer a question about an already-interpreted report (healthosx.com/blood).\n\nStateless and unpersisted — the browser sends the evaluated context with each\nturn. See app/services/blood_chat.py for the safety posture on the prompt.","operationId":"blood_chat_public_api_blood_chat_public_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodChatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/upload-intent":{"post":{"tags":["genome"],"summary":"Record Upload Intent","description":"Notify when the browser begins reading DNA without uploading the file.\n\nThe main free reader is intentionally local-only. This endpoint receives\nsize and attribution only: never a filename, genotype, result, or file byte.","operationId":"record_upload_intent_api_genome_upload_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnaUploadIntentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/chat-public":{"post":{"tags":["genome"],"summary":"Dna Chat Public","description":"Answer a question about an already-interpreted genome (healthosx.com/dna).\n\nStateless and unpersisted — the browser sends its findings with each turn.\nNothing about the genome is written to disk or database here.","operationId":"dna_chat_public_api_genome_chat_public_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnaChatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/carrier/availability":{"get":{"tags":["genome"],"summary":"Carrier Availability","description":"Whether carrier screening can actually run here.\n\nSame contract as ancestry: the website checks before offering the upload, so\nnobody hands over a genome for work this server can't do.","operationId":"carrier_availability_api_genome_carrier_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/genome/ancestry/availability":{"get":{"tags":["genome"],"summary":"Ancestry Availability","description":"Whether ancestry analysis can actually run here.\n\nPublic on purpose: the website checks this before offering the upload at\nall, so nobody hands over a genome for an analysis this server can't\nperform. Reports the specific missing pieces rather than a bare false.","operationId":"ancestry_availability_api_genome_ancestry_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/genome/jobs":{"post":{"tags":["genome"],"summary":"Create Job","description":"Accept a genome for an analysis that can't run in the browser.\n\nThis is the ONE path where a genome leaves the user's device, and it happens\nonly when they explicitly consent to it on /dna — the trait report never\ntouches this endpoint. The file is streamed to disk rather than buffered,\nand kept with the result, as the visitor agreed, until they delete it.","operationId":"create_job_api_genome_jobs_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_job_api_genome_jobs_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/jobs/{token}":{"delete":{"tags":["genome"],"summary":"Delete Job","description":"Delete an ancestry/carrier job's data: the kept marker extract and the result.\n\nCalled by \"Delete my DNA data\" on /dna. The token is the only credential,\nas for polling. The row stays as status \"deleted\" (no genetic data left on\nit) so the deletion itself is on record.","operationId":"delete_job_api_genome_jobs__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["genome"],"summary":"Job Status","description":"Poll a job. The token is the only credential — nothing else is needed.","operationId":"job_status_api_genome_jobs__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/conversations":{"post":{"tags":["genome"],"summary":"Create Conversation","operationId":"create_conversation_api_genome_ask_conversations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskConversationIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/turn":{"post":{"tags":["genome"],"summary":"Turn","operationId":"turn_api_genome_ask_turn_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskTurnIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/turn/stream":{"post":{"tags":["genome"],"summary":"Turn Stream","description":"The same turn as server-sent events: a `tool` event as each tool starts and\nfinishes, then `done` (the answer) or `error`.\n\nComment lines keep the connection alive while the model thinks, so a long\nturn never trips Cloudflare's 100-second idle cut-off. If the reader closes\nthe tab mid-turn the work still finishes and is saved with the chat.","operationId":"turn_stream_api_genome_ask_turn_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskTurnIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/feedback":{"post":{"tags":["genome"],"summary":"Feedback","operationId":"feedback_api_genome_ask_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskFeedbackIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/checkout":{"post":{"tags":["genome"],"summary":"Create Checkout","description":"Create a hosted Stripe Checkout session for a $1 top-up.\n\nOnly for a saved chat: the reader is signed in with their email code and\nthe conversation is saved to that email. So the credit lands on an address\nthey have proven they own, and Stripe's return — /dna?resume=1 — reopens\nthe saved chat even if the page was left. No card data ever touches us; the\nwebhook (app/api/routes/subscriptions.py) credits the pool.","operationId":"create_checkout_api_genome_ask_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskCheckoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/claim":{"post":{"tags":["genome"],"summary":"Claim","description":"Save the chat so it can be resumed later, behind a password.\n\nStores the (consented) answer sheet and a password hash. The reader resumes\nwith email + password + a one-time key emailed to them.","operationId":"claim_api_genome_ask_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskClaimIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/save":{"post":{"tags":["genome"],"summary":"Save Conversation","description":"Save the chat to the signed-in reader's email — no password.\n\nThe session cookie (from the email code) proves the inbox; the conversation\ntoken proves the chat. The verified email replaces whatever was typed at the\nreport gate, so the chat, its stored DNA and its message pool all hang off\nan address the reader has shown they own.","operationId":"save_conversation_api_genome_ask_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskSaveIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/resume/request":{"post":{"tags":["genome"],"summary":"Resume Request","description":"Verify email + password and email a one-time key to finish the resume.","operationId":"resume_request_api_genome_ask_resume_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResumeRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/resume":{"post":{"tags":["genome"],"summary":"Resume","description":"Complete the resume: email + password + one-time key → conversation.","operationId":"resume_api_genome_ask_resume_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResumeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/login/request":{"post":{"tags":["genome"],"summary":"Login Request","description":"Email a 6-digit code. Always answers ok, so it never reveals which emails have chats.","operationId":"login_request_api_genome_ask_login_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/login/verify":{"post":{"tags":["genome"],"summary":"Login Verify","operationId":"login_verify_api_genome_ask_login_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/ask/logout":{"post":{"tags":["genome"],"summary":"Logout","operationId":"logout_api_genome_ask_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/genome/ask/me":{"get":{"tags":["genome"],"summary":"Me","operationId":"me_api_genome_ask_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/genome/ask/conversations/{token}":{"get":{"tags":["genome"],"summary":"Open Conversation","description":"Reopen one of the signed-in reader's chats: its sheet, history and stored genome.","operationId":"open_conversation_api_genome_ask_conversations__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["genome"],"summary":"Delete Conversation","operationId":"delete_conversation_api_genome_ask_conversations__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/store/availability":{"get":{"tags":["genome"],"summary":"Availability","description":"Whether storing is switched on here. The website checks this before offering it.","operationId":"availability_api_genome_store_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/genome/store/match":{"post":{"tags":["genome"],"summary":"Match","description":"Is this exact file already stored? Then the reader never uploads it twice.\n\nThe fingerprint is a SHA-256 of the file (for a large one, of its size and\nsixteen 1 MB samples), computed in the browser. Presenting it proves the\ncaller holds the same file, so the genome it names reveals nothing new.","operationId":"match_api_genome_store_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreMatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/store/start":{"post":{"tags":["genome"],"summary":"Start","operationId":"start_api_genome_store_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreStartIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/store/{token}/chunk/{index}":{"post":{"tags":["genome"],"summary":"Chunk","operationId":"chunk_api_genome_store__token__chunk__index__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/store/{token}/finish":{"post":{"tags":["genome"],"summary":"Finish","operationId":"finish_api_genome_store__token__finish_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/genome/store/{token}":{"get":{"tags":["genome"],"summary":"Status","operationId":"status_api_genome_store__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["genome"],"summary":"Delete","description":"Delete the file, its results, any relatives' files and the linked chat's messages.","operationId":"delete_api_genome_store__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events/":{"post":{"tags":["events"],"summary":"Record Events","description":"Record a batch of anonymous product events.\n\nAlways answers 200. These arrive by `navigator.sendBeacon`, which discards\nthe response, and analytics must never be able to break or slow a page —\nso every failure here is swallowed and counted rather than raised.","operationId":"record_events_api_events__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events":{"post":{"tags":["events"],"summary":"Record Events","description":"Record a batch of anonymous product events.\n\nAlways answers 200. These arrive by `navigator.sendBeacon`, which discards\nthe response, and analytics must never be able to break or slow a page —\nso every failure here is swallowed and counted rather than raised.","operationId":"record_events_api_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingest/app-usage":{"post":{"tags":["ingest"],"summary":"Ingest App Usage","operationId":"ingest_app_usage_api_ingest_app_usage_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/AppUsageIn"},"type":"array"},{"$ref":"#/components/schemas/AppUsageIn"}],"title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/dns":{"post":{"tags":["ingest"],"summary":"Ingest Dns","operationId":"ingest_dns_api_ingest_dns_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/DnsIn"},"type":"array"},{"$ref":"#/components/schemas/DnsIn"}],"title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/browsing":{"post":{"tags":["ingest"],"summary":"Ingest Browsing","operationId":"ingest_browsing_api_ingest_browsing_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/BrowsingIn"},"type":"array"},{"$ref":"#/components/schemas/BrowsingIn"}],"title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/time":{"post":{"tags":["ingest"],"summary":"Ingest Time","operationId":"ingest_time_api_ingest_time_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/TimeIn"},"type":"array"},{"$ref":"#/components/schemas/TimeIn"}],"title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/nutrition":{"post":{"tags":["ingest"],"summary":"Ingest Nutrition","operationId":"ingest_nutrition_api_ingest_nutrition_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/NutritionIn"},"type":"array"},{"$ref":"#/components/schemas/NutritionIn"}],"title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/documents":{"post":{"tags":["ingest"],"summary":"Ingest Documents","operationId":"ingest_documents_api_ingest_documents_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentIn"},"type":"array"},{"$ref":"#/components/schemas/DocumentIn"}],"title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/search/setup":{"post":{"tags":["ingest"],"summary":"Setup Search Collections","description":"Creates the Typesense collections if they are missing.\n\nCalled from startup too; exposed so a fresh Typesense instance can be\nprepared without a redeploy. Safe to call repeatedly — an existing\ncollection is never touched.","operationId":"setup_search_collections_api_ingest_search_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ingest/search":{"get":{"tags":["ingest"],"summary":"Search Archive","operationId":"search_archive_api_ingest_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection","in":"query","required":true,"schema":{"type":"string","title":"Collection"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"filter_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter By"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/goals":{"get":{"tags":["goals"],"summary":"Get Goals","operationId":"get_goals_api_goals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["goals"],"summary":"Set Goal","description":"Sets a user-defined target, replacing the derived one for that metric.\n\nAlways marks the row user-defined: recalculation must never overwrite a\nnumber somebody typed.","operationId":"set_goal_api_goals_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalOverrideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/goals/{metric}":{"delete":{"tags":["goals"],"summary":"Clear Goal","description":"Drops an override, returning the metric to its derived target.","operationId":"clear_goal_api_goals__metric__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"metric","in":"path","required":true,"schema":{"type":"string","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/goals/progress":{"get":{"tags":["goals"],"summary":"Get Progress","description":"Today's intake as a percentage of each target.\n\nSums every nutrition row for the day. Multiple sources for one day are\nsummed only when `source` is not given — and since Apple Health and a food\ntracker usually both describe the SAME meals, that double-counts. The\nresponse therefore names the sources it used, and `source=apple_health`\npins it to one.","operationId":"get_progress_api_goals_progress_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/imports/batches":{"post":{"tags":["health-imports"],"summary":"Submit Batch","operationId":"submit_batch_api_v1_health_imports_batches_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/health/imports/batches/{batch_id}":{"get":{"tags":["health-imports"],"summary":"Batch Status","operationId":"batch_status_api_v1_health_imports_batches__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/imports/sources":{"get":{"tags":["health-imports"],"summary":"List Sources","description":"Source status for the future sync-status screens: who is sending, when\nthey last landed a batch, and how much has arrived.","operationId":"list_sources_api_v1_health_imports_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tokens":{"get":{"tags":["api-tokens"],"summary":"List Tokens","operationId":"list_tokens_api_v1_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["api-tokens"],"summary":"Create Token","operationId":"create_token_api_v1_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tokens/{token_id}":{"delete":{"tags":["api-tokens"],"summary":"Revoke Token","operationId":"revoke_token_api_v1_tokens__token_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/projections/run":{"post":{"tags":["health-api"],"summary":"Run Projections","description":"Backfill: (re-)project the user's whole canonical archive. Idempotent.","operationId":"run_projections_api_v1_health_projections_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/health/coverage":{"get":{"tags":["health-api"],"summary":"Coverage","description":"Per-family counts and date range for the \"All health data\" screen.","operationId":"coverage_api_v1_health_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/health/samples":{"get":{"tags":["health-api"],"summary":"List Samples","operationId":"list_samples_api_v1_health_samples_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"registry_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registry Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/events":{"get":{"tags":["health-api"],"summary":"List Events","operationId":"list_events_api_v1_health_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/catalog":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Supported Apple Health types","description":"Every Apple Health type the platform recognises, as metadata.\n\nThis is not user data — it is the registry surface (identifier, kind,\ncanonical unit, category, coverage status) an agent needs to know what it\ncan ask for. No health values are returned here.","operationId":"type_catalog_api_v1_health_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/health/metrics":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Projected metric series","operationId":"list_metrics_api_v1_health_metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"metric_type","in":"query","required":true,"schema":{"type":"string","description":"e.g. \"heart_rate\", \"steps\", \"active_energy\"","title":"Metric Type"},"description":"e.g. \"heart_rate\", \"steps\", \"active_energy\""},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 start (inclusive)","title":"From"},"description":"ISO-8601 start (inclusive)"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 end (exclusive)","title":"To"},"description":"ISO-8601 end (exclusive)"},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"IANA zone for bare dates","title":"Tz"},"description":"IANA zone for bare dates"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/sleep":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Projected sleep stages","operationId":"list_sleep_api_v1_health_sleep_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/workouts":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Projected workouts","operationId":"list_workouts_api_v1_health_workouts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/samples":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Canonical samples","operationId":"archive_samples_api_v1_health_archive_samples_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"registry_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to one family","title":"Registry Id"},"description":"Restrict to one family"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/events":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Canonical category events","operationId":"archive_events_api_v1_health_archive_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"registry_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registry Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/workouts":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Canonical workouts","operationId":"archive_workouts_api_v1_health_archive_workouts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/workout-series":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Canonical workout series","operationId":"archive_workout_series_api_v1_health_archive_workout_series_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/routes":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Canonical workout routes","operationId":"archive_routes_api_v1_health_archive_routes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/ecg":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Canonical ECG records","operationId":"archive_ecg_api_v1_health_archive_ecg_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/archive/coverage":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Per-family coverage","description":"Per-family counts and date range — lets an agent discover what exists.","operationId":"coverage_api_v1_health_archive_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/health/summary":{"get":{"tags":["health-read-api","health-read-api"],"summary":"One-day summary","description":"Aggregates for one day: activity, vitals, sleep and workouts.","operationId":"daily_summary_api_v1_health_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (in `tz`, default profile timezone)","title":"Date"},"description":"YYYY-MM-DD (in `tz`, default profile timezone)"},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/summary/range":{"get":{"tags":["health-read-api","health-read-api"],"summary":"Summary over a date range","description":"One summary object per local day, inclusive, oldest first.","operationId":"daily_summary_range_api_v1_health_summary_range_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD start","title":"From"},"description":"YYYY-MM-DD start"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD end (inclusive)","title":"To"},"description":"YYYY-MM-DD end (inclusive)"},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/export/jobs":{"get":{"tags":["health-export","health-export"],"summary":"List export jobs","operationId":"list_export_jobs_api_v1_export_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["health-export","health-export"],"summary":"Create an export job","operationId":"create_export_job_api_v1_export_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/export/jobs/{job_id}":{"get":{"tags":["health-export","health-export"],"summary":"Export job status","operationId":"get_export_job_api_v1_export_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/export/jobs/{job_id}/download":{"get":{"tags":["health-export","health-export"],"summary":"Download a finished export","operationId":"download_export_api_v1_export_jobs__job_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/records/{table}":{"get":{"tags":["records-api","records-api"],"summary":"Synced table records","operationId":"list_records_api_v1_records__table__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nutrition/meals":{"get":{"tags":["curated-api","nutrition-api"],"summary":"Meals with nutrient totals","operationId":"list_nutrition_meals_api_v1_nutrition_meals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["writes","writes"],"summary":"Create a meal","operationId":"create_meal_api_v1_nutrition_meals_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nutrition/daily":{"get":{"tags":["curated-api","nutrition-api"],"summary":"Per-day nutrient totals","operationId":"nutrition_daily_api_v1_nutrition_daily_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (inclusive, in `tz`)","title":"From"},"description":"YYYY-MM-DD (inclusive, in `tz`)"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (exclusive, in `tz`)","title":"To"},"description":"YYYY-MM-DD (exclusive, in `tz`)"},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/glucose/readings":{"get":{"tags":["curated-api","glucose-api"],"summary":"Glucose readings","operationId":"list_glucose_readings_api_v1_glucose_readings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"units","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'user' for the profile unit","title":"Units"},"description":"'user' for the profile unit"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/labs/reports":{"get":{"tags":["curated-api","labs-api"],"summary":"Blood lab reports","operationId":"list_lab_reports_api_v1_labs_reports_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["writes","writes"],"summary":"Create a blood lab report","operationId":"create_lab_report_api_v1_labs_reports_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scores":{"get":{"tags":["scores-api","scores-api"],"summary":"Server-computed derived scores","operationId":"list_scores_api_v1_scores_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Score kind: nutrition, sleep (one row per night), activity (one row per calendar day) or recovery (one row per wake day)","default":"nutrition","title":"Kind"},"description":"Score kind: nutrition, sleep (one row per night), activity (one row per calendar day) or recovery (one row per wake day)"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (inclusive)","title":"From"},"description":"YYYY-MM-DD (inclusive)"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (exclusive)","title":"To"},"description":"YYYY-MM-DD (exclusive)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scores":{"get":{"tags":["scores"],"summary":"My server-computed scores","operationId":"my_scores_api_scores_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","description":"nutrition, sleep, activity or recovery","title":"Kind"},"description":"nutrition, sleep, activity or recovery"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (inclusive)","title":"From"},"description":"YYYY-MM-DD (inclusive)"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD (exclusive)","title":"To"},"description":"YYYY-MM-DD (exclusive)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":400,"minimum":1,"default":120,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/changes":{"get":{"tags":["changes-api","changes-api"],"summary":"Sync change feed","operationId":"list_changes_api_v1_changes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"integer","description":"Return changes with revision > since","default":0,"title":"Since"},"description":"Return changes with revision > since"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks":{"get":{"tags":["webhooks","webhooks"],"summary":"List webhooks","operationId":"list_webhooks_api_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["webhooks","webhooks"],"summary":"Create a webhook","operationId":"create_webhook_api_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks","webhooks"],"summary":"Delete a webhook","operationId":"delete_webhook_api_v1_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nutrition/meals/{meal_id}":{"delete":{"tags":["writes","writes"],"summary":"Delete a meal and its items","description":"Naturally idempotent, so no Idempotency-Key: a repeat is a 404. The ORM\ndelete writes sync tombstones, so the meal also disappears on the phone.","operationId":"delete_meal_api_v1_nutrition_meals__meal_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"meal_id","in":"path","required":true,"schema":{"type":"string","title":"Meal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/logs/weight":{"post":{"tags":["writes","writes"],"summary":"Log a weight measurement","operationId":"create_weight_api_v1_logs_weight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/logs/medications":{"post":{"tags":["writes","writes"],"summary":"Log a medication dose","operationId":"create_medication_api_v1_logs_medications_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/logs/hydration":{"post":{"tags":["writes","writes"],"summary":"Log a hydration entry","operationId":"create_hydration_api_v1_logs_hydration_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HydrationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/logs/nicotine":{"post":{"tags":["writes","writes"],"summary":"Log a nicotine event","operationId":"create_nicotine_api_v1_logs_nicotine_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicotineCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/logs/custom-metrics":{"post":{"tags":["writes","writes"],"summary":"Log a custom metric (e.g. blood pressure)","operationId":"create_custom_metric_api_v1_logs_custom_metrics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMetricCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/logs/sleep-factors":{"post":{"tags":["writes","writes"],"summary":"Log a sleep factor","operationId":"create_sleep_factor_api_v1_logs_sleep_factors_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SleepFactorCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/logs/{kind}/{entry_id}":{"patch":{"tags":["writes","writes"],"summary":"Edit a manual log entry (weight, medications, hydration, nicotine, custom-metrics, sleep-factors)","operationId":"update_log_api_v1_logs__kind___entry_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["writes","writes"],"summary":"Delete a manual log entry (weight, medications, hydration, nicotine, custom-metrics, sleep-factors)","operationId":"delete_log_api_v1_logs__kind___entry_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/profile":{"get":{"tags":["profile-api","profile-api"],"summary":"Read own profile","operationId":"get_profile_api_v1_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["profile-api","profile-api"],"summary":"Update own profile","operationId":"update_profile_api_v1_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/profile/photo":{"post":{"tags":["profile-api","profile-api"],"summary":"Upload profile photo","operationId":"upload_profile_photo_api_v1_profile_photo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_profile_photo_api_v1_profile_photo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sessions":{"get":{"tags":["profile-api","account-api"],"summary":"List active sessions","operationId":"list_sessions_api_v1_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sessions/revoke-all":{"post":{"tags":["profile-api","account-api"],"summary":"Sign out everywhere","operationId":"sign_out_everywhere_api_v1_sessions_revoke_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sessions/{sid}/revoke":{"post":{"tags":["profile-api","account-api"],"summary":"Revoke one session","operationId":"revoke_session_api_v1_sessions__sid__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/account":{"delete":{"tags":["profile-api","account-api"],"summary":"Delete own account","operationId":"delete_account_api_v1_account_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/goals":{"get":{"tags":["goals-api","goals-api"],"summary":"Read goals (derived + overrides)","operationId":"get_goals_api_v1_goals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["goals-api","goals-api"],"summary":"Set a goal override","operationId":"set_goal_api_v1_goals_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalOverrideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/goals/{metric}":{"delete":{"tags":["goals-api","goals-api"],"summary":"Clear a goal override","operationId":"clear_goal_api_v1_goals__metric__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"metric","in":"path","required":true,"schema":{"type":"string","title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/goals/progress":{"get":{"tags":["goals-api","goals-api"],"summary":"Today's progress against goals","operationId":"get_progress_api_v1_goals_progress_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/media/{kind}/{filename}":{"get":{"tags":["media-api","media-api"],"summary":"Serve own media","operationId":"serve_media_api_v1_media__kind___filename__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/media/meals/{meal_id}":{"post":{"tags":["media-api","media-api"],"summary":"Attach photo to a meal","operationId":"attach_meal_photo_api_v1_media_meals__meal_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"meal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Meal Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_attach_meal_photo_api_v1_media_meals__meal_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscription":{"get":{"tags":["subscription-api","subscription-api"],"summary":"Read subscription status","operationId":"get_subscription_api_v1_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/subscription/checkout":{"post":{"tags":["subscription-api","subscription-api"],"summary":"Start a subscription checkout","operationId":"create_checkout_api_v1_subscription_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orders/catalog":{"get":{"tags":["product-orders"],"summary":"Catalog","operationId":"catalog_api_v1_orders_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CatalogItem"},"type":"array","title":"Response Catalog Api V1 Orders Catalog Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orders":{"get":{"tags":["product-orders"],"summary":"List Orders","operationId":"list_orders_api_v1_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrderOut"},"type":"array","title":"Response List Orders Api V1 Orders Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orders/payment-intent":{"post":{"tags":["product-orders"],"summary":"Create Payment Intent","operationId":"create_payment_intent_api_v1_orders_payment_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orders/{order_id}":{"get":{"tags":["product-orders"],"summary":"Get Order","operationId":"get_order_api_v1_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orders/{order_id}/confirm":{"post":{"tags":["product-orders"],"summary":"Confirm Order","operationId":"confirm_order_api_v1_orders__order_id__confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orders/{order_id}/fulfillment":{"patch":{"tags":["product-orders"],"summary":"Update Fulfillment","description":"Update customer-visible delivery or partner-booking progress.","operationId":"update_fulfillment_api_v1_orders__order_id__fulfillment_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback":{"get":{"tags":["feedback"],"summary":"List Feedback","description":"Admin: recent bug reports and feedback, newest first.","operationId":"list_feedback_api_v1_feedback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array","title":"Response List Feedback Api V1 Feedback Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Capture a bug report or piece of feedback. Works anonymous or signed-in.","operationId":"submit_feedback_api_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__feedback__FeedbackIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Submit Feedback Api V1 Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/api/mcp":{"post":{"tags":["mcp","mcp"],"summary":"Remote MCP (JSON-RPC over HTTP)","operationId":"mcp_api_api_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dna/keys":{"post":{"tags":["dna-api"],"summary":"Create a DNA API key","operationId":"create_key_api_v1_dna_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreateIn"}}},"required":true},"responses":{"201":{"description":"The key, shown once","content":{"application/json":{"schema":{},"example":{"key":"dna_…shown once","prefix":"dna_…","credits":0,"analysis_cents":100}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dna/keys/me":{"get":{"tags":["dna-api"],"summary":"Show a key's balance","operationId":"key_info_api_v1_dna_keys_me_get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{},"example":{"prefix":"dna_…","name":"my-agent","credits":2,"analyses_used":1,"created_at":"2026-09-17T12:00:00+00:00"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["dna-api"],"summary":"Revoke the caller's key","operationId":"revoke_key_api_v1_dna_keys_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dna/fund":{"post":{"tags":["dna-api"],"summary":"Start a Stripe checkout to fund the key","description":"Create a hosted Stripe Checkout to top up this key. No card data touches us.","operationId":"fund_api_v1_dna_fund_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundIn"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{},"example":{"url":"https://checkout.stripe.com/c/pay/…","credits":1,"amount_cents":100}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dna/analyze":{"post":{"tags":["dna-api"],"summary":"Upload a genome and start a full analysis","description":"Upload a raw genome in one multipart request, spend a credit, and run the\nfull analysis. Files over Cloudflare's ~100MB body cap must use the chunked\nendpoints (/analyze/start → /analyze/{token}/chunk/{index} → /analyze/{token}/finish).","operationId":"analyze_api_v1_dna_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_api_v1_dna_analyze_post"}}},"required":true},"responses":{"200":{"description":"Accepted; poll GET /analyze/{token}","content":{"application/json":{"schema":{},"example":{"token":"3Qd…unguessable","status":"processing","credits_remaining":2}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dna/analyze/start":{"post":{"tags":["dna-api"],"summary":"Start a chunked upload","description":"Begin a chunked upload for files too large for one request. Spends a credit\nand returns the analysis token; upload 32MB chunks, then call /finish.","operationId":"analyze_start_api_v1_dna_analyze_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeStartIn"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{},"example":{"token":"3Qd…unguessable","chunk_bytes":33554432}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/dna/analyze/{token}/chunk/{index}":{"post":{"tags":["dna-api"],"summary":"Upload one chunk","operationId":"analyze_chunk_api_v1_dna_analyze__token__chunk__index__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dna/analyze/{token}/finish":{"post":{"tags":["dna-api"],"summary":"Finish a chunked upload and run the analysis","operationId":"analyze_finish_api_v1_dna_analyze__token__finish_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dna/analyze/{token}":{"get":{"tags":["dna-api"],"summary":"Poll an analysis for its full report","description":"Poll an analysis. The token is the only credential. `report` appears when ready.","operationId":"analysis_status_api_v1_dna_analyze__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"status uploading | processing | ready | failed","content":{"application/json":{"schema":{},"example":{"token":"3Qd…unguessable","status":"ready","report":{"file":{"kind":"vcf","vendor":"23andMe","build":"GRCh37","rows":596744},"apoe":{"available":true,"genotype":"ε3/ε4","e4_copies":1},"report":{"traits":[{"trait":"Eye colour","result":{"call":"Brown likely","confidence":"moderate"}}],"health_markers":[],"pharmacogenomics":[]},"maternal_line":{"haplogroup":"U2e1a1"},"paternal_line":{"haplogroup":"J-Y5321","known_as":"J-P58"},"carrier":{"findings":[]},"ancestry":{"status":"ready","proportions":[{"region":"Levant","proportion":0.27}]},"polygenic":{"available":true},"capabilities":{}},"chat":{"questions_used":0,"questions_remaining":5},"expires_at":"2026-10-17T12:00:00+00:00"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dna-api"],"summary":"Delete an analysis, its results and chat","description":"Delete the file, its results and the linked chat — the right to erasure.","operationId":"delete_analysis_api_v1_dna_analyze__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dna/analyze/{token}/messages":{"post":{"tags":["dna-api"],"summary":"Buy five more chat questions on an analysis","description":"Spend one credit for `dna_api_chat_messages_per_credit` more questions on\nthis analysis — the API's version of the $1 top-up in the browser.","operationId":"buy_messages_api_v1_dna_analyze__token__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{},"example":{"questions_remaining":5,"credits_remaining":1}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dna/analyze/{token}/chat":{"post":{"tags":["dna-api"],"summary":"Ask a question about an analysis","operationId":"chat_turn_api_v1_dna_analyze__token__chat_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTurnIn"}}}},"responses":{"200":{"description":"The answer; 402 needs_messages when the included questions are used","content":{"application/json":{"schema":{},"example":{"message_id":12,"text":"You carry APOE ε3/ε4 — one copy of ε4. …","status":"answered","steps":[{"name":"get_apoe","label":"Reading your APOE genotype","status":"done"}],"questions_remaining":4}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["dna-api"],"summary":"Read an analysis' chat history","operationId":"chat_history_api_v1_dna_analyze__token__chat_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assistant/consent":{"get":{"tags":["assistant","assistant"],"summary":"Read the assistant consent","operationId":"read_consent_api_v1_assistant_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["assistant","assistant"],"summary":"Consent to sending health data to the AI model","operationId":"give_consent_api_v1_assistant_consent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["assistant","assistant"],"summary":"Withdraw the assistant consent","operationId":"withdraw_consent_api_v1_assistant_consent_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/assistant/conversations":{"get":{"tags":["assistant","assistant"],"summary":"List assistant conversations","operationId":"list_conversations_api_v1_assistant_conversations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["assistant","assistant"],"summary":"Start an assistant conversation","operationId":"create_conversation_api_v1_assistant_conversations_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConversationIn"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/assistant/conversations/{conversation_id}":{"get":{"tags":["assistant","assistant"],"summary":"Read one assistant conversation","operationId":"read_conversation_api_v1_assistant_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assistant","assistant"],"summary":"Delete an assistant conversation","operationId":"delete_conversation_api_v1_assistant_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assistant/uploads":{"get":{"tags":["assistant","assistant"],"summary":"List assistant uploads","operationId":"list_uploads_api_v1_assistant_uploads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["assistant","assistant"],"summary":"Upload a file for the assistant","operationId":"upload_file_api_v1_assistant_uploads_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_assistant_uploads_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/assistant/uploads/{upload_id}":{"delete":{"tags":["assistant","assistant"],"summary":"Delete an assistant upload","operationId":"delete_upload_api_v1_assistant_uploads__upload_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assistant/conversations/{conversation_id}/turn":{"post":{"tags":["assistant","assistant"],"summary":"Ask the assistant (JSON)","operationId":"turn_api_v1_assistant_conversations__conversation_id__turn_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assistant/conversations/{conversation_id}/turn/stream":{"post":{"tags":["assistant","assistant"],"summary":"Ask the assistant (server-sent events)","description":"The same turn as server-sent events: a `tool` event as each tool starts and\nfinishes, then `done` (the answer) or `error` — the /genome/ask/turn/stream\nformat. `: keep-alive` comments every 15 s keep proxies from cutting a long\nturn; a client that disconnects mid-turn still gets the answer saved.","operationId":"turn_stream_api_v1_assistant_conversations__conversation_id__turn_stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consents/{kind}":{"post":{"tags":["consents","consents"],"summary":"Consent to sending this feature's data to the AI model","operationId":"give_consent_api_v1_consents__kind__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["consents","consents"],"summary":"Read a feature's AI consent","operationId":"read_consent_api_v1_consents__kind__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["consents","consents"],"summary":"Withdraw a feature's AI consent","operationId":"withdraw_consent_api_v1_consents__kind__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights":{"get":{"tags":["discovery","discovery"],"summary":"Published insight cards","operationId":"list_insights_api_v1_insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shelf","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"finding|hunch|trend|anomaly|knowledge","title":"Shelf"},"description":"finding|hunch|trend|anomaly|knowledge"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO instant; cards generated after","title":"Since"},"description":"ISO instant; cards generated after"},{"name":"include_dismissed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Dismissed"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/digest/today":{"get":{"tags":["discovery","discovery"],"summary":"Today's morning digest","operationId":"digest_today_api_v1_insights_digest_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/insights/{insight_id}":{"get":{"tags":["discovery","discovery"],"summary":"One insight with evidence and test history","operationId":"get_insight_api_v1_insights__insight_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"insight_id","in":"path","required":true,"schema":{"type":"string","title":"Insight Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/{insight_id}/feedback":{"post":{"tags":["discovery","discovery"],"summary":"Feedback on an insight","operationId":"insight_feedback_api_v1_insights__insight_id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"insight_id","in":"path","required":true,"schema":{"type":"string","title":"Insight Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__discovery_api__FeedbackIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/{insight_id}/dismiss":{"post":{"tags":["discovery","discovery"],"summary":"Hide an insight","operationId":"dismiss_insight_api_v1_insights__insight_id__dismiss_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"insight_id","in":"path","required":true,"schema":{"type":"string","title":"Insight Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/discovery/signals":{"get":{"tags":["discovery","discovery"],"summary":"Signal vocabulary","operationId":"list_signals_api_v1_discovery_signals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"active","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/discovery/hypotheses":{"get":{"tags":["discovery","discovery"],"summary":"Hypotheses the engine tracks","operationId":"list_hypotheses_api_v1_discovery_hypotheses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/discovery/observations":{"get":{"tags":["discovery","discovery"],"summary":"Observations with no other home","operationId":"list_observations_api_v1_discovery_observations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signal"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["discovery","discovery"],"summary":"Log or confirm an observation","operationId":"upsert_observation_api_v1_discovery_observations_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/discovery/observations/{obs_id}":{"delete":{"tags":["discovery","discovery"],"summary":"Delete one observation","operationId":"delete_observation_api_v1_discovery_observations__obs_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"obs_id","in":"path","required":true,"schema":{"type":"string","title":"Obs Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/discovery/run":{"post":{"tags":["discovery","discovery"],"summary":"Queue a discovery run now","operationId":"queue_run_api_v1_discovery_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/discovery/knowledge-pass":{"post":{"tags":["discovery","discovery"],"summary":"Queue a Tier D knowledge pass","operationId":"queue_knowledge_api_v1_discovery_knowledge_pass_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/discovery/explore":{"post":{"tags":["discovery","discovery"],"summary":"Queue an open Opus exploration of your data (Tier C)","operationId":"queue_explore_api_v1_discovery_explore_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/discovery/budget":{"get":{"tags":["discovery","discovery"],"summary":"This month's LLM spend against the $10 cap","operationId":"budget_api_v1_discovery_budget_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/experiments":{"get":{"tags":["discovery","discovery"],"summary":"Self-experiments","operationId":"list_experiments_api_v1_experiments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["discovery","discovery"],"summary":"Propose a self-experiment","operationId":"create_experiment_api_v1_experiments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/experiments/{exp_id}/{action}":{"post":{"tags":["discovery","discovery"],"summary":"Start or stop a self-experiment","operationId":"experiment_action_api_v1_experiments__exp_id___action__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exp_id","in":"path","required":true,"schema":{"type":"string","title":"Exp Id"}},{"name":"action","in":"path","required":true,"schema":{"enum":["start","stop"],"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory":{"get":{"tags":["discovery","discovery"],"summary":"What HealthOS knows about you","operationId":"list_memory_api_v1_memory_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/memory/{key}":{"put":{"tags":["discovery","discovery"],"summary":"Set a memory fact","operationId":"put_memory_api_v1_memory__key__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["discovery","discovery"],"summary":"Forget a memory fact","operationId":"delete_memory_api_v1_memory__key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{upload_id}/facts":{"get":{"tags":["discovery","discovery"],"summary":"Facts extracted from an uploaded document","operationId":"document_facts_api_v1_documents__upload_id__facts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/facts/{fact_id}":{"delete":{"tags":["discovery","discovery"],"summary":"Delete one extracted document fact","operationId":"delete_document_fact_api_v1_documents_facts__fact_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/location":{"post":{"tags":["discovery","discovery"],"summary":"Coarse location samples (phone only)","operationId":"post_location_api_v1_location_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationBatchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/community/circles":{"get":{"tags":["community"],"summary":"My circles and what each member shares","operationId":"list_circles_api_v1_community_circles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["community"],"summary":"Create a circle","operationId":"create_circle_api_v1_community_circles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CircleIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/community/circles/{circle_id}":{"get":{"tags":["community"],"summary":"One circle","operationId":"get_circle_api_v1_community_circles__circle_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["community"],"summary":"Rename a circle (owner)","operationId":"rename_circle_api_v1_community_circles__circle_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/me":{"patch":{"tags":["community"],"summary":"What I share with this circle","operationId":"update_my_sharing_api_v1_community_circles__circle_id__me_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/members/{member_user_id}/full":{"get":{"tags":["community"],"summary":"Everything a member lets you see (full view; never DNA)","operationId":"member_full_view_api_v1_community_circles__circle_id__members__member_user_id__full_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"integer","title":"Member User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/leave":{"post":{"tags":["community"],"summary":"Leave a circle","operationId":"leave_circle_api_v1_community_circles__circle_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/members/{member_user_id}":{"delete":{"tags":["community"],"summary":"Remove a member (owner)","operationId":"remove_member_api_v1_community_circles__circle_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"integer","title":"Member User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/invite/rotate":{"post":{"tags":["community"],"summary":"Replace the invite link (owner)","operationId":"rotate_invite_api_v1_community_circles__circle_id__invite_rotate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/challenge":{"put":{"tags":["community"],"summary":"Set the circle's challenge","operationId":"set_challenge_api_v1_community_circles__circle_id__challenge_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__community_api__ChallengeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["community"],"summary":"End the circle's challenge","operationId":"clear_challenge_api_v1_community_circles__circle_id__challenge_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/invites/{code}":{"get":{"tags":["community"],"summary":"Invite preview (public, no health data)","operationId":"preview_invite_api_v1_community_invites__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/invites/{code}/join":{"post":{"tags":["community"],"summary":"Join a circle from its invite link","operationId":"join_circle_api_v1_community_invites__code__join_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/circles/{circle_id}/nudges":{"post":{"tags":["community"],"summary":"Nudge or cheer a member","operationId":"send_nudge_api_v1_community_circles__circle_id__nudges_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"circle_id","in":"path","required":true,"schema":{"type":"integer","title":"Circle Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NudgeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/nudges":{"get":{"tags":["community"],"summary":"Nudges and cheers sent to me","operationId":"list_nudges_api_v1_community_nudges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unseen","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unseen"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/community/nudges/seen":{"post":{"tags":["community"],"summary":"Mark my nudges as seen","operationId":"mark_seen_api_v1_community_nudges_seen_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications":{"get":{"tags":["notifications"],"summary":"My notification inbox","operationId":"inbox_api_v1_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/read":{"post":{"tags":["notifications"],"summary":"Mark notifications as read (all when no ids)","operationId":"mark_read_api_v1_notifications_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/{notification_id}/opened":{"post":{"tags":["notifications"],"summary":"A push was tapped","operationId":"opened_api_v1_notifications__notification_id__opened_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"integer","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/prefs":{"get":{"tags":["notifications"],"summary":"My notification settings","operationId":"get_prefs_api_v1_notifications_prefs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["notifications"],"summary":"Change my notification settings","operationId":"put_prefs_api_v1_notifications_prefs_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/tones":{"get":{"tags":["notifications"],"summary":"Example lines for each tone","operationId":"tones_api_v1_notifications_tones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","maxLength":5,"default":"en","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/test":{"post":{"tags":["notifications"],"summary":"Send me a test push in my tone","operationId":"send_test_api_v1_notifications_test_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/challenges":{"get":{"tags":["challenges"],"summary":"My challenges","operationId":"list_challenges_api_v1_challenges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["challenges"],"summary":"Challenge friends","operationId":"create_api_v1_challenges_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__challenges_api__ChallengeIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/challenges/friends":{"get":{"tags":["challenges"],"summary":"People I can challenge","operationId":"friends_api_v1_challenges_friends_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/challenges/{challenge_id}":{"get":{"tags":["challenges"],"summary":"One challenge","operationId":"get_one_api_v1_challenges__challenge_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"challenge_id","in":"path","required":true,"schema":{"type":"integer","title":"Challenge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/challenges/{challenge_id}/accept":{"post":{"tags":["challenges"],"summary":"Accept a challenge","operationId":"accept_api_v1_challenges__challenge_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"challenge_id","in":"path","required":true,"schema":{"type":"integer","title":"Challenge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/challenges/{challenge_id}/decline":{"post":{"tags":["challenges"],"summary":"Decline a challenge","operationId":"decline_api_v1_challenges__challenge_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"challenge_id","in":"path","required":true,"schema":{"type":"integer","title":"Challenge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/challenges/{challenge_id}/cancel":{"post":{"tags":["challenges"],"summary":"Call off a challenge I started","operationId":"cancel_api_v1_challenges__challenge_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"challenge_id","in":"path","required":true,"schema":{"type":"integer","title":"Challenge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/challenges/{challenge_id}/checkin":{"post":{"tags":["challenges"],"summary":"I did it today (honour system)","operationId":"checkin_api_v1_challenges__challenge_id__checkin_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"challenge_id","in":"path","required":true,"schema":{"type":"integer","title":"Challenge Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/database/tables":{"get":{"tags":["admin-database"],"summary":"Get Tables","description":"Get a list of all tables in the database.","operationId":"get_tables_api_admin_database_tables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Tables Api Admin Database Tables Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/database/tables/{table_name}/schema":{"get":{"tags":["admin-database"],"summary":"Get Table Schema","description":"Get the schema for a specific table.","operationId":"get_table_schema_api_admin_database_tables__table_name__schema_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Get Table Schema Api Admin Database Tables  Table Name  Schema Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/database/tables/{table_name}/data":{"get":{"tags":["admin-database"],"summary":"Get Table Data","description":"Get data from a specific table.","operationId":"get_table_data_api_admin_database_tables__table_name__data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Table Data Api Admin Database Tables  Table Name  Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-database"],"summary":"Insert Table Data","description":"Insert a new row into a specific table.","operationId":"insert_table_data_api_admin_database_tables__table_name__data_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Insert Table Data Api Admin Database Tables  Table Name  Data Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-database"],"summary":"Update Table Data","description":"Update an existing row in a specific table.","operationId":"update_table_data_api_admin_database_tables__table_name__data_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_table_data_api_admin_database_tables__table_name__data_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Update Table Data Api Admin Database Tables  Table Name  Data Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-database"],"summary":"Delete Table Data","description":"Delete a row from a specific table.","operationId":"delete_table_data_api_admin_database_tables__table_name__data_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_table_data_api_admin_database_tables__table_name__data_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Table Data Api Admin Database Tables  Table Name  Data Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/answer-map":{"get":{"tags":["admin-answer-map"],"summary":"Get Map","operationId":"get_map_api_admin_answer_map_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Map Api Admin Answer Map Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/answer-map/questions/{question_id}/answers":{"get":{"tags":["admin-answer-map"],"summary":"Get Answers","operationId":"get_answers_api_admin_answer_map_questions__question_id__answers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Answers Api Admin Answer Map Questions  Question Id  Answers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/answer-map/questions":{"post":{"tags":["admin-answer-map"],"summary":"Add Question","operationId":"add_question_api_admin_answer_map_questions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Add Question Api Admin Answer Map Questions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/answer-map/questions/{question_id}":{"patch":{"tags":["admin-answer-map"],"summary":"Edit Question","operationId":"edit_question_api_admin_answer_map_questions__question_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Edit Question Api Admin Answer Map Questions  Question Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/answer-map/runs":{"post":{"tags":["admin-answer-map"],"summary":"Request Run","operationId":"request_run_api_admin_answer_map_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Request Run Api Admin Answer Map Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/answer-map/runs/{run_id}/cancel":{"post":{"tags":["admin-answer-map"],"summary":"Cancel Run","operationId":"cancel_run_api_admin_answer_map_runs__run_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Cancel Run Api Admin Answer Map Runs  Run Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bundle/download":{"get":{"tags":["bundle"],"summary":"Download Food Bundle","description":"Download the bundled food database for offline search.\nThe bundle is generated based on user's country, timezone, etc.\nFor now, it serves the pre-generated core_foods.sqlite.","operationId":"download_food_bundle_api_bundle_download_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AnalyzeStartIn":{"properties":{"bytes":{"type":"integer","maximum":6442450944.0,"exclusiveMinimum":0.0,"title":"Bytes"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"}},"type":"object","required":["bytes"],"title":"AnalyzeStartIn"},"AppUsageIn":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"device":{"type":"string","title":"Device"},"app":{"type":"string","title":"App"},"window_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Title"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},"type":"object","required":["device","app","start"],"title":"AppUsageIn"},"AppleHealthImportIn":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/HealthMetricItem"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"AppleHealthImportIn","description":"Contract for Apple Health import.\nAccepts a list of health metrics to be stored."},"AppleLoginIn":{"properties":{"identity_token":{"type":"string","title":"Identity Token"},"user_identifier":{"type":"string","title":"User Identifier"},"authorization_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Code"}},"type":"object","required":["identity_token","user_identifier"],"title":"AppleLoginIn"},"AskCheckoutIn":{"properties":{"conversation":{"type":"string","title":"Conversation"}},"type":"object","required":["conversation"],"title":"AskCheckoutIn"},"AskClaimIn":{"properties":{"conversation":{"type":"string","title":"Conversation"},"password":{"type":"string","maxLength":128,"minLength":4,"title":"Password"},"sheet":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Sheet"}},"type":"object","required":["conversation","password"],"title":"AskClaimIn"},"AskConversationIn":{"properties":{"consent":{"type":"boolean","title":"Consent","default":false},"consent_version":{"type":"string","title":"Consent Version","default":"1"},"genome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genome"},"from_conversation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Conversation"},"locale":{"type":"string","title":"Locale","default":"en"},"is_sample":{"type":"boolean","title":"Is Sample","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"site_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Session Id"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"landing_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landing Path"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"}},"type":"object","title":"AskConversationIn"},"AskFeedbackIn":{"properties":{"conversation":{"type":"string","title":"Conversation"},"message_id":{"type":"integer","title":"Message Id"},"rating":{"type":"integer","maximum":1.0,"minimum":-1.0,"title":"Rating"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["conversation","message_id","rating"],"title":"AskFeedbackIn"},"AskResumeIn":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"otp":{"type":"string","title":"Otp"}},"type":"object","required":["email","password","otp"],"title":"AskResumeIn"},"AskResumeRequestIn":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"AskResumeRequestIn"},"AskSaveIn":{"properties":{"conversation":{"type":"string","title":"Conversation"},"sheet":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Sheet"}},"type":"object","required":["conversation"],"title":"AskSaveIn"},"AskTurnIn":{"properties":{"conversation":{"type":"string","title":"Conversation"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"sheet":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Sheet"},"locale":{"type":"string","title":"Locale","default":"en"}},"type":"object","required":["conversation"],"title":"AskTurnIn"},"AuthIntentIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"AuthIntentIn"},"BatchSyncIn":{"properties":{"sleep_samples":{"items":{"$ref":"#/components/schemas/SleepSampleCreate"},"type":"array","title":"Sleep Samples","default":[]},"workout_samples":{"items":{"$ref":"#/components/schemas/WorkoutSampleCreate"},"type":"array","title":"Workout Samples","default":[]}},"type":"object","title":"BatchSyncIn"},"BloodChatIn":{"properties":{"message":{"type":"string","maxLength":1500,"minLength":1,"title":"Message"},"context":{"type":"object","title":"Context"},"history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"History"},"locale":{"type":"string","title":"Locale","default":"en"}},"type":"object","required":["message"],"title":"BloodChatIn"},"BloodSubmissionIn":{"properties":{"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age"},"fasting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fasting"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"markers":{"items":{"$ref":"#/components/schemas/SubmissionMarker"},"type":"array","title":"Markers"},"dropped":{"items":{"$ref":"#/components/schemas/SubmissionDropped"},"type":"array","title":"Dropped"},"report_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"report_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Token"},"is_sample":{"type":"boolean","title":"Is Sample","default":false}},"type":"object","title":"BloodSubmissionIn"},"Body_analyze_api_v1_dna_analyze_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_analyze_api_v1_dna_analyze_post"},"Body_analyze_food_api_meals_analyze_post":{"properties":{"photos":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Photos"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Body_analyze_food_api_meals_analyze_post"},"Body_attach_meal_photo_api_v1_media_meals__meal_id__post":{"properties":{"photo":{"type":"string","format":"binary","title":"Photo"}},"type":"object","required":["photo"],"title":"Body_attach_meal_photo_api_v1_media_meals__meal_id__post"},"Body_create_job_api_genome_jobs_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"kind":{"type":"string","title":"Kind","default":"ancestry"},"source_kind":{"type":"string","title":"Source Kind","default":"array"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"landing_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landing Path"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"consent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent"}},"type":"object","required":["file"],"title":"Body_create_job_api_genome_jobs_post"},"Body_create_meal_with_photo_api_meals_photo_post":{"properties":{"started_at_ms":{"type":"integer","title":"Started At Ms"},"ended_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ended At Ms"},"meal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"additional_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Notes"},"meal_order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Order"},"meal_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Meal Score"},"items":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items"},"photos":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Photos"}},"type":"object","required":["started_at_ms"],"title":"Body_create_meal_with_photo_api_meals_photo_post"},"Body_delete_table_data_api_admin_database_tables__table_name__data_delete":{"properties":{"primary_keys":{"type":"object","title":"Primary Keys"}},"type":"object","required":["primary_keys"],"title":"Body_delete_table_data_api_admin_database_tables__table_name__data_delete"},"Body_parse_blood_report_api_blood_parse_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"supported_markers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supported Markers"}},"type":"object","required":["file"],"title":"Body_parse_blood_report_api_blood_parse_post"},"Body_parse_blood_report_public_api_blood_parse_public_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"supported_markers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supported Markers"},"keep_report":{"type":"boolean","title":"Keep Report","default":false}},"type":"object","required":["file"],"title":"Body_parse_blood_report_public_api_blood_parse_public_post"},"Body_update_table_data_api_admin_database_tables__table_name__data_put":{"properties":{"data":{"type":"object","title":"Data"},"primary_keys":{"type":"object","title":"Primary Keys"}},"type":"object","required":["data","primary_keys"],"title":"Body_update_table_data_api_admin_database_tables__table_name__data_put"},"Body_upload_audio_snippet_api_audio_upload_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"},"timestamp_ms":{"type":"integer","title":"Timestamp Ms"},"duration":{"type":"number","title":"Duration"},"event_type":{"type":"string","title":"Event Type","default":"unknown"},"local_confidence":{"type":"number","title":"Local Confidence","default":0.0},"peak_amplitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Peak Amplitude"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"sample_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Id"}},"type":"object","required":["audio","timestamp_ms","duration"],"title":"Body_upload_audio_snippet_api_audio_upload_post"},"Body_upload_file_api_v1_assistant_uploads_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_api_v1_assistant_uploads_post"},"Body_upload_photo_for_existing_meal_api_meals__meal_id__photo_post":{"properties":{"photos":{"items":{"type":"string","format":"binary"},"type":"array","title":"Photos"}},"type":"object","required":["photos"],"title":"Body_upload_photo_for_existing_meal_api_meals__meal_id__photo_post"},"Body_upload_profile_photo_api_auth_profile_photo_post":{"properties":{"photo":{"type":"string","format":"binary","title":"Photo"}},"type":"object","required":["photo"],"title":"Body_upload_profile_photo_api_auth_profile_photo_post"},"Body_upload_profile_photo_api_v1_profile_photo_post":{"properties":{"photo":{"type":"string","format":"binary","title":"Photo"}},"type":"object","required":["photo"],"title":"Body_upload_profile_photo_api_v1_profile_photo_post"},"BrowsingIn":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"ts":{"type":"string","format":"date-time","title":"Ts"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"}},"type":"object","required":["ts","url"],"title":"BrowsingIn"},"CancelIntentIn":{"properties":{"intent_id":{"type":"string","title":"Intent Id"}},"type":"object","required":["intent_id"],"title":"CancelIntentIn"},"CatalogItem":{"properties":{"product":{"type":"string","enum":["cgm","scale","blood_pressure","environment","blood_test","dna_test"],"title":"Product"},"name":{"type":"string","title":"Name"},"configured":{"type":"boolean","title":"Configured"},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["product","name","configured"],"title":"CatalogItem"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatTurnIn":{"properties":{"message":{"type":"string","maxLength":1000,"title":"Message"},"locale":{"type":"string","title":"Locale","default":"en"}},"type":"object","required":["message"],"title":"ChatTurnIn"},"CheckoutIn":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"CheckoutIn"},"CheckoutSessionIn":{"properties":{"answers":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Answers"}},"type":"object","title":"CheckoutSessionIn"},"CircleIn":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"kind":{"type":"string","enum":["duo","group","family"],"title":"Kind","default":"group"},"share_streak":{"type":"boolean","title":"Share Streak","default":true},"share_rings":{"items":{"type":"string","enum":["activity","nutrition","recovery","glucose","sleep","blood_pressure"]},"type":"array","title":"Share Rings"}},"type":"object","required":["name"],"title":"CircleIn"},"ConfirmWaitlistIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"tier":{"type":"string","title":"Tier"},"frustration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frustration"}},"type":"object","required":["email","tier"],"title":"ConfirmWaitlistIn"},"ConsentIn":{"properties":{"version":{"type":"string","maxLength":16,"minLength":1,"title":"Version"}},"type":"object","required":["version"],"title":"ConsentIn"},"ConversationIn":{"properties":{},"type":"object","title":"ConversationIn"},"CreateOrderIn":{"properties":{"address_line1":{"type":"string","maxLength":255,"minLength":1,"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"city":{"type":"string","maxLength":120,"minLength":1,"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"client_request_id":{"type":"string","maxLength":64,"minLength":8,"title":"Client Request Id"},"product":{"type":"string","enum":["cgm","scale","blood_pressure","environment","blood_test","dna_test"],"title":"Product"},"recipient_name":{"type":"string","maxLength":160,"minLength":1,"title":"Recipient Name"},"phone":{"type":"string","maxLength":40,"minLength":6,"title":"Phone"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"booking_instructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Booking Instructions"}},"type":"object","required":["address_line1","city","country","client_request_id","product","recipient_name","phone","email"],"title":"CreateOrderIn"},"CustomMetricCreate":{"properties":{"timestamp_ms":{"type":"integer","title":"Timestamp Ms"},"metric_key":{"type":"string","maxLength":255,"minLength":1,"title":"Metric Key"},"value":{"type":"object","title":"Value"}},"type":"object","required":["timestamp_ms","metric_key","value"],"title":"CustomMetricCreate"},"DailyNutritionOut":{"properties":{"energy":{"type":"object","title":"Energy"},"macros":{"type":"object","title":"Macros"},"highlighted":{"items":{"type":"object"},"type":"array","title":"Highlighted"},"categories":{"items":{"type":"object"},"type":"array","title":"Categories"}},"type":"object","required":["energy","macros","highlighted","categories"],"title":"DailyNutritionOut"},"DeviceTokenIn":{"properties":{"platform":{"type":"string","pattern":"^(ios|android|web)$","title":"Platform"},"token":{"type":"string","maxLength":512,"minLength":10,"title":"Token"}},"type":"object","required":["platform","token"],"title":"DeviceTokenIn"},"DnaChatIn":{"properties":{"message":{"type":"string","title":"Message"},"context":{"type":"object","title":"Context"},"history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"History"},"locale":{"type":"string","title":"Locale","default":"en"}},"type":"object","required":["message"],"title":"DnaChatIn"},"DnaUploadIntentIn":{"properties":{"file_bytes":{"type":"integer","maximum":6442450944.0,"minimum":1.0,"title":"File Bytes"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale"},"referrer":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Referrer"},"landing_path":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Landing Path"},"utm_source":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Utm Campaign"}},"type":"object","required":["file_bytes"],"title":"DnaUploadIntentIn","description":"Privacy-safe signal that a real file was selected in the local reader."},"DnsIn":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"ts":{"type":"string","format":"date-time","title":"Ts"},"domain":{"type":"string","title":"Domain"},"device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"},"blocked":{"type":"boolean","title":"Blocked","default":false}},"type":"object","required":["ts","domain"],"title":"DnsIn"},"DocumentIn":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body","default":""},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"ts":{"type":"string","format":"date-time","title":"Ts"}},"type":"object","required":["title","ts"],"title":"DocumentIn","description":"Notion pages and daily reviews.\n\nSearch-only: the body text goes to Typesense and nothing else. There is no\nPostgres table behind it because the system of record is Notion itself —\nwhich does mean a dropped Typesense index has to be rebuilt from there\nrather than from us."},"EmailCodeStartIn":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"}},"type":"object","required":["email"],"title":"EmailCodeStartIn"},"EmailCodeStartOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"EmailCodeStartOut"},"EmailCodeTokenOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"is_new_user":{"type":"boolean","title":"Is New User"}},"type":"object","required":["access_token","is_new_user"],"title":"EmailCodeTokenOut","description":"POST /auth/email/verify: a bearer token, plus whether this sign-in\ncreated the account (the app then starts onboarding)."},"EmailCodeVerifyIn":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"code":{"type":"string","maxLength":32,"title":"Code"}},"type":"object","required":["email","code"],"title":"EmailCodeVerifyIn"},"EmailCodeWebSessionOut":{"properties":{"user_id":{"type":"integer","title":"User Id"},"effective_user_id":{"type":"integer","title":"Effective User Id"},"is_new_user":{"type":"boolean","title":"Is New User"}},"type":"object","required":["user_id","effective_user_id","is_new_user"],"title":"EmailCodeWebSessionOut","description":"POST /auth/web/email/verify: the cookie session, plus is_new_user."},"EventBatchIn":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"events":{"items":{"$ref":"#/components/schemas/EventIn"},"type":"array","title":"Events"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"landing_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landing Path"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"}},"type":"object","title":"EventBatchIn"},"EventIn":{"properties":{"event":{"type":"string","title":"Event"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"props":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Props"}},"type":"object","required":["event"],"title":"EventIn"},"ExperimentIn":{"properties":{"hypothesis_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis Id"},"insight_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insight Id"},"variable":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Variable"},"target":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Target"},"change":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Change"},"days":{"type":"integer","maximum":60.0,"minimum":6.0,"title":"Days","default":14}},"type":"object","title":"ExperimentIn"},"ExportCreate":{"properties":{"format":{"type":"string","title":"Format","description":"json | csv | gpx | zip"},"registry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registry Id","description":"Restrict to one family (NULL = every family)"},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},"type":"object","required":["format"],"title":"ExportCreate"},"FoodDetail":{"properties":{"fdc_id":{"type":"string","title":"Fdc Id"},"description":{"type":"string","title":"Description"},"brand_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Name"},"ingredients":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredients"},"serving_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Serving Size"},"serving_size_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serving Size Unit"},"portions":{"items":{"$ref":"#/components/schemas/FoodPortion"},"type":"array","title":"Portions","default":[]},"nutrients":{"items":{"$ref":"#/components/schemas/FoodNutrient"},"type":"array","title":"Nutrients","default":[]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"nutrition_per_100g":{"additionalProperties":{"type":"number"},"type":"object","title":"Nutrition Per 100G","default":{}}},"type":"object","required":["fdc_id","description"],"title":"FoodDetail"},"FoodNutrient":{"properties":{"name":{"type":"string","title":"Name"},"amount":{"type":"number","title":"Amount"},"unit_name":{"type":"string","title":"Unit Name"}},"type":"object","required":["name","amount","unit_name"],"title":"FoodNutrient"},"FoodPortion":{"properties":{"modifier":{"type":"string","title":"Modifier"},"gram_weight":{"type":"number","title":"Gram Weight"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["modifier","gram_weight"],"title":"FoodPortion"},"FoodSearchResult":{"properties":{"fdc_id":{"type":"string","title":"Fdc Id"},"description":{"type":"string","title":"Description"},"brand_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Name"},"serving_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Serving Size"},"serving_size_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serving Size Unit"},"calories":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calories"},"protein":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Protein"},"carbs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carbs"},"fat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fat"},"portions":{"items":{"$ref":"#/components/schemas/FoodPortion"},"type":"array","title":"Portions","default":[]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["fdc_id","description"],"title":"FoodSearchResult"},"ForgotPasswordIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordIn"},"FulfillmentUpdateIn":{"properties":{"fulfillment_status":{"type":"string","enum":["order_received","processing","booking_requested","booking_confirmed","shipped","sample_collected","results_ready","delivered","canceled"],"title":"Fulfillment Status"},"carrier":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Tracking Url"},"partner_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Name"},"estimated_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Delivery At"},"shipped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"appointment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment At"}},"type":"object","required":["fulfillment_status"],"title":"FulfillmentUpdateIn"},"FundIn":{"properties":{"credits":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Credits"}},"type":"object","title":"FundIn"},"GlucoseReadingIn":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"glucose_value":{"type":"number","exclusiveMaximum":1000.0,"minimum":0.0,"title":"Glucose Value"},"sensor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Id"},"trend":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trend"},"error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Error Code"},"latest_hardware_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Hardware Idx"}},"type":"object","required":["timestamp","glucose_value"],"title":"GlucoseReadingIn"},"GlucoseReadingOut":{"properties":{"reading_id":{"type":"integer","title":"Reading Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"glucose_value":{"type":"number","title":"Glucose Value"},"sensor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Id"},"trend":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trend"},"error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Error Code"},"latest_hardware_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Hardware Idx"}},"type":"object","required":["reading_id","timestamp","glucose_value"],"title":"GlucoseReadingOut"},"GoalOverrideIn":{"properties":{"metric":{"type":"string","title":"Metric"},"target":{"type":"number","title":"Target"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"target_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Min"},"target_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Max"}},"type":"object","required":["metric","target"],"title":"GoalOverrideIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthMetricItem":{"properties":{"metric":{"type":"string","title":"Metric"},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"timestamp":{"type":"string","title":"Timestamp"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","default":"apple_health"}},"type":"object","required":["metric","timestamp"],"title":"HealthMetricItem"},"HealthMetricOut":{"properties":{"id":{"type":"integer","title":"Id"},"metric_type":{"type":"string","title":"Metric Type"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"source":{"type":"string","title":"Source"}},"type":"object","required":["id","metric_type","value","unit","timestamp","source"],"title":"HealthMetricOut"},"HydrationCreate":{"properties":{"timestamp_ms":{"type":"integer","title":"Timestamp Ms"},"amount_ml":{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Amount Ml"}},"type":"object","required":["timestamp_ms","amount_ml"],"title":"HydrationCreate"},"IngestResult":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"received":{"type":"integer","title":"Received"},"written":{"type":"integer","title":"Written"},"indexed":{"type":"integer","title":"Indexed","default":0}},"type":"object","required":["received","written"],"title":"IngestResult"},"InsightCardOut":{"properties":{"insight_id":{"type":"string","format":"uuid","title":"Insight Id"},"type":{"type":"string","title":"Type"},"topic":{"type":"string","title":"Topic"},"payload":{"type":"object","title":"Payload"},"rank":{"type":"integer","title":"Rank"},"seen_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seen At Ms"},"received_at_ms":{"type":"integer","title":"Received At Ms"}},"type":"object","required":["insight_id","type","topic","payload","rank","seen_at_ms","received_at_ms"],"title":"InsightCardOut"},"JoinIn":{"properties":{"share_streak":{"type":"boolean","title":"Share Streak","default":true},"share_rings":{"items":{"type":"string","enum":["activity","nutrition","recovery","glucose","sleep","blood_pressure"]},"type":"array","title":"Share Rings"}},"type":"object","title":"JoinIn"},"JoinWaitlistIn":{"properties":{"first_name":{"type":"string","title":"First Name"},"email":{"type":"string","format":"email","title":"Email"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"landing_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Landing Path"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"content_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Content Item Id"},"tracked_link_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracked Link Slug"}},"type":"object","required":["first_name","email"],"title":"JoinWaitlistIn"},"KeyCreateIn":{"properties":{"name":{"type":"string","maxLength":64,"title":"Name","default":""},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"KeyCreateIn"},"KitIntentIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"answers":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Answers"}},"type":"object","required":["email"],"title":"KitIntentIn"},"KnowledgeIn":{"properties":{"question":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Question"}},"type":"object","title":"KnowledgeIn"},"LabReportCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"collected_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Collected At"},"created_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created At Ms"},"results":{"items":{"$ref":"#/components/schemas/LabResultIn"},"type":"array","title":"Results","default":[]}},"type":"object","required":["name","collected_at"],"title":"LabReportCreate"},"LabResultIn":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Unit"},"flag":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Flag"}},"type":"object","required":["key"],"title":"LabResultIn"},"LinkRequest":{"properties":{"mac_address":{"type":"string","title":"Mac Address"}},"type":"object","title":"LinkRequest"},"LocationBatchIn":{"properties":{"samples":{"items":{"$ref":"#/components/schemas/LocationSampleIn"},"type":"array","maxItems":500,"title":"Samples"}},"type":"object","required":["samples"],"title":"LocationBatchIn"},"LocationSampleIn":{"properties":{"ts":{"type":"string","format":"date-time","title":"Ts"},"lat":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat"},"lon":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon"},"tz":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tz"}},"type":"object","required":["ts","lat","lon"],"title":"LocationSampleIn"},"LoginIn":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginIn"},"LoginRequestIn":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"LoginRequestIn"},"LoginVerifyIn":{"properties":{"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"LoginVerifyIn"},"MealCreate":{"properties":{"started_at_ms":{"type":"integer","title":"Started At Ms"},"ended_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ended At Ms"},"meal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"items":{"items":{"$ref":"#/components/schemas/app__api__routes__writes_api__MealItemIn"},"type":"array","title":"Items","default":[]}},"type":"object","required":["started_at_ms"],"title":"MealCreate"},"MealEmojisIn":{"properties":{"names":{"items":{"type":"string"},"type":"array","maxItems":40,"minItems":1,"title":"Names"}},"type":"object","required":["names"],"title":"MealEmojisIn","description":"POST /meals/emojis: dish names shown in a meal list."},"MealEmojisOut":{"properties":{"emojis":{"additionalProperties":{"type":"string"},"type":"object","title":"Emojis"}},"type":"object","required":["emojis"],"title":"MealEmojisOut"},"MealInsightIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MealNameItemIn"},"type":"array","maxItems":30,"minItems":1,"title":"Items"},"meal_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Meal Id"},"name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name"},"hour":{"anyOf":[{"type":"integer","maximum":23.0,"minimum":0.0},{"type":"null"}],"title":"Hour"},"totals":{"additionalProperties":{"type":"number"},"type":"object","maxProperties":20,"title":"Totals"},"glucose":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object","maxProperties":4},{"type":"null"}],"title":"Glucose"},"lang":{"type":"string","enum":["en","ar"],"title":"Lang","default":"en"}},"type":"object","required":["items"],"title":"MealInsightIn","description":"POST /meals/insight: the meal as the client sees it locally.\n\n`totals` maps a nutrient label (\"Protein (g)\") to the meal's amount;\n`glucose` is only sent when the person has glucose readings for the meal."},"MealInsightOut":{"properties":{"headline":{"type":"string","title":"Headline"},"analysis":{"type":"string","title":"Analysis"},"suggestion":{"type":"string","title":"Suggestion"},"tags":{"items":{"$ref":"#/components/schemas/MealInsightTag"},"type":"array","title":"Tags","default":[]},"emoji":{"type":"string","title":"Emoji","default":"🍽️"}},"type":"object","required":["headline","analysis","suggestion"],"title":"MealInsightOut"},"MealInsightTag":{"properties":{"label":{"type":"string","title":"Label"},"tone":{"type":"string","enum":["good","watch"],"title":"Tone"}},"type":"object","required":["label","tone"],"title":"MealInsightTag"},"MealItemOut":{"properties":{"item_id":{"type":"string","format":"uuid","title":"Item Id"},"meal_id":{"type":"string","format":"uuid","title":"Meal Id"},"food_id":{"type":"string","title":"Food Id"},"food_name_snapshot":{"type":"string","title":"Food Name Snapshot"},"custom_nutrition_override":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Nutrition Override"},"portion_modifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Modifier"},"gram_weight_consumed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gram Weight Consumed"},"synced_to_backend":{"type":"boolean","title":"Synced To Backend"}},"type":"object","required":["item_id","meal_id","food_id","food_name_snapshot","synced_to_backend"],"title":"MealItemOut"},"MealLogOut":{"properties":{"meal_id":{"type":"string","format":"uuid","title":"Meal Id"},"user_id":{"type":"integer","title":"User Id"},"started_at_ms":{"type":"integer","title":"Started At Ms"},"ended_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ended At Ms"},"meal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"additional_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Notes"},"picture_local_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture Local Path"},"picture_backend_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture Backend Url"},"meal_order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Order"},"meal_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Meal Score"},"synced_to_backend":{"type":"boolean","title":"Synced To Backend"},"items":{"items":{"$ref":"#/components/schemas/MealItemOut"},"type":"array","title":"Items","default":[]}},"type":"object","required":["meal_id","user_id","started_at_ms","ended_at_ms","meal_name","description","additional_notes","picture_local_path","picture_backend_url","meal_order","meal_score","synced_to_backend"],"title":"MealLogOut"},"MealLogUpdate":{"properties":{"ended_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ended At Ms"},"meal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"additional_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Notes"},"picture_local_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture Local Path"},"picture_backend_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture Backend Url"},"meal_order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Order"},"meal_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Meal Score"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__schemas__meals__MealItemIn"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","title":"MealLogUpdate"},"MealNameItemIn":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name"},"grams":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Grams"}},"type":"object","required":["name"],"title":"MealNameItemIn"},"MealNameSuggestIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MealNameItemIn"},"type":"array","maxItems":30,"minItems":1,"title":"Items"},"hour":{"anyOf":[{"type":"integer","maximum":23.0,"minimum":0.0},{"type":"null"}],"title":"Hour"}},"type":"object","required":["items"],"title":"MealNameSuggestIn","description":"POST /meals/suggest_name: the meal's food names, and the local hour as a hint."},"MealNameSuggestOut":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"MealNameSuggestOut"},"MedicationCreate":{"properties":{"timestamp_ms":{"type":"integer","title":"Timestamp Ms"},"type":{"type":"string","maxLength":50,"minLength":1,"title":"Type"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"dose_amount":{"type":"number","minimum":0.0,"title":"Dose Amount"},"dose_unit":{"type":"string","maxLength":50,"minLength":1,"title":"Dose Unit"},"insulin_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Insulin Type"},"delivery_method":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Delivery Method"},"scheduled":{"type":"boolean","title":"Scheduled","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["timestamp_ms","type","name","dose_amount","dose_unit"],"title":"MedicationCreate"},"MemoryIn":{"properties":{"value":{"title":"Value"}},"type":"object","required":["value"],"title":"MemoryIn"},"NewsletterSubscribeIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"NewsletterSubscribeIn"},"NicotineCreate":{"properties":{"timestamp_ms":{"type":"integer","title":"Timestamp Ms"},"delivery_type":{"type":"string","maxLength":50,"minLength":1,"title":"Delivery Type"},"amount_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Amount Mg"}},"type":"object","required":["timestamp_ms","delivery_type"],"title":"NicotineCreate"},"NudgeIn":{"properties":{"to_user_id":{"type":"integer","title":"To User Id"},"kind":{"type":"string","enum":["nudge","cheer"],"title":"Kind","default":"nudge"},"message":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Message"}},"type":"object","required":["to_user_id"],"title":"NudgeIn"},"NutritionIn":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Date"},"kcal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kcal"},"protein":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Protein"},"carbs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carbs"},"fat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fat"},"fiber":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fiber"},"micros":{"additionalProperties":{"type":"number"},"type":"object","title":"Micros"},"micros_units":{"additionalProperties":{"type":"string"},"type":"object","title":"Micros Units"}},"type":"object","required":["date"],"title":"NutritionIn"},"ObservationIn":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Existing observation to confirm or correct"},"signal":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Signal","description":"Signal id or free-text hint"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"value_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Value Text"},"unit":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Unit"},"ts_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts Start"},"ts_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ts End"},"tz_offset_min":{"anyOf":[{"type":"integer","maximum":900.0,"minimum":-900.0},{"type":"null"}],"title":"Tz Offset Min"},"status":{"type":"string","enum":["confirmed","rejected"],"title":"Status","default":"confirmed"}},"type":"object","title":"ObservationIn"},"OrderOut":{"properties":{"id":{"type":"integer","title":"Id"},"order_number":{"type":"string","title":"Order Number"},"product":{"type":"string","title":"Product"},"product_name":{"type":"string","title":"Product Name"},"recipient_name":{"type":"string","title":"Recipient Name"},"phone":{"type":"string","title":"Phone"},"email":{"type":"string","title":"Email"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"address_line1":{"type":"string","title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"type":"string","title":"City"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","title":"Country"},"booking_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Instructions"},"fulfillment_status":{"type":"string","title":"Fulfillment Status"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"partner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"estimated_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Delivery At"},"shipped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"appointment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment At"}},"type":"object","required":["id","order_number","product","product_name","recipient_name","phone","email","amount","currency","status","address_line1","address_line2","city","region","postal_code","country","booking_instructions","fulfillment_status","carrier","tracking_number","tracking_url","partner_name","created_at","paid_at","estimated_delivery_at","shipped_at","delivered_at","appointment_at"],"title":"OrderOut"},"PaymentIntentOut":{"properties":{"order":{"$ref":"#/components/schemas/OrderOut"},"client_secret":{"type":"string","title":"Client Secret"},"publishable_key":{"type":"string","title":"Publishable Key"}},"type":"object","required":["order","client_secret","publishable_key"],"title":"PaymentIntentOut"},"PredictiveAlert":{"properties":{"predicted_for":{"type":"string","format":"date-time","title":"Predicted For"},"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"}},"type":"object","required":["predicted_for","type","message","confidence"],"title":"PredictiveAlert"},"PredictiveAlertsOut":{"properties":{"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"alerts":{"items":{"$ref":"#/components/schemas/PredictiveAlert"},"type":"array","title":"Alerts"}},"type":"object","required":["computed_at","alerts"],"title":"PredictiveAlertsOut"},"PrefsIn":{"properties":{"tone":{"anyOf":[{"type":"string","enum":["gentle","cheeky","savage"]},{"type":"null"}],"title":"Tone"},"daily_cap":{"anyOf":[{"type":"integer","maximum":6.0,"minimum":1.0},{"type":"null"}],"title":"Daily Cap"},"quiet_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quiet Start"},"quiet_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quiet End"},"categories":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Categories"},"reminders":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReminderIn"},"type":"array","maxItems":20},{"type":"null"}],"title":"Reminders"},"friends_can_nudge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Friends Can Nudge"},"taunts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Taunts"},"timezone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Timezone"},"resume":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resume"}},"type":"object","title":"PrefsIn"},"PrivacyRequestIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"request_type":{"type":"string","enum":["delete","access","correct","restrict","object","withdraw_consent","other"],"title":"Request Type"},"scopes":{"items":{"type":"string","enum":["account","dna","blood","snore","email_list","api","other"]},"type":"array","maxItems":7,"title":"Scopes"},"details":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Details"},"approx_date":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Approx Date"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"}},"type":"object","required":["email","request_type"],"title":"PrivacyRequestIn"},"ProductInterestIn":{"properties":{"product":{"type":"string","enum":["cgm","scale","blood_pressure","environment","blood_test","dna_test","microbiome_test","bioage_test","hormone_test","allergy_test"],"title":"Product"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Country"},"booking_instructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Booking Instructions"}},"type":"object","required":["product","email"],"title":"ProductInterestIn"},"ProductInterestOut":{"properties":{"product":{"type":"string","enum":["cgm","scale","blood_pressure","environment","blood_test","dna_test","microbiome_test","bioage_test","hormone_test","allergy_test"],"title":"Product"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Region"},"postal_code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Country"},"booking_instructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Booking Instructions"},"id":{"type":"integer","title":"Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["product","email","id","status","created_at","updated_at"],"title":"ProductInterestOut"},"PushKeys":{"properties":{"p256dh":{"type":"string","title":"P256Dh"},"auth":{"type":"string","title":"Auth"}},"type":"object","required":["p256dh","auth"],"title":"PushKeys"},"PushSubscribeIn":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"keys":{"$ref":"#/components/schemas/PushKeys"}},"type":"object","required":["endpoint","keys"],"title":"PushSubscribeIn"},"QuestionIn":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Id"},"question":{"type":"string","maxLength":500,"minLength":3,"title":"Question"},"cluster":{"type":"string","maxLength":80,"title":"Cluster","default":"Uncategorised"},"page":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Page"},"want":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Want"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["question"],"title":"QuestionIn"},"QuestionPatch":{"properties":{"question":{"anyOf":[{"type":"string","maxLength":500,"minLength":3},{"type":"null"}],"title":"Question"},"cluster":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Cluster"},"page":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Page"},"want":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Want"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"QuestionPatch"},"RawSensorDataIn":{"properties":{"sensor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"hardware_idx":{"type":"integer","title":"Hardware Idx"},"iw":{"type":"number","title":"Iw"},"ib":{"type":"number","title":"Ib"},"t":{"type":"number","title":"T"},"sensor_trend":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Trend"},"sensor_error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sensor Error Code"},"sensor_glu_mg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sensor Glu Mg"}},"type":"object","required":["timestamp","hardware_idx","iw","ib","t"],"title":"RawSensorDataIn"},"ReadIn":{"properties":{"ids":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":200},{"type":"null"}],"title":"Ids"}},"type":"object","title":"ReadIn"},"RegisterIn":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"invite_token":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Invite Token"}},"type":"object","required":["email","password"],"title":"RegisterIn"},"ReminderIn":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Id"},"kind":{"type":"string","enum":["bp","weight","meds","water","checkin","custom"],"title":"Kind"},"label":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Label"},"time":{"type":"string","title":"Time"},"days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Days"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["kind","time"],"title":"ReminderIn"},"RenameIn":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"RenameIn"},"ResetPasswordIn":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordIn"},"RunIn":{"properties":{"reps":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Reps","default":3},"question_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Question Ids"},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Label"}},"type":"object","title":"RunIn"},"ScoreOut":{"properties":{"score_1_100":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Score 1 100"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"details":{"type":"object","title":"Details"}},"type":"object","required":["score_1_100","computed_at","details"],"title":"ScoreOut"},"SensorSessionIn":{"properties":{"mac_address":{"type":"string","title":"Mac Address"},"serial_number":{"type":"string","title":"Serial Number"},"device_name":{"type":"string","title":"Device Name"},"my_iarr":{"items":{"type":"integer"},"type":"array","title":"My Iarr"},"cipher_key":{"type":"integer","title":"Cipher Key"},"factory_k":{"type":"number","title":"Factory K"},"factory_r":{"type":"number","title":"Factory R"},"unbind_pin":{"type":"string","title":"Unbind Pin"},"bind_date":{"type":"string","format":"date-time","title":"Bind Date"},"bind_date_ms":{"type":"integer","title":"Bind Date Ms"},"latest_battery_voltage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Battery Voltage"},"latest_error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Error Code"},"status":{"type":"string","title":"Status","default":"active"},"session_archived":{"type":"boolean","title":"Session Archived","default":false},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"expired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired At"}},"type":"object","required":["mac_address","serial_number","device_name","my_iarr","cipher_key","factory_k","factory_r","unbind_pin","bind_date","bind_date_ms"],"title":"SensorSessionIn"},"SensorSessionOut":{"properties":{"mac_address":{"type":"string","title":"Mac Address"},"serial_number":{"type":"string","title":"Serial Number"},"device_name":{"type":"string","title":"Device Name"},"my_iarr":{"items":{"type":"integer"},"type":"array","title":"My Iarr"},"cipher_key":{"type":"integer","title":"Cipher Key"},"factory_k":{"type":"number","title":"Factory K"},"factory_r":{"type":"number","title":"Factory R"},"unbind_pin":{"type":"string","title":"Unbind Pin"},"bind_date":{"type":"string","format":"date-time","title":"Bind Date"},"bind_date_ms":{"type":"integer","title":"Bind Date Ms"},"latest_battery_voltage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Battery Voltage"},"latest_error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Error Code"},"status":{"type":"string","title":"Status","default":"active"},"session_archived":{"type":"boolean","title":"Session Archived","default":false},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"expired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired At"},"sensor_id":{"type":"integer","title":"Sensor Id"}},"type":"object","required":["mac_address","serial_number","device_name","my_iarr","cipher_key","factory_k","factory_r","unbind_pin","bind_date","bind_date_ms","sensor_id"],"title":"SensorSessionOut"},"SensorStatusOut":{"properties":{"has_active_sensor":{"type":"boolean","title":"Has Active Sensor"},"session_count":{"type":"integer","title":"Session Count"},"sensor":{"anyOf":[{"$ref":"#/components/schemas/SensorStatusSensor"},{"type":"null"}]}},"type":"object","required":["has_active_sensor","session_count","sensor"],"title":"SensorStatusOut"},"SensorStatusSensor":{"properties":{"sensor_id":{"type":"integer","title":"Sensor Id"},"device_name":{"type":"string","title":"Device Name"},"sensor_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sensor Type"},"status":{"type":"string","title":"Status"},"bind_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bind Date"},"bind_date_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bind Date Ms"},"latest_battery_voltage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Battery Voltage"},"latest_error_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Error Code"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"expired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired At"},"last_reading_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reading At"}},"type":"object","required":["sensor_id","device_name","sensor_type","status","bind_date","bind_date_ms","latest_battery_voltage","latest_error_code","started_at","expired_at","last_reading_at"],"title":"SensorStatusSensor"},"SetupIntentIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"SetupIntentIn"},"ShareDataIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ShareDataIn"},"ShareIn":{"properties":{"share_streak":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Share Streak"},"share_rings":{"anyOf":[{"items":{"type":"string","enum":["activity","nutrition","recovery","glucose","sleep","blood_pressure"]},"type":"array"},{"type":"null"}],"title":"Share Rings"},"full_view_user_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":12},{"type":"null"}],"title":"Full View User Ids"}},"type":"object","title":"ShareIn"},"SibionicsPayloadIn":{"properties":{"sensor_id":{"type":"integer","title":"Sensor Id"},"payload_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Hex"},"samples":{"anyOf":[{"items":{"$ref":"#/components/schemas/SibionicsSampleIn"},"type":"array"},{"type":"null"}],"title":"Samples"}},"type":"object","required":["sensor_id"],"title":"SibionicsPayloadIn"},"SibionicsPayloadOut":{"properties":{"index":{"type":"integer","title":"Index"},"glucose_mmol_L":{"type":"number","title":"Glucose Mmol L"},"glucose_mg_dL":{"type":"number","title":"Glucose Mg Dl"}},"type":"object","required":["index","glucose_mmol_L","glucose_mg_dL"],"title":"SibionicsPayloadOut"},"SibionicsRebuildFromRawIn":{"properties":{"sensor_id":{"type":"integer","title":"Sensor Id"},"warmup_last_exclusive_idx":{"type":"integer","title":"Warmup Last Exclusive Idx","default":119},"include_warmup":{"type":"boolean","title":"Include Warmup","default":false}},"type":"object","required":["sensor_id"],"title":"SibionicsRebuildFromRawIn"},"SibionicsRebuildFromRawOut":{"properties":{"glucose_rows_inserted":{"type":"integer","title":"Glucose Rows Inserted"},"raw_rows_seen":{"type":"integer","title":"Raw Rows Seen"}},"type":"object","required":["glucose_rows_inserted","raw_rows_seen"],"title":"SibionicsRebuildFromRawOut"},"SibionicsSampleIn":{"properties":{"index":{"type":"integer","title":"Index"},"value":{"type":"number","title":"Value"},"temp":{"type":"number","title":"Temp"}},"type":"object","required":["index","value","temp"],"title":"SibionicsSampleIn"},"SleepFactorCreate":{"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Date"},"type":{"type":"string","maxLength":64,"minLength":1,"title":"Type"},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Value"}},"type":"object","required":["date","type"],"title":"SleepFactorCreate"},"SleepSampleCreate":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"value":{"type":"string","title":"Value"},"source":{"type":"string","title":"Source","default":"apple_health"}},"type":"object","required":["start_date","end_date","value"],"title":"SleepSampleCreate"},"SleepSampleOut":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"value":{"type":"string","title":"Value"},"source":{"type":"string","title":"Source","default":"apple_health"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["start_date","end_date","value","id"],"title":"SleepSampleOut"},"StoreMatchIn":{"properties":{"fingerprint":{"type":"string","title":"Fingerprint"}},"type":"object","required":["fingerprint"],"title":"StoreMatchIn"},"StoreStartIn":{"properties":{"conversation":{"type":"string","title":"Conversation"},"consent":{"type":"boolean","title":"Consent","default":false},"consent_version":{"type":"string","title":"Consent Version","default":"1"},"bytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Bytes"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"role":{"type":"string","title":"Role","default":"self"},"relative_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Label"},"relative_consent":{"type":"boolean","title":"Relative Consent","default":false},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint"}},"type":"object","required":["conversation","bytes"],"title":"StoreStartIn"},"SubmissionDropped":{"properties":{"name":{"type":"string","title":"Name"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["name"],"title":"SubmissionDropped"},"SubmissionMarker":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"number","title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"converted_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted From"}},"type":"object","required":["key","value"],"title":"SubmissionMarker"},"Suggestion":{"properties":{"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"severity":{"type":"string","title":"Severity","default":"info"}},"type":"object","required":["title","body"],"title":"Suggestion"},"SuggestionsOut":{"properties":{"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"suggestions":{"items":{"$ref":"#/components/schemas/Suggestion"},"type":"array","title":"Suggestions"}},"type":"object","required":["computed_at","suggestions"],"title":"SuggestionsOut"},"TimeIn":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},"type":"object","required":["start"],"title":"TimeIn"},"TokenCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_in_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days"},"preset":{"anyOf":[{"type":"string","enum":["all_except_dna","all_read","summary_only","custom"]},{"type":"null"}],"title":"Preset"},"confirm_sensitive":{"type":"boolean","title":"Confirm Sensitive","default":false}},"type":"object","required":["name"],"title":"TokenCreate"},"TokenOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenOut"},"TrendOut":{"properties":{"points":{"items":{"$ref":"#/components/schemas/TrendPoint"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"TrendOut"},"TrendPoint":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"value_mgdl":{"type":"number","title":"Value Mgdl"}},"type":"object","required":["timestamp","value_mgdl"],"title":"TrendPoint"},"TurnDnaIn":{"properties":{"sheet":{"type":"object","title":"Sheet"},"genome":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Genome"}},"type":"object","title":"TurnDnaIn","description":"The DNA read on the user's phone — the same answer sheet healthosx.com/dna\nsends /genome/ask (findings computed on the device, never the file) — and,\nwhen they stored the file, its /genome/store token."},"TurnIn":{"properties":{"message":{"type":"string","maxLength":4000,"title":"Message","default":""},"upload_ids":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Upload Ids"},"locale":{"type":"string","enum":["en","ar"],"title":"Locale","default":"en"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"dna":{"anyOf":[{"$ref":"#/components/schemas/TurnDnaIn"},{"type":"null"}]}},"type":"object","title":"TurnIn"},"UserOut":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"biological_sex":{"anyOf":[{"type":"string","enum":["male","female"]},{"type":"null"}],"title":"Biological Sex"},"current_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Weight"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height"},"primary_goal":{"anyOf":[{"type":"string","enum":["lose_weight","maintain","build_muscle"]},{"type":"null"}],"title":"Primary Goal"},"pregnancy_status":{"anyOf":[{"type":"string","enum":["not_pregnant","pregnant","lactating"]},{"type":"null"}],"title":"Pregnancy Status"},"profile_picture_local_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Local Path"},"profile_picture_backend_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Backend Url"},"profile_picture_updated_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Picture Updated At Ms"},"xp_total":{"type":"integer","title":"Xp Total","default":0},"xp_level":{"type":"integer","title":"Xp Level","default":1},"language":{"type":"string","title":"Language","default":"en"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"glucose_unit":{"type":"string","title":"Glucose Unit","default":"mg_dl"},"is_diabetic":{"type":"boolean","title":"Is Diabetic","default":false},"min_glucose_alarm_mmol":{"type":"number","title":"Min Glucose Alarm Mmol","default":3.9},"max_glucose_alarm_mmol":{"type":"number","title":"Max Glucose Alarm Mmol","default":10.0},"alarms_enabled":{"type":"boolean","title":"Alarms Enabled","default":true},"activity_level":{"anyOf":[{"type":"string","enum":["sedentary","lightly_active","moderately_active","very_active"]},{"type":"null"}],"title":"Activity Level"},"observer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observer Email"},"developer_mode":{"type":"boolean","title":"Developer Mode","default":false},"food_source_priority":{"items":{"type":"string"},"type":"array","title":"Food Source Priority","default":[]},"day_anchor":{"type":"string","title":"Day Anchor","default":"midnight"},"apple_health_sync_enabled":{"type":"boolean","title":"Apple Health Sync Enabled","default":false},"apple_health_last_synced_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apple Health Last Synced Ms"},"updated_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated At Ms"},"synced_to_backend":{"type":"boolean","title":"Synced To Backend","default":true},"simulate_data":{"type":"boolean","title":"Simulate Data","default":false},"simulation_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Simulation Start Date"},"subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Plan"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"subscription_override":{"type":"boolean","title":"Subscription Override","default":false},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"password_set":{"type":"boolean","title":"Password Set","default":true},"onboarding_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Completed At"},"profile_data":{"type":"object","title":"Profile Data","default":{}}},"type":"object","required":["id","email"],"title":"UserOut"},"UserUpdate":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"biological_sex":{"anyOf":[{"type":"string","enum":["male","female"]},{"type":"null"}],"title":"Biological Sex"},"current_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Weight"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height"},"primary_goal":{"anyOf":[{"type":"string","enum":["lose_weight","maintain","build_muscle"]},{"type":"null"}],"title":"Primary Goal"},"pregnancy_status":{"anyOf":[{"type":"string","enum":["not_pregnant","pregnant","lactating"]},{"type":"null"}],"title":"Pregnancy Status"},"profile_picture_local_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Local Path"},"profile_picture_backend_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Backend Url"},"profile_picture_updated_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Picture Updated At Ms"},"xp_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Xp Total"},"xp_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Xp Level"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"glucose_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Glucose Unit"},"is_diabetic":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Diabetic"},"min_glucose_alarm_mmol":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Glucose Alarm Mmol"},"max_glucose_alarm_mmol":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Glucose Alarm Mmol"},"alarms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alarms Enabled"},"activity_level":{"anyOf":[{"type":"string","enum":["sedentary","lightly_active","moderately_active","very_active"]},{"type":"null"}],"title":"Activity Level"},"observer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observer Email"},"developer_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Developer Mode"},"food_source_priority":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Food Source Priority"},"day_anchor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day Anchor"},"apple_health_sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apple Health Sync Enabled"},"apple_health_last_synced_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Apple Health Last Synced Ms"},"updated_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated At Ms"},"synced_to_backend":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Synced To Backend"},"simulate_data":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Simulate Data"},"simulation_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Simulation Start Date"},"onboarding_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Completed At"},"profile_data":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Profile Data"}},"type":"object","title":"UserUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebSessionOut":{"properties":{"user_id":{"type":"integer","title":"User Id"},"effective_user_id":{"type":"integer","title":"Effective User Id"}},"type":"object","required":["user_id","effective_user_id"],"title":"WebSessionOut"},"WebhookCreate":{"properties":{"token_id":{"type":"integer","title":"Token Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["token_id","url"],"title":"WebhookCreate"},"WeightCreate":{"properties":{"timestamp_ms":{"type":"integer","title":"Timestamp Ms"},"weight_kg":{"type":"number","maximum":1000.0,"exclusiveMinimum":0.0,"title":"Weight Kg"},"body_fat_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Body Fat Pct"},"bmi":{"anyOf":[{"type":"number","maximum":200.0,"minimum":0.0},{"type":"null"}],"title":"Bmi"}},"type":"object","required":["timestamp_ms","weight_kg"],"title":"WeightCreate"},"WorkoutInsightIn":{"properties":{"workout_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Workout Id"},"activity":{"type":"string","maxLength":60,"minLength":1,"title":"Activity"},"hour":{"anyOf":[{"type":"integer","maximum":23.0,"minimum":0.0},{"type":"null"}],"title":"Hour"},"stats":{"additionalProperties":{"type":"number"},"type":"object","maxProperties":12,"title":"Stats"},"recent":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object","maxProperties":8},{"type":"null"}],"title":"Recent"},"history":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object","maxProperties":16},{"type":"null"}],"title":"History"},"glucose":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object","maxProperties":4},{"type":"null"}],"title":"Glucose"},"lang":{"type":"string","enum":["en","ar"],"title":"Lang","default":"en"}},"type":"object","required":["activity"],"title":"WorkoutInsightIn","description":"POST /health/workouts/insight: one workout as the client sees it locally."},"WorkoutSampleCreate":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"activity_name":{"type":"string","title":"Activity Name"},"calories":{"type":"number","title":"Calories","default":0.0},"source":{"type":"string","title":"Source","default":"apple_health"}},"type":"object","required":["start_date","end_date","activity_name"],"title":"WorkoutSampleCreate"},"WorkoutSampleOut":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"},"activity_name":{"type":"string","title":"Activity Name"},"calories":{"type":"number","title":"Calories","default":0.0},"source":{"type":"string","title":"Source","default":"apple_health"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["start_date","end_date","activity_name","id"],"title":"WorkoutSampleOut"},"app__api__routes__challenges_api__ChallengeIn":{"properties":{"kind":{"type":"string","enum":["steps","active_days","sleep_nights","log_days","workouts","checkin"],"title":"Kind"},"days":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Days"},"opponent_ids":{"items":{"type":"integer"},"type":"array","maxItems":11,"minItems":1,"title":"Opponent Ids"},"stake":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Stake"},"label":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Label"},"start_tomorrow":{"type":"boolean","title":"Start Tomorrow","default":false}},"type":"object","required":["kind","days","opponent_ids"],"title":"ChallengeIn"},"app__api__routes__community_api__ChallengeIn":{"properties":{"kind":{"type":"string","enum":["log_days","activity","nutrition","recovery","sleep"],"title":"Kind"},"target":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Target"},"days":{"type":"integer","maximum":30.0,"minimum":3.0,"title":"Days","default":7},"starts":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts"}},"type":"object","required":["kind","target"],"title":"ChallengeIn"},"app__api__routes__discovery_api__FeedbackIn":{"properties":{"verdict":{"type":"string","enum":["true","not_true","already_knew","tell_me_more"],"title":"Verdict"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["verdict"],"title":"FeedbackIn"},"app__api__routes__feedback__FeedbackIn":{"properties":{"category":{"type":"string","enum":["bug","suggestion","question","praise","other"],"title":"Category","default":"bug"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"context":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Context"}},"type":"object","required":["message"],"title":"FeedbackIn"},"app__api__routes__writes_api__MealItemIn":{"properties":{"food_id":{"type":"string","title":"Food Id"},"food_name_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Food Name Snapshot"},"gram_weight_consumed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gram Weight Consumed"},"custom_nutrition_override":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Nutrition Override"}},"type":"object","required":["food_id"],"title":"MealItemIn"},"app__schemas__meals__MealItemIn":{"properties":{"food_id":{"type":"string","title":"Food Id"},"food_name_snapshot":{"type":"string","title":"Food Name Snapshot"},"custom_nutrition_override":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Custom Nutrition Override"},"portion_modifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Modifier"},"gram_weight_consumed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gram Weight Consumed"}},"type":"object","required":["food_id","food_name_snapshot"],"title":"MealItemIn"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"health-read-api","description":"Token-authenticated user read API (projected + canonical archive)."},{"name":"health-export","description":"Asynchronous JSON/CSV/GPX/ZIP export jobs."},{"name":"api-tokens","description":"Create, list, and revoke personal API tokens."},{"name":"health-imports","description":"Canonical archive import (P2)."},{"name":"dna-api","description":"Paid DNA analysis API: prepaid keys, upload a raw file, poll the full report, chat over it."},{"name":"assistant","description":"Ask HealthOS: the in-app AI assistant (consent, conversations, uploads, streamed turns with tools). Session auth or a token with assistant:chat."}]}