import { Aside, Tabs, TabItem } from ‘@astrojs/starlight/components’;
Beyond synced wearable data, VitaSync provides manual health tracking APIs for mood, nutrition, medications, and symptoms. These self-reported data points enrich AI analytics and correlation analysis.
Log daily mood with scores, energy levels, stress, and tags.
curl -X POST http://localhost:3001/v1/users/ $USER_ID /mood \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"tags": ["exercise", "good_sleep"],
"notes": "Great morning run, felt energized all day"
Field Type Required Description moodstring Yes Mood label (e.g. happy, anxious, neutral, tired) scorenumber Yes Overall mood score (1–10) energynumber No Energy level (1–10) stressnumber No Stress level (1–10) tagsstring[] No Context tags (max 10) factorsstring[] No Contributing factors (max 10) notesstring No Free-text notes (max 2000 chars) recordedAtISO 8601 No Defaults to now
Method Path Description GET/v1/users/:userId/moodList mood logs (filter by from, to, mood) POST/v1/users/:userId/moodCreate a mood entry GET/v1/users/:userId/mood/statsMood statistics for a period (days param, default 30)
"moodDistribution" : { "happy" : 12 , "neutral" : 8 , "anxious" : 3 },
"topTags" : [ " exercise " , " good_sleep " , " social " ],
Log meals with full macronutrient breakdown and get daily/weekly summaries.
curl -X POST http://localhost:3001/v1/users/ $USER_ID /nutrition \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"description": "Grilled chicken salad",
Field Type Required Description mealTypestring Yes breakfast, lunch, dinner, snack, supplementdescriptionstring No Meal description (max 500 chars) caloriesnumber No Total calories proteinGnumber No Protein in grams carbsGnumber No Carbohydrates in grams fatGnumber No Fat in grams fiberGnumber No Fiber in grams sugarGnumber No Sugar in grams sodiumMgnumber No Sodium in milligrams waterMlnumber No Water intake in milliliters loggedAtISO 8601 No Defaults to now
Method Path Description GET/v1/users/:userId/nutritionList nutrition logs (filter by from, to, mealType) POST/v1/users/:userId/nutritionLog a meal GET/v1/users/:userId/nutrition/:logIdGet a specific log PUT/v1/users/:userId/nutrition/:logIdUpdate a log DELETE/v1/users/:userId/nutrition/:logIdDelete a log GET/v1/users/:userId/nutrition/summary/dailyDaily macro totals (date param) GET/v1/users/:userId/nutrition/summary/weeklyWeekly averages
Track prescriptions, supplements, and adherence.
curl -X POST http://localhost:3001/v1/users/ $USER_ID /medications \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"timeOfDay": ["morning"],
"startDate": "2025-01-01T00:00:00Z"
curl -X POST http://localhost:3001/v1/users/ $USER_ID /medications/ $MED_ID /log \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"scheduledAt": "2025-03-18T08:00:00Z",
"takenAt": "2025-03-18T08:15:00Z"
Status Description takenMedication was taken missedDose was missed skippedIntentionally skipped
Method Path Description GET/v1/users/:userId/medicationsList medications (activeOnly filter, default true) POST/v1/users/:userId/medicationsAdd a medication GET/v1/users/:userId/medications/:medIdGet medication details PUT/v1/users/:userId/medications/:medIdUpdate a medication DELETE/v1/users/:userId/medications/:medIdDelete a medication POST/v1/users/:userId/medications/:medId/logLog adherence GET/v1/users/:userId/medications/:medId/logsList adherence logs GET/v1/users/:userId/medications/:medId/statsAdherence stats (days param, default 30)
Log symptoms with severity, body location, triggers, and relief measures. The system also analyzes patterns over time.
curl -X POST http://localhost:3001/v1/users/ $USER_ID /symptoms \
-H " Authorization: Bearer $API_KEY " \
-H " Content-Type: application/json " \
"symptomName": "Headache",
"bodyLocation": "frontal",
"triggers": ["poor_sleep", "screen_time"],
"reliefMeasures": ["ibuprofen", "rest"],
"notes": "Started after 4 hours of continuous screen time"
Field Type Required Description symptomNamestring Yes Name of the symptom (max 200 chars) severitynumber Yes Severity scale (1–10) bodyLocationstring No Body area affected (max 100 chars) durationstring No Duration description (max 100 chars) triggersstring[] No Known triggers (max 10) reliefMeasuresstring[] No Measures tried (max 10) notesstring No Free-text notes (max 2000 chars) occurredAtISO 8601 No Defaults to now
Method Path Description GET/v1/users/:userId/symptomsList symptom logs (filter by from, to, symptom) POST/v1/users/:userId/symptomsLog a symptom GET/v1/users/:userId/symptoms/:logIdGet a specific log DELETE/v1/users/:userId/symptoms/:logIdDelete a log GET/v1/users/:userId/symptoms/topTop symptoms by frequency (days param, default 30) GET/v1/users/:userId/symptoms/patternsPattern analysis (days param, default 90)
Symptom patterns are analyzed by the correlation engine. If headaches consistently follow poor sleep, this relationship will surface in the analytics correlations.