Skip to content
Last updated

This document describes the Session schema and how it serves as the unified storage model for both Activities and Intentions.

Types of Sessions

For historical and compatibility reasons, activities and intentions are both stored in the same sessions schema. They are different representations of the same underlying session data, with different contents in their info JSON field.

Key Distinction:

Session TypeDistinctionDescription
ActivityNo subjective-inputsRepresents specific actions or tasks performed by the user (e.g., running, yoga, cooking)
IntentionHas subjective-inputsRepresents wellness goals and subjective feelings with user-reported measurements (e.g., calm, focus)

The shared session structure:

{
    "id": <String>,
    "startDatetime": <Date>,
    "endDatetime": <Date|null>,
    "created": <Date>,
    "lastUpdated": <Date>,
    "type": <Integer>,
    "info": <String>,
    "userId": <String>
}
FieldTypeDescription
idUUIDUnique identifier for the session
startDatetimeTimestampWhen the session started
endDatetimeTimestamp|nullWhen the session ended (null for ongoing sessions)
createdTimestampWhen the record was created
lastUpdatedTimestampWhen the record was last modified
typeIntegerActivity type (1-122) for Activities, 0 for Intentions
infoJSON StringContains activity/intention stringified JSON data
userIdUUIDThe user who owns this session (excluded from API responses)

Activities

Activities represent specific actions or tasks performed by the user. They are sessions with empty subjectiveInputs arrays and type values 1-122.

Activity info Schema

The info field for activities contains a JSON string with the following structure:

{
    "name": <String>,
    "origin": <Number>,
}
FieldTypeDescription
nameStringCustom name for the activity
originNumberActivityOrigin enum value (how activity was created)

Example Activity info

{
    "name": "Early afternoon cycle",
    "origin": 1
}

ActivityType

The type field for activities ranges from 0-122, representing specific actions:

ValueActivity TypeValueActivity TypeValueActivity TypeValueActivity Type
0UNDEFINED31WEIGHTLIFTING62CROSS_COUNTRY93GAMING
1BREATHWORK32MARATHON63TRAMPOLINE94GARDENING
2ICE_BATH33TRIATHLON64SKIING95HAIRCUT
3CYCLING34JUMP_ROPE65SNOWBOARDING96MASSAGE
4DANCING35CIRCUIT_TRAINING66ICE_SKATING97MEETING
5EVENT36GYMNASTICS67HOCKEY98PANIC_ATTACK
6HIKING37STRETCH68SKATEBOARDING99PRAYER
7MEDITATION38BASKETBALL69ROCK_CLIMBING100PRESENTATION
8LISTENING_TO_MUSIC39CRICKET70PARAGLIDING101READING
9PAINT40VOLLEYBALL71SKYDIVING102WATCHING_TV
10PARTY41FOOTBALL72GOLF103SHOPPING
11WRITING42BASEBALL73ARCHERY104STUDYING
12PHOTOGRAPHY43DODGEBALL74BOWLING105THERAPY
13RELAXING44HANDBALL75BILLIARDS106WORKING
14RUN45TENNIS76DARTS107BATH
15SAUNA46RACQUETBALL77HIIT108PLAYING
16SEX47SQUASH78HORSEBACK_RIDING109BREASTFEEDING
17SINGING48BADMINTON79POLO110KNITTING
18SOCIALISING49TABLE_TENNIS80MOUNTAIN_CLIMBING111POTTERY
19SWIMMING50PADEL81SCUBA_DIVING112CONCERT
20WALKING51DIVING82DRIVE113PLAYING_MUSIC
21WORKOUT52KAYAKING83DD114NAIL_PAINTING
22YOGA53ROWING84MOTORBIKE115DOG_WALKING
23SITTING54CANOEING85CHESS116TRAVELLING
24ROLLER_SKATING55SAILING86PHYSIOTHERAPY117BOARD_GAME
25SNORKEL56SURFING87CLASS_LECTURE
26AEROBICS57WINDSURFING88COMMUTING
27PILATES58KITESURFING89COOKING
28TAI_CHI59WAKEBOARDING90CRAFTING
29BODYBUILDING60WATER_SKIING91HOUSEWORK
30CROSSFIT61MARTIAL_ARTS92FISHING

ActivityOrigin

The origin field tracks how the activity was created:

Origin TypeDescription
USER_GENERATEDUser manually created the activity in the app
AUTO_GENERATEDSystem automatically created the activity
STARTED_OUTSIDE_APPActivity started on device, not in app
STOPPED_OUTSIDE_APPActivity stopped on device, not in app
STARTED_AND_STOPPED_OUTSIDE_APPBoth start and stop occurred outside the app
LOGGED_FROM_TIMELINEUser logged the activity retroactively from timeline

