---
title: Spren HRV API
slug: spren-api
description: Learn about the Spren HRV API, a JSON-based RESTful API for communication. Find out about the authorization process, available environments, and required headers. Understand the various endpoints and their HTTP methods, along with the biomarkers and insig
docTags: 
createdAt: 2022-05-02T15:44:06.000Z
---

# Summary

Spren HRV API is RESTful and partially async. It communicates with JSON request and response bodies. Authorization is in the header.&#x20;

## Environments

- `https://test.api.spren.com`
- `https://prod.api.spren.com`

## Headers/Authorization

| **Header**     | **Notes**                      | **Example**                      |
| -------------- | ------------------------------ | -------------------------------- |
| `X-API-KEY`    | Your API key for authorization | `X-API-KEY: <API key>`           |
| `Content-Type` | JSON, if request body present  | `Content-Type: application/json` |

# Endpoints

- **POST** `/submit/sdkData`
- **POST** `/submit/deviceData`
- **GET** `/results/{guid}`
- **GET** `/populationComparison`
- **POST** `/submit/userData`



# Biomarkers and Insights

:::hint{type="danger"}
`readiness` and `ansBalance` require 2 readings on 2 separate days within 10 days or value will be `null`

This will occur for a user's first reading **OR&#x20;**&#x61;fter their first reading if they have not performed a reading in the last 10 days, and when this occurs an `errorDescription` of `"baseline not set"` is returned. See **GET&#x20;**`/results/{guid}` below for more details.
:::

| **Response Key** | **Description**            | **Type**  | **Data Type** | **Return Values**                  |
| ---------------- | -------------------------- | --------- | ------------- | ---------------------------------- |
| `hr`             | Heart rate                 | Biomarker | number        | Floating point, unrestricted range |
| `hrvScore`       | HRV score                  | Biomarker | number        | Floating point, 0-100              |
| `rmssd`          | RMSSD                      | Biomarker | number        | Floating point, unrestricted range |
| `breathingRate`  | Breathing/respiration rate | Biomarker | number        | Floating point, unrestricted range |
| `readiness`\*    | Morning readiness          | Insight   | number        | Int, 0-10                          |
| `ansBalance`\*   | ANS balance level          | Insight   | number        | Int, 1-5                           |
| `balance`\*      | ANS balance                | Insight   | string        | SNS \| PSNS                        |
| `signalQuality`  | Signal quality             | Other     | number        | Int, 1-3                           |

:::hint{type="danger"}
\*require 2 readings on 2 separate days within 10 days or value will be null for insights
:::

# Endpoints - Async

