API reference
Sleep record by ID
{ "name" "get specific sleep record", "method" "get", "url" "https //app api spikeapi com/v3/queries/sleeps/{sleep id}", "description" "retrieve specific sleep record with record id", "tab" "examples", "examples" { "languages" \[ { "id" "co nququth xyjnpwxess", "language" "curl", "code" "curl request get \\\\\n url https //app api spikeapi com/v3/queries/sleeps/{sleep id} \\\\\n header 'accept application/json, application/problem+json' \\\\\n header 'authorization bearer eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9 eyjpc3mioii5otk5osisinn1yii6ime5zju3odazmgixythkywuifq djhtpuc7gakk03rtfqxufjzrbnpfwjgvjnfu7yuy4a4'", "customlabel" "" } ], "selectedlanguageid" "co nququth xyjnpwxess" }, "results" { "languages" \[ { "id" "qfu6epz 8pp15gg8ebsdx", "language" "200", "code" "{\n \\"record id\\" \\"0134ff3c 3f60 8c46 8e4e c0dd218c4e3a\\",\n \\"modified at\\" \\"2025 04 30t12 00 26z\\",\n \\"start at timestamp\\" \\"2025 04 28t17 30 00z\\",\n \\"end at timestamp\\" \\"2025 04 29t03 34 00z\\",\n \\"duration\\" 36240000,\n \\"user time offset minutes\\" 180,\n \\"input method\\" \\"device\\",\n \\"metrics\\" {\n \\"heartrate max\\" 104,\n \\"heartrate min\\" 47,\n \\"heartrate\\" 56,\n \\"hrv sdnn\\" 40,\n \\"spo2\\" 95 75,\n \\"spo2 max\\" 98,\n \\"spo2 min\\" 92,\n \\"sleep duration\\" 56280000,\n \\"sleep duration deep\\" 3600000,\n \\"sleep duration light\\" 15870000,\n \\"sleep duration rem\\" 6450000,\n \\"sleep duration awake\\" 3480000,\n \\"sleep interruptions\\" 6,\n \\"sleep breathing rate\\" 17 21,\n \\"sleep breathing rate min\\" 14 5,\n \\"sleep breathing rate max\\" 20 5,\n \\"skin temperature\\" 36 01,\n \\"skin temperature max\\" 36 01,\n \\"skin temperature min\\" 36 01\n },\n \\"provider source\\" \\"apple healthkit sleep aggregation\\",\n \\"provider source type\\" \\"activity\\",\n \\"provider slug\\" \\"apple\\",\n \\"source\\" {},\n \\"stages\\" \[\n {\n \\"start at\\" \\"2025 04 28t19 22 14z\\",\n \\"end at\\" \\"2025 04 28t19 36 44z\\",\n \\"duration\\" 870000,\n \\"metrics\\" {\n \\"heartrate max\\" 60,\n \\"heartrate min\\" 52,\n \\"heartrate\\" 56\n },\n \\"stage\\" \\"light\\"\n },\n < >\n {\n \\"start at\\" \\"2025 04 28t19 36 44z\\",\n \\"end at\\" \\"2025 04 28t20 00 14z\\",\n \\"duration\\" 1410000,\n \\"metrics\\" {\n \\"heartrate max\\" 60,\n \\"heartrate min\\" 55,\n \\"heartrate\\" 58\n },\n \\"stage\\" \\"deep\\"\n },\n < >\n {\n \\"start at\\" \\"2025 04 28t20 46 44z\\",\n \\"end at\\" \\"2025 04 28t21 21 14z\\",\n \\"duration\\" 2070000,\n \\"metrics\\" {\n \\"heartrate max\\" 60,\n \\"heartrate min\\" 57,\n \\"heartrate\\" 59\n },\n \\"stage\\" \\"rem\\"\n },\n < >\n {\n \\"start at\\" \\"2025 04 28t21 42 14z\\",\n \\"end at\\" \\"2025 04 28t21 43 14z\\",\n \\"duration\\" 60000,\n \\"stage\\" \\"awake\\"\n },\n < >\n {\n \\"start at\\" \\"2025 04 29t03 30 14z\\",\n \\"end at\\" \\"2025 04 29t03 32 14z\\",\n \\"duration\\" 120000,\n \\"metrics\\" {\n \\"heartrate max\\" 58,\n \\"heartrate min\\" 58,\n \\"heartrate\\" 58\n },\n \\"stage\\" \\"rem\\"\n }\n ],\n \\"sleep id\\" \\"2327f03a 80e1 5f96 ac8b abb2da42fa67\\",\n \\"score\\" 39,\n \\"samples\\" {\n \\"offsets\\" \[\n 9001000,\n 7382000,\n < >\n 34992973,\n 36014848,\n 36161848\n ],\n \\"durations\\" \[\n 28845248,\n 59625,\n 59609,\n < >\n 59961\n\n ],\n \\"values\\" {\n \\"heartrate\\" \n 80,\n 82,\n 104,\n 70,\n < >\n 52,\n 59,\n 58,\n 54\n ],\n \\"sleep breathing rate\\" \[\n 19 5,\n 0,\n 19,\n 18 5,\n 15 5,\n 0,\n < >\n 0,\n 16\n ],\n \\"spo2\\" \[\n 0,\n 97,\n 97,\n 0,\n 96,\n < >\n 0\n ],\n \\"hrv sdnn\\" \[\n 0,\n 45,\n < >\n 44\n ],\n \\"skin temperature\\" \[\n 36 01,\n < >\n 0\n ]\n },\n \\"stage\\" \[\n \\"light\\",\n \\"deep\\",\n < >\n \\"rem\\",\n \\"awake\\"\n ]\n }\n}", "customlabel" "" } ], "selectedlanguageid" "qfu6epz 8pp15gg8ebsdx" }, "request" { "pathparameters" \[ { "name" "sleep id", "kind" "optional", "type" "string", "description" "sleep id", "" "sleep id" } ], "queryparameters" \[ { "name" "include samples", "kind" "optional", "type" "boolean", "description" "include samples\n", "" "boolean" }, { "name" "include stages", "kind" "optional", "type" "boolean", "description" "include stages", "" "boolean" } ], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "provide your bearer token in the authorization header when making requests to protected resources ", "" "authorization" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "query parameter", "value" "queryparameters" }, "hastryitout" false, "response" \[ { "name" "duration", "kind" "optional", "type" "string", "description" "" }, { "name" "input method", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "end at timestamp", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "is source aggregated", "kind" "optional", "type" "boolean", "description" "", "children" \[] }, { "name" "metrics", "kind" "optional", "type" "object", "description" "", "children" \[] }, { "name" "modified at", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "provider slug", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "provider source", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "provider source type", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "record id", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "samples", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "divisionref", "kind" "optional", "type" "array", "description" "" }, { "name" "divisiontype", "kind" "optional", "type" "array", "description" "" }, { "name" "durations", "kind" "optional", "type" "array", "description" "" }, { "name" "offsets", "kind" "optional", "type" "array", "description" "" }, { "name" "stage", "kind" "optional", "type" "array", "description" "" }, { "name" "values", "kind" "optional", "type" "object", "description" "" } ] }, { "name" "score", "kind" "optional", "type" "integer", "description" "", "children" \[] }, { "name" "sleep id", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "source", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "device manufacturer", "kind" "optional", "type" "string", "description" "" }, { "name" "device model", "kind" "optional", "type" "string", "description" "" }, { "name" "device product", "kind" "optional", "type" "string", "description" "" }, { "name" "device version", "kind" "optional", "type" "string", "description" "" }, { "name" "source bundle identifier", "kind" "optional", "type" "string", "description" "" }, { "name" "source os version", "kind" "optional", "type" "string", "description" "" }, { "name" "source product", "kind" "optional", "type" "string", "description" "" }, { "name" "source version", "kind" "optional", "type" "string", "description" "" } ] }, { "name" "stages", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "duration", "kind" "optional", "type" "integer", "description" "" }, { "name" "end at", "kind" "optional", "type" "string", "description" "" }, { "name" "metrics", "kind" "optional", "type" "object", "description" "" }, { "name" "stage", "kind" "optional", "type" "string", "description" "" }, { "name" "start at", "kind" "optional", "type" "string", "description" "" } ] }, { "name" "start at timestamp", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "user time offset minutes", "kind" "optional", "type" "integer", "description" "", "children" \[] } ] }