Intentions info Schema

Intentions represent wellness goals and subjective feelings. They are sessions with non-empty subjectiveInputs arrays and type 0 (UNDEFINED).

The info field for intentions contains a JSON string with the following structure:

{
    "name": <String|null>,
    "subjectiveInputs": [
        {
            "datetime": <String>,
            "type": <Number>,
            "value": <Number>,
            "tag": <Number>,
            "note": <String|null>
        }
    ],
    "origin": <Number>,
    "toolData": <String>,
    "intentionInfoData": <Base64String>
}
FieldTypeDescription
nameString|nullName/description of the intention (can be null)
subjectiveInputsArray<SubjectiveInput>User-reported measurements (required, non-empty for true intentions)
originNumberOptional ActivityOrigin enum value
toolDataStringOptional metadata (often empty string)
intentionInfoDataBase64StringBase64-encoded JSON with intention configuration details (see below)

IntentionInfoData Structure

The intentionInfoData field is a base64-encoded JSON string with the following structure when decoded:

{
    "intention": <Number>,
    "intentionMethod": <Number>,
    "intentionDetails": {
        "writingPrompts": <Array>,
        "options": {
            "soundscape": <Object>,
            "breathingPattern": {
                "inhale": <Number>,
                "exhale": <Number>
            },
            "selectedDuration": <Number>
        }
    }
}
FieldTypeDescription
intentionNumberIntentionTag enum value (0=CALM, 1=FOCUS, 2=ENERGY, 3=POSITIVITY)
intentionMethodNumberMethod/technique used for the intention
intentionDetailsObjectDetailed configuration including prompts, soundscape, breathing pattern, and duration

Example Intention info with SubjectiveInputs

{
    "name": "Walk",
    "subjectiveInputs": [
        {
            "datetime": "2025-11-09T17:51:03Z",
            "type": 2,
            "value": 3,
            "tag": 0,
            "note": null
        },
        {
            "datetime": "2025-11-09T17:51:03Z",
            "type": 2,
            "value": 5,
            "tag": 0,
            "note": null
        }
    ],
    "origin": 0,
    "toolData": "",
    "intentionInfoData": ""
}

Example Intention info with IntentionInfoData

{
    "name": "1:2 Breathing",
    "subjectiveInputs": [],
    "origin": 0,
    "toolData": "",
    "intentionInfoData": "eyJpbnRlbnRpb24iOjAsImludGVudGlvbk1ldGhvZCI6MiwiaW50ZW50aW9uRGV0YWlscyI6eyJ3cml0aW5nUHJvbXB0cyI6W10sIm9wdGlvbnMiOnsic291bmRzY2FwZSI6eyJub25lIjp7fX0sImJyZWF0aGluZ1BhdHRlcm4iOnsiaW5oYWxlIjozLCJleGhhbGUiOjZ9LCJzZWxlY3RlZER1cmF0aW9uIjoxMjB9fX0="
}

When intentionInfoData is decoded:

{
    "intention": 0,
    "intentionMethod": 2,
    "intentionDetails": {
        "writingPrompts": [],
        "options": {
            "soundscape": {
                "none": {}
            },
            "breathingPattern": {
                "inhale": 3,
                "exhale": 6
            },
            "selectedDuration": 120
        }
    }
}

IntentionTag

The four core wellness goals users can set intentions for:

ValueTagDescription
0CALMSeeking calmness/relaxation
1FOCUSImproving concentration/attention
2ENERGYBoosting energy levels
3POSITIVITYEnhancing mood/positivity

SubjectiveInput

User-reported measurements that distinguish intentions from activities.

FieldTypeDescription
datetimeString (ISO 8601)When the input was recorded
typeNumberSubjectiveInputType enum value
valueNumberNumeric rating/measurement
tagNumberIntentionTag enum value
noteString|nullOptional note or comment (can be null)

SubjectiveInputType

ValueTypeDescription
0UNDEFINEDUndefined input type
1MOODMood rating
2FEELINGEmotional feeling
3CHECK_IN_CONTEXT_CATEGORYCheck-in context categorization
4DAYDay rating/assessment
5SLEEPSleep quality rating
6RELATED_FEELINGRelated emotional state

Summary: Activities vs Intentions

FeatureActivityIntention
PurposeTrack specific actions/tasksTrack wellness goals and feelings
Type field1-122 (specific activities)0 (UNDEFINED)
SubjectiveInputsEmpty array []Populated with measurements
Has Origin✅ Yes❌ No
Has Tags❌ No✅ Yes (CALM, FOCUS, ENERGY, POSITIVITY)
Example"30 min YOGA session""Morning CALM intention - feeling peaceful (7/10)"
RepresentsWhat you didHow you felt/want to feel