Data Types

Schema Reference

Reference for the primary public response schemas currently documented in the MTH Health API. Each schema includes field types, descriptions, and example payloads.

These docs now include the current public glucose range response and the user-scoped activity range schemas.

Nutrition journal response shapes are also included below for manual entries, AI-scanned meals, generic drink entries, and dedicated water or coffee logs.

ConnectionResponse

Returned when listing connections or as part of the providers list. Represents an active OAuth connection between a user and a wearable provider.

FieldTypeDescription
idstring (UUID)Connection ID
userIdstring (UUID)The user this connection belongs to
providerstringProvider name: Fitbit, Garmin, Whoop, or Dexcom
providerUserIdstringThe user's ID on the provider's platform
statusstringConnection status: Active, Expired, or Disconnected
scopesstring | nullOAuth scopes granted
tokenExpiresAtstring (ISO 8601)When the OAuth access token expires
createdAtstring (ISO 8601)When the connection was established
updatedAtstring (ISO 8601)When the connection was last updated
Example
{
  "id": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
  "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "provider": "Dexcom",
  "providerUserId": "dexcom-user-id",
  "status": "Active",
  "scopes": "offline_access",
  "tokenExpiresAt": "2026-03-24T10:00:00Z",
  "createdAt": "2026-03-17T10:00:00Z",
  "updatedAt": "2026-03-17T10:00:00Z"
}

ConnectSessionResponse

Returned when creating an OAuth connect session. Contains the authorization URL to redirect the end user to.

FieldTypeDescription
idstring (UUID)Session ID
authorizationUrlstringURL to redirect the user to for OAuth authorization
expiresAtstring (ISO 8601)When this session expires (typically 10 minutes)
Example
{
  "id": "f8a1b2c3-d4e5-6789-0abc-def123456789",
  "authorizationUrl": "https://sandbox-api.dexcom.com/v3/oauth2/login?...",
  "expiresAt": "2026-03-17T10:10:00Z"
}

DailyActivityResponse

Returned by the connection activity endpoint. Contains daily activity metrics from a specific provider connection.

This schema is currently relevant for providers that expose a traditional daily activity summary, such as Fitbit and Garmin. WHOOP uses the load-oriented response below, and unsupported providers return 404 for the legacy activity route.

FieldTypeDescription
stepsintegerTotal steps for the day
caloriesOutintegerTotal calories burned
distancenumberDistance traveled (km)
fairlyActiveMinutesintegerMinutes of moderate activity
veryActiveMinutesintegerMinutes of vigorous activity
rawJsonstringRaw JSON from the provider (for debugging or custom parsing)
Example
{
  "steps": 8432,
  "caloriesOut": 2180,
  "distance": 6.34,
  "fairlyActiveMinutes": 25,
  "veryActiveMinutes": 22,
  "rawJson": "{...}"
}

DailyActivityEntryResponse

Returned by the user-scoped activity range endpoint. Each entry is a canonical daily summary for a specific provider connection and date.

FieldTypeDescription
connectionIdstring (UUID)Connection that produced the entry
providerstringProvider name
datestringDate in YYYY-MM-DD format
stepsinteger | nullTotal steps when available
caloriesOutinteger | nullTotal calories burned when available
distanceMetersnumber | nullDistance in meters
lightActiveMinutesinteger | nullLow-intensity active minutes
moderateActiveMinutesinteger | nullModerate active minutes
vigorousActiveMinutesinteger | nullVigorous active minutes
sedentaryMinutesinteger | nullSedentary minutes
floorsClimbedinteger | nullFloors climbed

DailyActivityLoadResponse

Returned by the canonical activity-load endpoint. It represents provider-native or normalized daily load data, such as WHOOP cycle strain.

This shape is intended for load-oriented providers and may contain nullable fields when a provider does not supply a specific metric.

FieldTypeDescription
datestringDate bucket in YYYY-MM-DD format
windowKindstringTime window type, such as PhysiologicalCycle
windowStartUtcstring | nullUTC start time of the provider window
windowEndUtcstring | nullUTC end time of the provider window
loadScorenumber | nullProvider-native or normalized load score
loadScoreScalestring | nullIdentifier for the score scale
energyKilocaloriesnumber | nullEnergy expenditure in kilocalories
averageHeartRateinteger | nullAverage heart rate for the window
maxHeartRateinteger | nullMaximum heart rate for the window
distanceMetersnumber | nullDistance in meters when available
stepsinteger | nullStep count when the provider exposes it
zoneDurationsJsonstring | nullSerialized provider zone duration payload
sourceConfidencestringWhether the record is provider-native or derived
Example
{
  "date": "2026-03-15",
  "windowKind": "PhysiologicalCycle",
  "windowStartUtc": "2026-03-14T21:48:00Z",
  "windowEndUtc": "2026-03-15T07:12:00Z",
  "loadScore": 15.4,
  "loadScoreScale": "whoop-strain-0-21",
  "energyKilocalories": 612.5,
  "averageHeartRate": 70,
  "maxHeartRate": 188,
  "distanceMeters": null,
  "steps": null,
  "zoneDurationsJson": "{...}",
  "sourceConfidence": "ProviderNative"
}