::::ExpandableHeading{isOpen="true"}
### POST `/submit/sdkData`

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test.api.spren.com/submit/sdkData",
  "name": "Submit data",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-API-KEY",
        "type": "string",
        "description": "Your API key"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "description": "\"application/json\""
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "user",
        "type": "string",
        "description": "User ID"
      },
      {
        "kind": "required",
        "name": "readingData",
        "type": "string",
        "description": "Spren Vision SDK reading data"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "IboPm-M2Ir0KyHpjeHnLD",
        "code": "{\"guid\": \"IOWQ4fDEXAMPLEQM+ey7N9WgVhSnQ6JEXAMPLEZb7hSQDASK+Jd1vEXAMPLEa3Km\"}",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "l0fpbUSifLwMXgcdfQIb3",
        "code": "{\n    \"message\": \"Bad request error; please check that your payload and parameters are formatted correctly.\"\n}",
        "language": "401",
        "customLabel": ""
      },
      {
        "id": "jJSjC6QQwBN9aaa0L_TCZ",
        "code": "{\n    \"message\": \"Authentication/Authorization error; please check that your authorization information is correct.\"\n}",
        "language": "404",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "jJSjC6QQwBN9aaa0L_TCZ"
  },
  "examples": {
    "languages": [
      {
        "id": "kqjRQUyIzeeGxwsAVAkOD",
        "code": "{\n    \"user\": \"SuperAwesomeSprenUser\",\n    \"readingData\": \"z6dWlcxi5EXAMPLErv48go0e7s25ucFcev8mzsT4s4oggpkEXAMPLEq74abn53c8a8rqOtfsZeqr6bawwae15al62xEyEXAMPLE\"\n}",
        "language": "json",
        "customLabel": "Request Body Example"
      },
      {
        "id": "TewczAmE7On0e13YakDPp",
        "code": "{\n    \"user\": <string, user ID>,\n    \"readingData\": <string, Spren Vision SDK reading data>\n}",
        "language": "none",
        "customLabel": "Request Body Schema"
      },
      {
        "id": "BgSP3oABwErrw6LjBWk-o",
        "code": "curl --location --request POST 'https://test.api.spren.com/submit/sdkData' \\\n--header 'X-API-KEY: YourSprenAPIKey' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"user\":\"SuperAwesomeSprenUser\", \"readingData\": \"z6dWlcxi5EXAMPLErv48go0e7s25ucFcev8mzsT4s4oggpkEXAMPLEq74abn53c8a8rqOtfsZeqr6bawwae15al62xEyEXAMPLE\"}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "kqjRQUyIzeeGxwsAVAkOD"
  },
  "description": "From a Spren Vision SDK reading",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::
::::

::::ExpandableHeading{isOpen="true"}
### POST `/submit/deviceData`

:::hint{type="info"}
While we accept interbeat intervals (IBIs) from any device, the following devices have been tested

- Apple Watch
- Polar H7, H9, and H10
- Garmin HRM Dual and HRM Pro
- Suunto Smart Belt
- 4iiii Viiiiva
- Zephyr HxM
- Cardiosport TP3
- Ambiotex smart shirt with cardio-monitor
- BlueLeza HRM Blue
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test.api.spren.com/submit/deviceData",
  "name": "Submit data",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-API-KEY",
        "type": "string",
        "description": "Your API key"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "description": "\"application/json\""
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "user",
        "type": "string",
        "description": "User ID"
      },
      {
        "kind": "required",
        "name": "readingData",
        "type": "Object",
        "description": "See Request Body Example and Request Body Schema tabs"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "1o1UkPXgNMtUeIOtReOIZ",
        "code": "{\"guid\": \"IOWQ4fDEXAMPLEQM+ey7N9WgVhSnQ6JEXAMPLEZb7hSQDASK+Jd1vEXAMPLEa3Km\"}",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "BPU9CAAukcr44_9-VnzOk",
        "code": "{\n    \"message\": \"Bad request error; please check that your payload and parameters are formatted correctly.\"\n}",
        "language": "400",
        "customLabel": ""
      },
      {
        "id": "i0blWq3rE0l9pXCU6SUAR",
        "code": "{\n    \"message\": \"Authentication/Authorization error; please check that your authorization information is correct.\"\n}",
        "language": "401",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "BPU9CAAukcr44_9-VnzOk"
  },
  "examples": {
    "languages": [
      {
        "id": "SixC_U1YgatVfJXI6QdSp",
        "code": "{\n    \"user\": \"SuperAwesomeSprenUser\",\n    \"readingData\" : {\n        \n        \"timeInfo\": {\n            \"timezoneAbbreviation\": \"EST\",\n            \"readingStartTime\": \"2022-01-31T14:29:47.836-05:00\",\n            \"timezoneId\": \"America/New_York\",\n            \"regionCode\": \"US\"\n        },\n\n        \"ibis\": [1195,1117,1184,1272,1329,1305,1308,1211,1110,1098,1292,1418,1368,1372,1307,1194,1077,1140,1373,1363,1328,1303,1191,1042,954,1011,1396,1360,1363,1348,1262,1172,1183,1309,1338,1317,1264,1171,1051,1111,1317,1330,1303,1240,1153,1042,1088,1288,1265,1304,1241,1168,1060,1106,1223,1273,1265,1244,1173,1054,1004,1084,1252,1284,1210,1108,1128,1062,1072,1188,1289,1278,1251,1178,1055,1011,1090,1231,1293,1278,1225,1128,1048,1064,1177,1256,1220,1193,1175,1129,1056,994,981,1209,1314,1271,1255,1208,1113,1002,981,1164,1322,1302,1264,1216,1115,1044,1082,1227,1245,1224,1189,1181,1127,1087,1046,1187,1307,1322,1282,1232,1126,1039,1010,1154,1305,1292],\n        \"ibiResolution\": \"1/1024\",\n        \n        \"deviceType\": \"bluetoothChestStrap\",\n        \"deviceModel\": \"H7\",\n        \"deviceBrand\": \"Polar\",\n        \"sourceApp\": \"Health\",\n\n        \"additionalData\": \"{ \\\"spo2\\\": 97}\"\n    }\n}",
        "language": "json",
        "customLabel": "Request Body Example"
      },
      {
        "id": "TI1kDtxJto4k5skM5U4bz",
        "code": "{\n    \"user\": <user, string>,\n    \"readingData\" : {\n        \n        \"timeInfo\": {\n            \"timezoneAbbreviation\": <string, e.g., \"EST\">,\n            \"readingStartTime\": <datetime string - \"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ\", e.g., \"2022-01-31T14:29:47.836-05:00\">,\n            \"timezoneId\": <string timezone id, e.g., \"America/New_York\">,\n            \"regionCode\": <string region code, e.g., \"US\">\n        },\n\n        \"ibis\": [<number, minimum of 50 ibis, limited to 10 minutes>],\n        \"ibiResolution\": <\"1/1000\" or \"1/1024\", or \"1\" for Apple Watch>,\n        \n        \"deviceType\":  <required if sourceApp not set, string>,\n        \"deviceModel\": <optional, string>,\n        \"deviceBrand\": <optional, string>,\n        \"sourceApp\":   <required if deviceType not set, string>,\n\n        \"additionalData\": <optional, JSON string, e.g., \"{ \\\"spo2\\\": 97}\", limited to 300KB>\n    }\n}",
        "language": "none",
        "customLabel": "Request Body Schema"
      },
      {
        "id": "t6LDOk-WMrreDk4BAtcJV",
        "code": "{\n    \"user\": \"SuperAwesomeSprenUser\",\n    \"readingData\" : {\n        \n        \"timeInfo\": {\n            \"timezoneAbbreviation\": \"EST\",\n            \"readingStartTime\": \"2022-01-31T14:29:47.836-05:00\",\n            \"timezoneId\": \"America/New_York\",\n            \"regionCode\": \"US\"\n        },\n\n        \"ibis\": [0.4843750298023224, 1.5517280101776123, 2.657050609588623, 3.7742903232574463, 4.8220062255859375, 5.828125, 6.844399929046631, 7.88457727432251, 8.874582290649414, 9.875000953674316, 10.967329025268555, 12.10489273071289, 13.176104545593262, 14.196523666381836, 15.272435188293457, 16.402050018310547, 17.508533477783203, 18.508146286010742, 19.565383911132812, 20.672771453857422, 21.826953887939453, 22.902862548828125, 23.955883026123047, 25.045291900634766, 26.14838218688965, 27.140625, 28.0631103515625, 29.03072738647461, 30.06393051147461, 31.15479278564453, 32.248600006103516, 33.2828369140625, 34.322052001953125, 35.37783432006836, 36.442169189453125, 37.405731201171875, 38.28491973876953, 39.21875, 40.21875, 41.2934455871582, 42.304595947265625, 43.25, 44.24182891845703, 45.2844352722168, 46.29751968383789, 47.407127380371094, 48.56134033203125, 49.62022399902344, 50.61715316772461, 51.67640686035156, 52.78999328613281, 53.88925552368164, 54.94934844970703, 56.047752380371094, 57.1885871887207, 58.228050231933594, 59.27463150024414, 60.37499997019768, 61.511565804481506, 62.5560462474823, 63.58746147155762, 64.65309286117554, 65.76651000976562, 66.74961137771606, 67.78284978866577, 68.83904552459717, 69.81901168823242, 70.83590984344482, 71.9028434753418, 73.02445411682129, 74.03125, 75.09842586517334, 76.24885749816895, 77.40503883361816, 78.48084449768066, 79.59456634521484, 80.71140098571777, 81.6954460144043, 82.7123031616211, 83.77799224853516, 84.8914566040039, 85.89860343933105, 86.88304710388184, 87.91612434387207, 89.01422882080078, 90.03980827331543, 91.07221603393555, 92.15488052368164, 93.27340316772461, 94.42807006835938, 95.55830001831055, 96.65484619140625, 97.79670715332031, 98.91775512695312, 100.0401725769043, 101.07981491088867, 102.06212997436523, 103.09540176391602, 104.18608856201172, 105.26212692260742, 106.20312118530273, 107.1871223449707, 108.24712753295898, 109.34455108642578, 110.3766098022461, 111.44198608398438, 112.5404052734375, 113.64141082763672, 114.65488052368164, 115.60173034667969, 116.58527755737305, 117.67549896240234, 118.80835723876953, 119.85273742675781, 120.89062494039536, 122.00082588195801, 123.14705157279968, 124.25875854492188, 125.3061637878418, 126.35422229766846, 127.45398759841919, 128.60808849334717, 129.73786735534668, 130.734375, 131.7749319076538, 132.8654270172119, 133.97714042663574, 135.07672595977783, 136.07035446166992, 137.1374282836914, 138.23282432556152, 139.33598518371582, 140.385591506958, 141.32812690734863, 142.29640007019043, 143.34667015075684, 144.45397567749023, 145.5405979156494, 146.53087043762207, 147.5640640258789, 148.63706588745117, 149.70759201049805, 150.71924018859863, 151.71843910217285, 152.74370193481445, 153.81671524047852, 154.79243087768555, 155.76891708374023, 156.8154640197754, 157.9302635192871, 159.03949737548828, 160.0385971069336, 161.03913497924805, 162.0733299255371, 163.13729858398438, 164.21561431884766, 165.26880645751953, 166.37579727172852, 167.48523712158203, 168.57672119140625, 169.53887176513672, 170.4471778869629, 171.37500381469727, 172.37499618530273, 173.3820915222168, 174.4233741760254, 175.42995834350586, 176.3671531677246, 177.34336471557617, 178.40122604370117, 179.48114013671875, 180.484375, 181.47623324394226, 182.47652959823608, 183.51719069480896, 184.531964302063, 185.4995265007019, 186.46076440811157, 187.47742462158203, 188.5016269683838, 189.54054927825928, 190.53085708618164, 191.54897117614746, 192.6414270401001, 193.7691478729248, 194.8837947845459, 195.890625, 196.88312530517578, 197.91597366333008, 198.97961807250977, 200.05919075012207, 201.0953254699707, 202.16857528686523, 203.25482940673828, 204.21105575561523, 205.14818954467773, 206.14062690734863, 207.1816349029541, 208.23711967468262, 209.30925941467285, 210.4228115081787, 211.5224323272705, 212.5230941772461, 213.53190994262695, 214.56406784057617, 215.54646682739258, 216.5797882080078, 217.67046737670898, 218.67993927001953, 219.65573501586914, 220.65625, 221.6724967956543, 222.659912109375, 223.68122482299805, 224.74639129638672],\n        \"ibiResolution\": \"1\",\n        \n        \"deviceType\": \"watch\",\n        \"deviceModel\": \"6\",\n        \"deviceBrand\": \"apple\",\n        \"sourceApp\": \"appleHealth\",\n\n        \"additionalData\": \"{ \\\"spo2\\\": 97}\"\n    }\n}",
        "language": "json",
        "customLabel": "Apple Watch Example"
      },
      {
        "id": "lVV4HAHp3U7_hn_G3qIFu",
        "code": "curl --location --request POST 'https://test.api.spren.com/submit/deviceData' \\\n--header 'X-API-KEY: YourSprenAPIKey' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"user\":\"SuperAwesomeSprenUser\",\"readingData\":{\"timeInfo\":{\"timezoneAbbreviation\":\"EST\",\"readingStartTime\":\"2022-01-31T14:29:47.836-05:00\",\"timezoneId\":\"America/New_York\",\"regionCode\":\"US\"},\"ibis\":[1195,1117,1184,1272,1329,1305,1308,1211,1110,1098,1292,1418,1368,1372,1307,1194,1077,1140,1373,1363,1328,1303,1191,1042,954,1011,1396,1360,1363,1348,1262,1172,1183,1309,1338,1317,1264,1171,1051,1111,1317,1330,1303,1240,1153,1042,1088,1288,1265,1304,1241,1168,1060,1106,1223,1273,1265,1244,1173,1054,1004,1084,1252,1284,1210,1108,1128,1062,1072,1188,1289,1278,1251,1178,1055,1011,1090,1231,1293,1278,1225,1128,1048,1064,1177,1256,1220,1193,1175,1129,1056,994,981,1209,1314,1271,1255,1208,1113,1002,981,1164,1322,1302,1264,1216,1115,1044,1082,1227,1245,1224,1189,1181,1127,1087,1046,1187,1307,1322,1282,1232,1126,1039,1010,1154,1305,1292],\"ibiResolution\":\"1/1024\",\"deviceType\":\"bluetoothChestStrap\",\"deviceModel\":\"H7\",\"deviceBrand\":\"Polar\",\"sourceApp\":\"Health\",\"additionalData\":\"{\\\"spo2\\\": 97}\"}}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "t6LDOk-WMrreDk4BAtcJV"
  },
  "description": "From an external measurement device",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::
::::

::::ExpandableHeading{isOpen="true"}
### GET `/results/{guid}`

:::hint{type="info"}
For certain insights, a minimum number of readings are required. See the **Biomarkers/Insights** section.
:::

## Status/Value

For each biomarker or insight, a status/value JSON object is returned

:::CodeblockTabs
Status/Value

```none
{
    "status": <string, "pending", "complete", or "error">
    "value": <string, number, optional, null on error, see Biomarkers/Insights section below for precision and range>,
    "errorDescription": <string, optional>
}
```
:::

**State Permutations**

| `status`   | Description                | `value` (for calculated Biomarker/Insight)                                        | `errorDescription`        |
| ---------- | -------------------------- | --------------------------------------------------------------------------------- | ------------------------- |
| `pending`  | Calculation is in progress | `null`                                                                            | `null`                    |
| `complete` | Calculation is complete    | string, number, see **Biomarkers/Insights** section below for precision and range | `null`                    |
| `error`    | Calculation has errored    | `null`                                                                            | string, error encountered |

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test.api.spren.com/results/{guid}",
  "name": "Get biomarkers and insights",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-API-KEY",
        "type": "string",
        "description": "Your API key"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "gAoSlah-iFneJt3HBNT5W",
        "code": "// see Response Body Example\n{ ... }",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "5omkQB89MJU2KaNDhEtoa",
        "code": "{\n    \"message\": \"Bad request error; please check that your payload and parameters are formatted correctly.\"\n}",
        "language": "400",
        "customLabel": ""
      },
      {
        "id": "kUp1bjMFyqg5IGyleHwmT",
        "code": "{\n    \"message\": \"Authentication/Authorization error; please check that your authorization information is correct.\"\n}",
        "language": "401",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "gAoSlah-iFneJt3HBNT5W"
  },
  "examples": {
    "languages": [
      {
        "id": "Fjdo8J43d9ZlejZ54ERKi",
        "code": "// see the Biomarkers/Insights section for additional info about \"value\" precision and range\n{\n    \"biomarkers\": {\n        \"hr\": {\n            \"value\": 79.7994974014928,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        },\n        \"hrvScore\": {\n            \"value\": 61.691193950645186,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        },\n        \"rmssd\": {\n            \"value\": 51.25768235103885,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        },\n        \"breathingRate\": {\n            \"value\": 11.7,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        }\n    },\n    \"insights\": {\n        \"readiness\": {\n            \"value\": null,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        },\n        \"ansBalance\": {\n            \"value\": null,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        },\n        \"balance\": {\n            \"value\": null,\n            \"status\": \"complete\",\n            \"errorDescription\": null\n        }\n    },\n    \"signalQuality\": {\n        \"value\": 2,\n        \"status\": \"complete\",\n        \"errorDescription\": null\n    }\n\n    ... stress insight coming soon!\n}",
        "language": "json",
        "customLabel": "Response Body Example"
      },
      {
        "id": "7UmpHC5933Nm2hDD_24lv",
        "code": "{\n    \"biomarkers\": {\n        <biomarker name, string>: <status/value, see above>,\n        ...\n    }\n    \"insights\": {\n        <insight name, string>: <status/value, see above>,\n        ...\n    }\n    \"signalQuality\": <status/value, see above>\n}",
        "language": "none",
        "customLabel": "Response Body Schema"
      },
      {
        "id": "Gjr5vjJujS6uHmVoPZahL",
        "code": "curl --location --request GET 'https://test.api.spren.com/results/IOWQ4fDEXAMPLEQM+ey7N9WgVhSnQ6JEXAMPLEZb7hSQDASK+Jd1vEXAMPLEa3Km' \\\n--header 'X-API-KEY: YourSprenAPIKey'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Fjdo8J43d9ZlejZ54ERKi"
  },
  "description": "With a GUID from a SDK or device data endpoint POST response",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  }
}
```
:::
::::

# Endpoints - Sync

::::ExpandableHeading
### GET `/populationComparison`

## Types in Response

**Gender**

- `male`
- `female`
- `other`

**Age Range**

- `age-18-25`
- `age-26-35`
- `age-36-45`
- `age-46-55`
- `age-56-65`
- `age-66-1000`

**Mean/Range Object, Result Object**

:::CodeblockTabs
Mean/Range

```json
{
    "mean": <number>,
    "range": [
        <range start, number>, 
        <range end, number>
    ]
}
```

Result

```json
"result": {
    <mean/range>,
    "byGender": {
            "male": <mean/range>,
            "female": <mean/range>,
            "other": <mean/range>,
    }
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test.api.spren.com/populationComparison",
  "name": "Get population comparison data",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "X-API-KEY",
        "type": "string",
        "description": "Your API key"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "5FYAe-QptIZaGq6osyWsG",
        "code": "// see Response Body Example\n{ ... }",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "rfahdbHgC0PJL6YgYEs18",
        "code": "{\n    \"message\": \"Bad request error; please check that your payload and parameters are formatted correctly.\"\n}",
        "language": "400",
        "customLabel": ""
      },
      {
        "id": "Qw7IgCQ0q-tMctZbgeMEm",
        "code": "{\n    \"message\": \"Authentication/Authorization error; please check that your authorization information is correct.\"\n}",
        "language": "401",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "5FYAe-QptIZaGq6osyWsG"
  },
  "examples": {
    "languages": [
      {
        "id": "ptBciAk1TRLdqE2zn7jcY",
        "code": "{\n  \"hrv\": {\n    \"result\": {\n      \"mean\": 59.48192017501054,\n      \"range\": [\n        24.884232390998157,\n        94.07960795902292\n      ],\n      \"byGender\": {\n        \"male\": {\n          \"mean\": 59.15151765546141,\n          \"range\": [\n            24.553829871449025,\n            93.7492054394738\n          ]\n        },\n        \"female\": {\n          \"mean\": 58.14132921101882,\n          \"range\": [\n            23.543641427006435,\n            92.7390169950312\n          ]\n        },\n        \"other\": {\n          \"mean\": 59.48820715817252,\n          \"range\": [\n            30.65680067149553,\n            88.31961364484951\n          ]\n        }\n      }\n    },\n    \"age-18-25\": {\n      \"result\": {\n        \"mean\": 67.30673952641166,\n        \"range\": [\n          38.47533303973467,\n          96.13814601308866\n        ],\n        \"byGender\": {\n          \"male\": {\n            \"mean\": 67.70155230781934,\n            \"range\": [\n              38.87014582114235,\n              96.53295879449632\n            ]\n          },\n          \"female\": {\n            \"mean\": 65.13206135428358,\n            \"range\": [\n              42.066936164941986,\n              88.19718654362518\n            ]\n          },\n          \"other\": {\n            \"mean\": 0,\n            \"range\": [\n              0,\n              0\n            ]\n          }\n        }\n      }\n    }\n    ... \n  },\n  \"hr\": {\n    // see HRV above\n    ...\n  }\n}",
        "language": "json",
        "customLabel": "Response Body Example"
      },
      {
        "id": "BiYW03tEaxH3Ir0MyptAl",
        "code": "{\n\t\t\"hrv\": {\n\t\t\t\t<result>,\n\t\t\t\t<age range, string>: {\n\t\t\t\t\t\t<result>,\n\t\t\t\t}\n\t\t},\n\t\t\"hr\": {\n\t\t\t\t<result>,\n\t\t\t\t<age range, string>: {\n\t\t\t\t\t\t<result>,\n\t\t\t\t}\n\t\t}\n}",
        "language": "json",
        "customLabel": "Response Body Schema"
      },
      {
        "id": "db_lZoJj0AxusrFxxZlpv",
        "code": "curl --location --request GET 'https://test.api.spren.com/populationComparison' \\\n--header 'X-API-KEY: YourSprenAPIKey'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "db_lZoJj0AxusrFxxZlpv"
  },
  "description": "For genders and age ranges",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::
::::

::::ExpandableHeading
### POST `/submit/userData`

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test.api.spren.com/submit/userData",
  "name": "Submit user data",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-API-KEY",
        "type": "string",
        "description": "Your API key"
      },
      {
        "kind": "required",
        "name": "Content-Type",
        "type": "string",
        "description": "\"application/json\""
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "user",
        "type": "string",
        "description": "User ID"
      },
      {
        "kind": "optional",
        "name": "birthdate",
        "type": "string",
        "description": "User birthdate"
      },
      {
        "kind": "optional",
        "name": "gender",
        "type": "string",
        "description": "User gender"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "SaWrPNgdtr4pu4KGi9WF9",
        "code": "{}",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "3CTuyoxu83HlHIjsqk_rr",
        "code": "{\n    \"message\": \"Bad request error; please check that your payload and parameters are formatted correctly.\"\n}",
        "language": "400",
        "customLabel": ""
      },
      {
        "id": "w8WwVT-a8OSKQkNwGy2KZ",
        "code": "{\n    \"message\": \"Authentication/Authorization error; please check that your authorization information is correct.\"\n}",
        "language": "401",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "SaWrPNgdtr4pu4KGi9WF9"
  },
  "examples": {
    "languages": [
      {
        "id": "g0_RLHt8YIFTKDMzcIB1u",
        "code": "{\n    \"user\": \"SuperAwesomeSprenUser\",\n    \"birthdate\": \"2017-09-19\",\n    \"gender\": \"female\">\n}",
        "language": "json",
        "customLabel": "Request Body Example"
      },
      {
        "id": "ItX6ZK5yKIJH8wBdQwy_m",
        "code": "{\n    \"user\": <string>,\n    \"birthdate\": <optional string, yyyy-MM-dd>,\n    \"gender\": <optional string, \"male\", \"female\", or \"other\">\n}",
        "language": "none",
        "customLabel": "Request Body Schema"
      },
      {
        "id": "rVcsZBcc_HBR13DG4OV6q",
        "code": "curl --location --request POST 'https://test.api.spren.com/submit/userData' \\\n--header 'X-API-KEY: YourSprenAPIKey' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"user\":\"SuperAwesomeSprenUser\",\"birthdate\": \"2017-09-19\",\"gender\": \"female\"}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "g0_RLHt8YIFTKDMzcIB1u"
  },
  "description": "Birthdate and gender for future intra-customer HR and HRV population comparisons",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::
::::

