# Sahha Documentation > Sahha is a health data platform that collects, analyzes, and delivers health insights from smartphones and wearables. ## Overview Sahha brings health intelligence to any application. Collect passive health data from Apple Health and Google Health Connect, and use our outputs (scores, biomarkers, archetypes, insights) to deliver personalized experiences. ## Quick Links - Documentation: https://docs.sahha.ai - API Reference: https://api.sahha.ai/api-docs/index.html - Dashboard: https://app.sahha.ai - GitHub: https://github.com/sahha-ai ## Products ### Scores Health scores from 0-1 with explainable factors: - **Wellbeing**: Holistic health combining sleep and activity - **Activity**: Physical activity levels (steps, calories, active hours) - **Sleep**: Sleep quality (duration, regularity, stages, recovery) - **Mental Wellbeing**: Mental wellness from behavioral patterns - **Readiness**: Daily recovery and preparedness ### Biomarkers 60+ standardized health metrics including: - Activity: steps, floors_climbed, active_hours, active_energy_burned - Sleep: sleep_duration, sleep_debt, sleep_regularity, sleep_efficiency - Vitals: heart_rate_resting, heart_rate_variability_sdnn, respiratory_rate, oxygen_saturation, vo2_max - Body: height, weight, body_mass_index, body_fat ### Archetypes User categorization labels: - activity_level: sedentary, lightly_active, moderately_active, highly_active - sleep_pattern: consistent_early_riser, night_owl, etc. - exercise_frequency: rare_exerciser to frequent_exerciser - chronotype indicators ### Insights Higher-order analytics: - **Trends**: Track score/factor changes over time - **Comparisons**: Compare user metrics against population ### Data Logs Raw timestamped health samples from HealthKit and Health Connect for research and clinical use. ## Integration Methods ### Mobile SDK Native SDKs for collecting health data: - **iOS**: Swift, SwiftUI (via Swift Package Manager or CocoaPods) - **Android**: Kotlin, Jetpack Compose (via Gradle) - **Cross-platform**: React Native, Flutter Installation: ```swift // iOS - Swift Package Manager dependencies: [ .package(url: "https://github.com/sahha-ai/sahha-swift", from: "1.0.0") ] ``` ```kotlin // Android - Gradle implementation("ai.sahha:sahha-android:1.0.0") ``` ### REST API Query health data on-demand: - Base URL: https://api.sahha.ai - Authentication: OAuth2 with Account and Profile tokens - Endpoints: /profile/score, /profile/biomarker, /profile/archetypes, /profile/insight ### Webhooks Real-time event streaming: - Events: DataLogReceivedIntegrationEvent, BiomarkerCreatedIntegrationEvent, ScoreCreatedIntegrationEvent - Security: HMAC-SHA256 signature verification via X-Signature header - Headers: X-External-Id (profile identifier), X-Event-Type (event type) ## Data Sources - Apple Health (HealthKit) - iOS - Google Health Connect - Android - Wearables via platform health stores ## Key Concepts ### Profiles Each end-user has a Profile with: - External ID (your user identifier) - Profile token (for SDK/API authentication) - Demographics (optional: age, gender for improved accuracy) ### Sensors Data categories collected: - sleep, activity, heart, body, oxygen, energy, temperature, exercise ### Factors Each score includes contributing factors with: - name, value, goal, unit, score (0-1), state ## Sample API Response ```json { "type": "sleep", "score": 0.85, "state": "high", "factors": [ { "name": "sleep_duration", "value": 7.5, "goal": 8.0, "unit": "hour", "score": 0.94 } ], "scoreDateTime": "2024-09-03T00:00:00+05:00" } ``` ## Platform Requirements - iOS: iOS 14+, Xcode 15+ - Android: API 28+ (Android 9), Health Connect installed - No wearable required for core functionality ## Support - Email: support@sahha.ai - Slack: https://join.slack.com/t/sahhacommunity/shared_invite/zt-1w0fmfbvk-qUwQ83tJgXyjT9XSxJvKIw - GitHub Issues: https://github.com/sahha-ai