DailyActivityLoadEntryResponse

Returned by the user-scoped activity-load range endpoint. Each entry is a load-oriented record for a specific provider connection and date.

FieldTypeDescription
connectionIdstring (UUID)Connection that produced the entry
providerstringProvider name
datestringDate bucket in YYYY-MM-DD format
windowKindstringTime window type
windowStartUtcstring | nullUTC start time of the provider window
windowEndUtcstring | nullUTC end time of the provider window
loadScorenumber | nullProvider-native or normalized load score
loadScoreScalestring | nullIdentifier for the score scale
energyKilocaloriesnumber | nullEnergy expenditure in kilocalories
averageHeartRateinteger | nullAverage heart rate for the window
maxHeartRateinteger | nullMaximum heart rate for the window
distanceMetersnumber | nullDistance in meters
stepsinteger | nullStep count when available
zoneDurationsJsonstring | nullSerialized provider zone duration payload
sourceConfidencestringWhether the record is provider-native or derived

DailyScoreResponse

Returned by the daily scores endpoint. Each entry represents a single day's computed health scores.

FieldTypeDescription
datestringDate in YYYY-MM-DD format
sleepScoreintegerSleep quality score (0-100)
activityScoreintegerActivity score (0-100)
recoveryScoreintegerRecovery score (0-100)
overallScoreintegerWeighted overall health score (0-100)
componentsobjectDetailed breakdown of score components
Example
{
  "date": "2026-03-15",
  "sleepScore": 82,
  "activityScore": 71,
  "recoveryScore": 78,
  "overallScore": 77,
  "components": { ... }
}

GlucoseDataResponse

Returned by the user-scoped glucose range endpoint. The payload contains three arrays: continuous glucose readings, glucose-related events, and calibration records.

Top-level shape

FieldTypeDescription
readingsGlucoseReadingEntryResponse[]Continuous glucose readings
eventsGlucoseEventEntryResponse[]Provider glucose events such as exercise or insulin
calibrationsGlucoseCalibrationEntryResponse[]Calibration records

GlucoseReadingEntryResponse

FieldTypeDescription
connectionIdstring (UUID)Connection that produced the reading
providerstringProvider name
datestringDate bucket in YYYY-MM-DD format
systemTimestring | nullProvider system timestamp
displayTimestring | nullUser-facing reading timestamp
valueinteger | nullGlucose value
trendstring | nullTrend descriptor
trendRatenumber | nullTrend rate
unitstring | nullMeasurement unit
rateUnitstring | nullTrend-rate unit
statusstring | nullProvider reading status
transmitterIdstring | nullProvider transmitter identifier
recordIdstringStable provider reading identifier

GlucoseEventEntryResponse

FieldTypeDescription
connectionIdstring (UUID)Connection that produced the event
providerstringProvider name
datestringDate bucket in YYYY-MM-DD format
systemTimestring | nullProvider system timestamp
displayTimestring | nullUser-facing event timestamp
eventTypestringEvent type
eventSubTypestring | nullOptional provider event subtype
valuenumber | nullEvent value when applicable
unitstring | nullEvent unit when applicable
eventIdstringStable provider event identifier

GlucoseCalibrationEntryResponse

FieldTypeDescription
connectionIdstring (UUID)Connection that produced the calibration
providerstringProvider name
datestringDate bucket in YYYY-MM-DD format
systemTimestring | nullProvider system timestamp
displayTimestring | nullUser-facing calibration timestamp
valuenumber | nullCalibration value
unitstring | nullMeasurement unit

JournalEntryDetailResponse

Returned by manual create, scan create, detail fetch, and update endpoints. The detail response extends the summary shape with itemized foods or drinks and optional image metadata. The same shape is used for Meal, Drink, Water, and Coffee entries.

JournalNutrientsResponse

FieldTypeDescription
caloriesKcalnumber | nullTotal calories
proteinGramsnumber | nullTotal protein
carbsGramsnumber | nullTotal carbohydrates
fatGramsnumber | nullTotal fat
fiberGramsnumber | nullTotal fiber
sugarGramsnumber | nullTotal sugar
sodiumMgnumber | nullTotal sodium
caffeineMgnumber | nullTotal caffeine
volumeMlnumber | nullTotal liquid volume

JournalEntryItemResponse

FieldTypeDescription
idstring (UUID)Item identifier
namestringRecognized or user-entered item name
categorystringOptional item grouping
quantitynumber | nullItem quantity
unitstring | nullServing unit such as g, cup, or ml
estimatedWeightGramsnumber | nullEstimated item weight
nutrientsJournalNutrientsResponsePer-item nutrients
confidencenumber | nullAI confidence score from 0 to 1 when available

JournalEntryImageResponse

FieldTypeDescription
idstring (UUID)Image identifier
storageProviderstringBacking storage provider
fileNamestringOriginal file name
contentTypestringMIME type
sizeBytesintegerFile size in bytes
widthinteger | nullKnown width when available
heightinteger | nullKnown height when available

