Data Points
PostMessage events sent from KinesteX SDK for integration with native apps and external systems. Events are sent in real-time, work safely offline, and provide comprehensive tracking for workouts, exercises, and health assessments.
Receiving Data
Each platform has a specific pattern for receiving data from KinesteX.
SDK Platforms (Swift, Kotlin, React Native, React-TS, Flutter): Use the callback function provided by the SDK with typed message enums.
HTML/JS: Set up a message event listener manually since there's no SDK wrapper.
1// onMessageReceived callback passes WebViewMessage enum
2// Available message types:
3
4// kinestex_launched([String: Any]) - KinesteX View launched
5// finished_workout([String: Any]) - Workout completed
6// error_occurred([String: Any]) - Errors (e.g., missing camera)
7// exercise_completed([String: Any]) - Exercise finished
8// exit_kinestex([String: Any]) - User exits KinesteX view
9// workout_opened([String: Any]) - Workout description viewed
10// workout_started([String: Any]) - Workout begins
11// plan_unlocked([String: Any]) - Workout plan unlocked
12// custom_type([String: Any]) - Unrecognized messages
13// reps([String: Any]) - Successful repetitions
14// mistake([String: Any]) - Detected mistakes
15// left_camera_frame([String: Any]) - User left camera frame
16// returned_camera_frame([String: Any]) - User returned to frame
17// workout_overview([String: Any]) - Workout summary
18// exercise_overview([String: Any]) - Exercise summary
19// workout_completed([String: Any]) - Workout done, overview exitedApplication Lifecycle
Events for app startup, loading, and exit.
| Event | Data Fields | Description |
| kinestex_launched | data: string ("dd mm yyyy hh:mm:ss") | KinesteX application is launched |
| kinestex_loaded | date: string (ISO format) | KinesteX fully loaded and ready |
| exit_kinestex | date: Date, time_spent: string ("hh:mm:ss") | User exits with total time spent |
| main_page_opened | date: string (ISO format) | Main/home page is opened |
Workout Events
Events for workout lifecycle and statistics.
| Event | Data Fields | Description |
| workout_opened | title: string, id: string, date: string | Workout details page opened |
| workout_started | id: string, date: string | Workout session started |
| workout_started (alt) | workoutId: string | Alternative workout start format |
| workout_completed | workout: string, date: string | Workout finished, user exits overview |
| workout_overview | data: object | Complete workout summary statistics |
workout_overview Data Structure:
```
{
workout_title: string, // Workout name
workout_id: string, // Unique workout ID
target_duration_seconds: number, // Target workout duration
completed_reps_count: number, // Total completed reps
target_reps_count: number, // Total target reps
calories_burned: number, // Calories (2 decimal places)
completion_percentage: number, // Completion % (2 decimals)
total_mistakes: number, // Total mistake count
accuracy_score: number, // Overall accuracy (0-100)
efficiency_score: number, // Efficiency metric (0-100)
total_exercise: number, // Number of exercises
actual_hold_time_seconds: number, // Time in correct position
target_hold_time_seconds: number // Target hold time
}
```
1case .workout_overview(let data):
2 if let calories = data["calories_burned"] as? Double,
3 let completion = data["completion_percentage"] as? Double {
4 print("Burned \(calories) cal, \(completion)% complete")
5 }Exercise Events
Events for individual exercise tracking.
| Event | Description |
| exercise_completed | Individual exercise completed |
| exercise_overview | All exercises summary (array) |
exercise_completed Data Structure:
```
{
exercise_title: string, // Exercise name
time_spent: number, // Seconds spent
repeats: number, // Reps completed
total_reps: number, // Required reps
total_duration: number, // Countdown time
calories: number, // Calories burned
exercise_id: string, // Exercise ID
mistakes: Array<{ // Mistakes made
mistake: string,
count: number
}>,
average_accuracy?: number // Average accuracy (0-1, optional)
}
```
exercise_overview Item Structure:
```
{
exercise_title: string, // Exercise name
exercise_id: string, // Unique exercise ID
time_spent: number, // Time on exercise (seconds)
perfect_hold_position: number, // Time in correct position (timer-based)
repeats: number, // Reps completed
total_required_reps: number, // Target reps
total_required_time: number, // Target time (seconds)
calories: number, // Calories (2 decimal places)
mistakes: Array<{ // Detailed mistake breakdown
mistake: string,
count: number
}>,
mistake_count: number, // Total mistakes for exercise
accuracy_reps?: number[], // Per-rep accuracy scores (optional)
average_accuracy?: number // Average accuracy 0-100 (optional)
}
```
Camera & Frame Events
Events for camera tracking and frame detection.
| Event | Data Fields | Description |
| left_camera_frame | date: string ("dd mm yyyy hh:mm:ss") | User left camera view |
| returned_camera_frame | date: string ("dd mm yyyy hh:mm:ss") | User returned to camera view |
| check_frame_completed | message: string ("Person stepped into frame") | Frame check completed |
| camera_selector_opened | message: array (available cameras) | Camera selector opened |
| camera_selected | id: string, label: string, isMirrorCamera: boolean | Camera selected by user |
Plans & Programs
Events for workout plans and programs.
| Event | Data Fields | Description |
| plan_unlocked | id: string, img: string, title: string, date: string | Plan unlocked/selected |
| personalized_plan_exit | workout: string, date: string | Exit from personalized plan |
Challenge Events
Events for challenge mode.
| Event | Data Fields | Description |
| challenge_started | exerciseId: string | Challenge exercise started |
| challenge_completed | repCount: number, mistakes: number | Challenge completed |
| challenge_exit | workout: string, date: string | Exit from challenge |
Leaderboard Events
Events for leaderboard functionality.
| Event | Data Fields | Description |
| highlighted_user | data: object | User's leaderboard position |
highlighted_user Data Structure:
```
{
username: string, // User's username
score: number, // User's score
position: number // Leaderboard position (1-based)
}
```
Error & Status Events
Events for errors, warnings, and active time tracking.
| Event | Data Fields | Description |
| error_occurred | data: string | General error message |
| error_occurred | message: string | Alternative error format |
| error_occurred | data: string, error: any | Error with details |
| warning | data: string | Warning message |
| total_active_seconds | number | Active workout time (sent every 5s, pauses when user leaves camera frame) |
Assessment Overview
AI-powered health assessments with two event types:
- assessment_overview: Sent when results page loads
- assessment_completed: Sent when user clicks restart or finish
Common Fields (All Assessments):
| Field | Type | Description |
| type | string | "assessment_overview" or "assessment_completed" |
| assessmentType | string | Assessment identifier (e.g., "tug", "sls") |
| date | Date | Timestamp when completed |
| time | number | Total assessment time (seconds) |
| steps | number? | Estimated step count (walking assessments) |
Assessment Types:
- Mobility: TUG (tug), Gait Speed Test (gaitspeedtest)
- Balance: SLS (sls), SBSS (sbss), STSS (stss), Full Tandem (fulltandem)
- Functional: STS (sts), Five Times STS (fivetimessts), FRT (frt)
- Games: Balloon Pop (balloonpop), Color Chase (colorchase), Alien Squat Shooter (aliensquatshooter)
Risk Levels:
| Value | Meaning |
| low | Good performance, minimal fall/balance risk |
| moderate | Some limitations, may benefit from training |
| high | Significant limitations, balance training recommended |
Mobility Assessments
TUG (Timed Up and Go) - assessmentType: "tug"
Stand-walk-turn-return-sit timing test.
| Field | Type | Description |
| time | number | Total completion time (seconds) |
| steps | number | Estimated step count |
| standingUpTime | number | Time to stand from seated (seconds) |
| sittingDownTime | number | Time to sit at end (seconds) |
| walkingForwardTime | number | Time walking to 3m marker (seconds) |
| walkingBackwardTime | number | Time walking back (seconds) |
| turningTime | number | Time spent turning (seconds) |
| backBendingAngleSitting | number[] | Back angles during sitting countdown (degrees) |
| backBendingAngleStanding | number[] | Back angles during movement (degrees) |
| averageSpeedMs_tug | number | Average walking speed. Formula: 6m / time |
| avgBackBendingSitting | number? | Average back angle sitting (degrees) |
| avgBackBendingStanding | number? | Average back angle standing (degrees) |
---
Gait Speed Test - assessmentType: "gaitspeedtest"
Walking speed measurement over 4 meters.
| Field | Type | Description |
| time | number | Total test time (seconds) |
| steps | number | Estimated step count |
| standingTime | number | Time in standing phase (seconds) |
| walkingTime | number | Active walking time (seconds) |
| averageGaitSpeed | number | Gait speed. Formula: 4m / time |
Balance Assessments
SLS (Single Leg Stand) - assessmentType: "sls"
| Field | Type | Description |
| rightTime | number | Duration on right leg (seconds) |
| leftTime | number | Duration on left leg (seconds) |
| symmetryScore_sls | number? | Leg symmetry % (0-100). Formula: (min/max) * 100 |
| riskLevel_sls | string | "low", "moderate", or "high" |
Risk Calculation:
- Low: Min time >=20s AND symmetry good (difference <=5s)
- Moderate: Min time >=10s AND average >=15s
- High: All other cases
---
SBSS (Side-by-Side Stand) - assessmentType: "sbss"
| Field | Type | Description |
| timeInProperPosition_sbss | number | Time in correct stance (max 10s) |
| maxShoulderShift_sbss | number | Max lateral shoulder shift (% of shoulder width) |
| maxHipShift_sbss | number | Max lateral hip shift (% of hip width) |
| feetMoved_sbss | boolean | Whether feet moved |
| riskLevel_sbss | string | "low", "moderate", or "high" |
Risk Calculation:
- High: Feet moved OR (time <7s AND sway >=30%)
- Moderate: Time >=7s AND sway <30%
- Low: Time >=9.5s AND sway <15%
---
STSS (Semi-Tandem Stand) - assessmentType: "stss"
| Field | Type | Description |
| timeInProperPosition_stss | number | Time in correct stance (max 10s) |
| maxShoulderShift_stss | number | Max shoulder shift (% of width) |
| maxHipShift_stss | number | Max hip shift (% of projection) |
| feetMoved_stss | boolean | Whether feet moved |
| riskLevel_stss | string | "low", "moderate", or "high" |
Risk calculation same as SBSS.
---
Full Tandem Stand - assessmentType: "fulltandem"
| Field | Type | Description |
| time | number | Total test time (seconds) |
| timeInProperPosition_fulltandem | number | Time in heel-to-toe stance (max 10s) |
| maxShoulderShift_fulltandem | number | Max shoulder shift (%) |
| maxHipShift_fulltandem | number | Max hip shift (%) |
| feetMoved_fulltandem | boolean | Whether feet moved |
| testFailed_fulltandem | boolean | Whether test was terminated early |
| terminationReason_fulltandem | string? | Reason for early termination |
| riskLevel_fulltandem | string | "low", "moderate", or "high" |
Risk Calculation:
- Low: Time >=10s AND no feet movement
- Moderate: Time >=5s
- High: Time <5s
Functional Assessments
STS (30-Second Sit-to-Stand) - assessmentType: "sts"
| Field | Type | Description |
| reps | number | Total reps completed in 30 seconds |
| averageSittingTime | number | Average time sitting per rep (seconds) |
| averageStandingTime | number | Average time standing per rep (seconds) |
| avgTimePerRep_sts | number? | Average seconds per rep. Formula: 30 / reps |
| repTimeVariance_minRepTime | number? | Fastest rep time (seconds) |
| repTimeVariance_maxRepTime | number? | Slowest rep time (seconds) |
| repTimeVariance_minRepIndex | number? | Which rep was fastest (1-indexed) |
| repTimeVariance_maxRepIndex | number? | Which rep was slowest (1-indexed) |
---
Five Times STS - assessmentType: "fivetimessts"
| Field | Type | Description |
| time | number | Total completion time for 5 reps (seconds) |
| averageSittingTime | number | Average time sitting (seconds) |
| averageStandingTime | number | Average time standing (seconds) |
---
FRT (Functional Reach Test) - assessmentType: "frt"
| Field | Type | Description |
| reach | number | Maximum forward reach (cm) |
| maxHeelLift | number | Maximum heel lift detected (cm) |
| heelLiftCount | number | Count of heel lift violations |
| legLiftCount | number | Count of leg lift violations |
| testCompleted | boolean | Whether test finished normally |
| endReason | string? | Reason for early termination |
| riskLevel_frt | string? | "low", "moderate", or "high" |
End Reason Values:
- "Feet moved out of zone"
- "User left zone"
- "User turned forward"
- "Arm dropped completely"
- "Reference lost"
- "Unhandled state"
Risk Calculation:
- High: Test not completed OR reach <=15cm
- Moderate: Reach 15-25cm
- Low: Reach >25cm
Game Assessments
Balloon Pop - assessmentType: "balloonpop"
| Field | Type | Description |
| gameScore | number | Total balloons popped |
| averageReactionTime | string | Average time to pop (seconds) |
| maxIdleTime | string | Max time without action (seconds) |
| averageSpeed_balloonpop | number | Balloons/second. Formula: gameScore / 30 |
| masteryTitle_balloonpop | string | Achievement tier |
Mastery Titles:
| Score | Title |
| >=30 | pop_tastic_hero |
| >=25 | magic_popper |
| >=20 | super_duper_popper |
| >=15 | sparkly_popper |
| >=10 | giggly_popper |
| >=5 | bouncy_bubbler |
| <5 | tiny_popper |
---
Color Chase - assessmentType: "colorchase"
| Field | Type | Description |
| gameScore | number | Total score achieved |
| levelReached | number | Highest level completed |
| totalDuration | string | Total game duration (seconds) |
| averageReactionTime | string | Average reaction time per tap (seconds) |
| maxIdleTime | string | Max time between taps (seconds) |
| masteryTitle_colorchase | string | Achievement tier |
Mastery Titles:
| Level | Title |
| >=10 | color_chase_legend |
| >=8 | magic_color_wizard |
| >=6 | super_color_star |
| >=4 | shiny_sequencer |
| >=2 | rainbow_chaser |
| >=1 | color_buddy |
| <1 | little_color_finder |
---
Alien Squat Shooter - assessmentType: "aliensquatshooter"
| Field | Type | Description |
| gameScore | number | Total aliens destroyed |
| squatsPerformed | number | Number of squats completed |
| totalDuration | string | Total game duration (seconds) |
| averageSquatRate | string | Squats per second |
| maxTimeBetweenSquats | string | Max idle between squats (seconds) |
| averageAlienDestroyTime | string | Average time to destroy alien (seconds) |
| masteryTitle_aliensquatshooter | string | Achievement tier |
Mastery Titles:
| Score | Title |
| >=25 | alien_annihilator |
| >=20 | cosmic_blaster |
| >=15 | star_shooter |
| >=10 | galactic_gunner |
| >=5 | space_squatter |
| <5 | rookie_defender |
---
Health Benefits (All Games)
Included in payload for all game types.
```
healthBenefits: {
heartDiseaseReduction: number, // Estimated % reduction (max 15)
diabetesReduction: number, // Estimated % reduction (max 20)
obesityReduction: number, // Estimated % reduction (max 10)
depressionReduction: number // Estimated % reduction (max 15)
}
```
Health Benefit Calculation:
`reduction = min((gameScore / 100) * maxReduction, maxReduction)`
Event Flow Examples
Complete Workout Flow:
1. `kinestex_launched` - Application starts
2. `workout_opened` - User views workout details
3. `workout_started` - Workout begins
4. `returned_camera_frame` / `left_camera_frame` - Frame tracking
5. Multiple `exercise_completed` - Each exercise finished
6. `workout_overview` - Summary statistics
7. `exercise_overview` - All exercises summary
8. `workout_completed` - User exits statistics
9. `exit_kinestex` - Application closed
Challenge Flow:
1. `challenge_started` - Challenge begins
2. `exercise_completed` - Exercise finished
3. `challenge_completed` - Challenge complete
4. `challenge_exit` - Exit from challenge
Assessment Flow:
1. `kinestex_launched` - Application starts
2. Assessment performed (user follows on-screen instructions)
3. `assessment_overview` - Results page loads with all metrics
4. `assessment_completed` - User clicks restart or finish
5. `exit_kinestex` - Application closed
Need Help?
Our team is ready to assist with your integration.

