NeccessoryNeccessory
REST API

End users

Tag measurements with your own user identifier and read per-user history and a personal baseline.

Tag each measurement with userRef, your own identifier for the person measured. The API then returns that person's history and a personal baseline.

userRef

RuleDetail
Format1–64 characters matching ^[A-Za-z0-9._:@-]{1,64}$. Matched exactly, case-sensitive
ContentYour internal user ID or a hash of it. No names, email addresses, phone numbers or other personal data
ScopePer key. Another key, even in your organization, sees no history for the same userRef

Measure each person with the same key to keep one history. A malformed userRef returns 400 validation_error.

Where to set it

EndpointField
POST /sdk/v1/cloud/sessionsuserRef in the body. The cloud result inherits it. See Cloud sessions
POST /sdk/v1/cloud/jobsuserRef in the body. See Video processing
POST /sdk/v1/measurementsuserRef in the body. See Measurements

Measurements and jobs return userRef when it was set.

List users

GET /sdk/v1/users

Returns every userRef of the signing key, most recently active first.

QueryTypeDefaultDescription
pagenumber1Page number
perPagenumber20Items per page, 1–100
{
  "ok": true,
  "data": {
    "items": [
      {
        "userRef": "u_42",
        "measurements": 17,
        "firstSeenAt": 1787400000000,
        "lastSeenAt": 1790000000000,
        "avgQuality": 0.81
      }
    ],
    "total": 1
  }
}
FieldTypeDescription
userRefstringYour identifier
measurementsnumberNumber of stored measurements
firstSeenAt, lastSeenAtnumberFirst and latest measurement, epoch milliseconds
avgQualitynumber | nullMean signal quality score, 0–1
totalnumberNumber of distinct users

User history

GET /sdk/v1/users/{ref}/measurements

Returns the user's measurements, newest first, as full measurement results.

QueryTypeDefaultDescription
pagenumber1Page number
perPagenumber20Items per page, 1–100
fromnumber—Earliest createdAt, epoch milliseconds, inclusive
tonumber—Latest createdAt, epoch milliseconds, inclusive
includestring—assessment adds the wellness assessment to each item
{
  "ok": true,
  "data": {
    "items": [
      {
        "id": "meas_9c1f4b7ae2d05138b6a37f42",
        "createdAt": 1790000000000,
        "origin": "cloud",
        "attested": true,
        "userRef": "u_42",
        "quality": { "level": "good", "score": 0.82, "usable": true },
        "cardiac": { "heartRate": { "value": 72, "unit": "bpm", "confidence": 0.88 } }
      }
    ],
    "total": 17
  }
}

Items are abbreviated here. Each one is a complete measurement result.

Baseline

GET /sdk/v1/users/{ref}/baseline

The baseline is each metric's median ± 2·MAD over the user's complete measurements with good or fair quality from the last 30 days, up to the 200 latest; a metric is included once it has at least 5 values.

{
  "ok": true,
  "data": {
    "userRef": "u_42",
    "status": "ok",
    "windowDays": 30,
    "minSamples": 5,
    "sampleCount": 12,
    "computedAt": 1790000000000,
    "metrics": {
      "heartRateBpm": { "median": 68, "mad": 3, "low": 62, "high": 74, "unit": "bpm", "samples": 12 },
      "rmssdMs": { "median": 41.5, "mad": 6.25, "low": 29, "high": 54, "unit": "ms", "samples": 11 }
    },
    "disclaimers": ["Estimate for wellness use only. Not a medical device."]
  }
}
FieldTypeDescription
statusstringok, or insufficient_data when no metric has 5 values yet
windowDaysnumberLook-back window, 30
minSamplesnumberValues a metric needs to be included, 5
sampleCountnumberMeasurements that qualified for the window
computedAtnumberWhen the baseline was computed, epoch milliseconds
metricsobjectPer-metric corridor. Empty when status is insufficient_data
metrics.*.mediannumberMedian value
metrics.*.madnumberMedian absolute deviation
metrics.*.low, metrics.*.highnumbermedian − 2·mad and median + 2·mad
metrics.*.unitstringUnit of the metric
metrics.*.samplesnumberValues used for this metric
disclaimersstring[]Text to show next to the baseline

Metrics: heartRateBpm, rmssdMs, sdnnMs, breathingRate, stressIndex, systolicMmHg, diastolicMmHg, spo2Pct. Values are rounded to two decimals.

insufficient_data is a normal 200 response. Show "not enough measurements yet" until the user has five usable measurements.

The baseline is a personal reference corridor: what is usual for this person. It is not a medical norm. Use it to show where a new measurement sits relative to the user's own history.