JournalEntrySummaryResponse

Returned by GET /api/v1/users/{userId}/journal-entries?date=.... Each summary represents one meal, generic drink, water, or coffee entry for the requested journal date.

FieldTypeDescription
idstring (UUID)Journal entry identifier
entryKindstringMeal, Drink, Water, or Coffee
entrySourcestringManual or AiImage
analysisStatusstringCurrent AI analysis lifecycle state
titlestring | nullShort entry label
notesstring | nullUser or AI notes
consumedAtUtcstringUTC consumption timestamp
journalDatestringDate bucket in YYYY-MM-DD format
timezonestringTimezone used to derive journalDate
isUserEditedbooleanWhether the user corrected the entry
nutrientsJournalNutrientsResponseNormalized entry totals
itemCountintegerNumber of food/drink items in the entry
hasImagebooleanWhether an uploaded source image exists

UserProviderConnectionsResponse

Returned by the providers list endpoint. Each entry pairs a ProviderInfo object with the user's connection to that provider (or null if not connected).

supportedDataTypes reflects the live adapter capabilities used by the backend rather than a static metadata list.

ProviderInfo

FieldTypeDescription
namestringDisplay name of the provider
slugstringURL-safe identifier (e.g., fitbit, dexcom)
authTypestringOAuth type: OAuth2 or OAuth1
logoUrlstring | nullURL to the provider's logo image
supportedDataTypesstring[]Array of supported data types

Full response shape

Example
[
  {
    "provider": {
      "name": "Whoop",
      "slug": "whoop",
      "authType": "OAuth2",
      "logoUrl": null,
      "supportedDataTypes": [
        "Sleep",
        "ActivitySession",
        "Recovery",
        "ActivityLoadDaily",
        "ProfileSnapshot",
        "BodyMeasurementSnapshot"
      ]
    },
    "connection": null
  },
  {
    "provider": {
      "name": "Dexcom",
      "slug": "dexcom",
      "authType": "OAuth2",
      "logoUrl": null,
      "supportedDataTypes": [
        "GlucoseReading",
        "GlucoseEvent",
        "GlucoseCalibration"
      ]
    },
    "connection": {
      "id": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
      "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "provider": "Dexcom",
      "providerUserId": "dexcom-user-id",
      "status": "Active",
      "scopes": "offline_access",
      "tokenExpiresAt": "2026-03-24T10:00:00Z",
      "createdAt": "2026-03-17T10:00:00Z",
      "updatedAt": "2026-03-17T10:00:00Z"
    }
  }
]

UserResponse

Returned by user read and update endpoints (GET, PATCH). User tokens are only issued on user creation and token rotation.

FieldTypeDescription
idstring (UUID)MTH Health internal user ID
appIdstring (UUID)The application this user belongs to
externalUserIdstringYour application's identifier for this user
statusstringUser status: Active or Deleted
localestring | nullUser locale (e.g., en-US)
timezonestring | nullIANA timezone (e.g., Europe/Brussels)
metadataobject | nullArbitrary key-value metadata
createdAtstring (ISO 8601)Timestamp when the user was created
updatedAtstring (ISO 8601)Timestamp of last update
Example
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "appId": "e5f6g7h8-i9j0-1234-klmn-op5678901234",
  "externalUserId": "user-123",
  "status": "Active",
  "locale": "en-US",
  "timezone": "Europe/Brussels",
  "metadata": { "plan": "premium" },
  "createdAt": "2026-03-17T10:00:00Z",
  "updatedAt": "2026-03-17T10:00:00Z"
}

UserWithTokenResponse

Returned only when a fresh user token is issued, such as during POST /api/v1/users for either a newly created user or an idempotent re-create of an existing user.

FieldTypeDescription
idstring (UUID)MTH Health internal user ID
appIdstring (UUID)The application this user belongs to
externalUserIdstringYour application's identifier for this user
statusstringUser status: Active or Deleted
localestring | nullUser locale (e.g., en-US)
timezonestring | nullIANA timezone (e.g., Europe/Brussels)
metadataobject | nullArbitrary key-value metadata
tokenstringFreshly issued user token for user-scoped API operations
createdAtstring (ISO 8601)Timestamp when the user was created
updatedAtstring (ISO 8601)Timestamp of last update

WeeklyScoreResponse

Returned by the weekly scores endpoint. Each entry represents a week's aggregated health scores.

FieldTypeDescription
weekStartDatestringMonday of the week in YYYY-MM-DD format
sleepScoreintegerAverage sleep score for the week (0-100)
activityScoreintegerAverage activity score for the week (0-100)
recoveryScoreintegerAverage recovery score for the week (0-100)
overallScoreintegerAverage overall score for the week (0-100)
daysWithDataintegerNumber of days in the week that had health data
Example
{
  "weekStartDate": "2026-03-10",
  "sleepScore": 80,
  "activityScore": 68,
  "recoveryScore": 75,
  "overallScore": 74,
  "daysWithData": 5
}