curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{sleep_id}/stream \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.sleep.get_stream_by_sleep_id("<sleep_id>")
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.sleep.getStreamBySleepId({ sleepId: "<sleep_id>" });
import com.junction.api.Junction;
import com.junction.api.core.Environment;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.sleep().getStreamBySleepId("<sleep_id>");
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.Sleep.GetStreamBySleepId(context.TODO(), &junction.GetStreamBySleepIdSleepRequest{
SleepId: "<sleep_id>",
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"heartrate": [
{
"id": 0,
"timestamp": "2026-10-29T13:48:12.214689+00:00",
"unit": "bpm",
"value": 5
},
{
"id": 1,
"timestamp": "2026-10-29T13:48:42.214716+00:00",
"unit": "bpm",
"value": 183
},
{
"id": 2,
"timestamp": "2026-10-29T13:49:12.214733+00:00",
"unit": "bpm",
"value": 165
},
{
"id": 3,
"timestamp": "2026-10-29T13:49:42.214749+00:00",
"unit": "bpm",
"value": 189
},
{
"id": 4,
"timestamp": "2026-10-29T13:50:12.214766+00:00",
"unit": "bpm",
"value": 113
}
],
"hrv": [
{
"id": 0,
"timestamp": "2026-10-29T13:48:12.214372+00:00",
"unit": "rmssd",
"value": 9
},
{
"id": 1,
"timestamp": "2026-10-29T13:48:42.214553+00:00",
"unit": "rmssd",
"value": 78
},
{
"id": 2,
"timestamp": "2026-10-29T13:49:12.214591+00:00",
"unit": "rmssd",
"value": 4
},
{
"id": 3,
"timestamp": "2026-10-29T13:49:42.214646+00:00",
"unit": "rmssd",
"value": 11
},
{
"id": 4,
"timestamp": "2026-10-29T13:50:12.214668+00:00",
"unit": "rmssd",
"value": 24
}
],
"respiratory_rate": [
{
"id": 0,
"timestamp": "2026-10-29T13:48:12.214783+00:00",
"unit": "bpm",
"value": 11
},
{
"id": 1,
"timestamp": "2026-10-29T13:48:42.214803+00:00",
"unit": "bpm",
"value": 8
},
{
"id": 2,
"timestamp": "2026-10-29T13:49:12.214820+00:00",
"unit": "bpm",
"value": 14
},
{
"id": 3,
"timestamp": "2026-10-29T13:49:42.214837+00:00",
"unit": "bpm",
"value": 23
},
{
"id": 4,
"timestamp": "2026-10-29T13:50:12.214853+00:00",
"unit": "bpm",
"value": 10
}
]
}{
"detail": "<unknown>"
}Stream
Retrieve timeseries sleep stream via the Junction API. Requires authentication with your team API key.
GET
/
v2
/
timeseries
/
sleep
/
{sleep_id}
/
stream
curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{sleep_id}/stream \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.sleep.get_stream_by_sleep_id("<sleep_id>")
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.sleep.getStreamBySleepId({ sleepId: "<sleep_id>" });
import com.junction.api.Junction;
import com.junction.api.core.Environment;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.sleep().getStreamBySleepId("<sleep_id>");
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.Sleep.GetStreamBySleepId(context.TODO(), &junction.GetStreamBySleepIdSleepRequest{
SleepId: "<sleep_id>",
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"heartrate": [
{
"id": 0,
"timestamp": "2026-10-29T13:48:12.214689+00:00",
"unit": "bpm",
"value": 5
},
{
"id": 1,
"timestamp": "2026-10-29T13:48:42.214716+00:00",
"unit": "bpm",
"value": 183
},
{
"id": 2,
"timestamp": "2026-10-29T13:49:12.214733+00:00",
"unit": "bpm",
"value": 165
},
{
"id": 3,
"timestamp": "2026-10-29T13:49:42.214749+00:00",
"unit": "bpm",
"value": 189
},
{
"id": 4,
"timestamp": "2026-10-29T13:50:12.214766+00:00",
"unit": "bpm",
"value": 113
}
],
"hrv": [
{
"id": 0,
"timestamp": "2026-10-29T13:48:12.214372+00:00",
"unit": "rmssd",
"value": 9
},
{
"id": 1,
"timestamp": "2026-10-29T13:48:42.214553+00:00",
"unit": "rmssd",
"value": 78
},
{
"id": 2,
"timestamp": "2026-10-29T13:49:12.214591+00:00",
"unit": "rmssd",
"value": 4
},
{
"id": 3,
"timestamp": "2026-10-29T13:49:42.214646+00:00",
"unit": "rmssd",
"value": 11
},
{
"id": 4,
"timestamp": "2026-10-29T13:50:12.214668+00:00",
"unit": "rmssd",
"value": 24
}
],
"respiratory_rate": [
{
"id": 0,
"timestamp": "2026-10-29T13:48:12.214783+00:00",
"unit": "bpm",
"value": 11
},
{
"id": 1,
"timestamp": "2026-10-29T13:48:42.214803+00:00",
"unit": "bpm",
"value": 8
},
{
"id": 2,
"timestamp": "2026-10-29T13:49:12.214820+00:00",
"unit": "bpm",
"value": 14
},
{
"id": 3,
"timestamp": "2026-10-29T13:49:42.214837+00:00",
"unit": "bpm",
"value": 23
},
{
"id": 4,
"timestamp": "2026-10-29T13:50:12.214853+00:00",
"unit": "bpm",
"value": 10
}
]
}{
"detail": "<unknown>"
}curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{sleep_id}/stream \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.sleep.get_stream_by_sleep_id("<sleep_id>")
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.sleep.getStreamBySleepId({ sleepId: "<sleep_id>" });
import com.junction.api.Junction;
import com.junction.api.core.Environment;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.sleep().getStreamBySleepId("<sleep_id>");
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.Sleep.GetStreamBySleepId(context.TODO(), &junction.GetStreamBySleepIdSleepRequest{
SleepId: "<sleep_id>",
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
Authorizations
Vital Team API Key
Path Parameters
The Vital Sleep ID
Was this page helpful?