Vekta API
Sleep

List a user's sleeps

The user's recorded nights of sleep, most recent first, optionally restricted to a date range matching the day field. Responds with 404 if the user does not exist or is not accessible to you.

GET
/users/{userId}/sleeps
AuthorizationBearer <token>

Vekta api key, e.g. Authorization: Bearer vk_...

In: header

Path Parameters

userId*string

Id of a user you have access to (see GET /users), or the special value me for the user owning the api key

Query Parameters

from?string

Inclusive start of the date range (YYYY-MM-DD)

Formatdate
to?string

Inclusive end of the date range (YYYY-MM-DD)

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/users/me/sleeps"
[  {    "id": "slp_01JK4W2N9XQ3F5H7B8C6D2E9GT",    "day": "2026-08-01",    "startedAt": "2026-07-31 22:45:00+00",    "endedAt": "2026-08-01 06:30:00+00",    "utcOffset": 120,    "startedAtLocal": "2026-08-01 00:45:00+00",    "endedAtLocal": "2026-08-01 08:30:00+00",    "totalDuration": 27900,    "inBedDuration": 29700,    "awakeDuration": 1800,    "lightDuration": 14400,    "remDuration": 7200,    "deepDuration": 5400,    "noDataDuration": 900,    "averageHrv": 62,    "restingHeartRate": 46,    "skinBodyTemperature": 33.8,    "skinBodyTemperatureDeviation": 0.2  }]