Vekta API
Sleeps

List a user's sleeps

The user's nights of sleep, most recent first.

You can filter by date (using the day field).

Responds with:

  • 404 not_found: the user doesn't exist or isn't one of your athletes.
  • 403 subscription_required: the user (or you, for me) doesn't have an active Vekta subscription.
  • 400 bad_request: invalid parameters or payload.
GET
/users/{userId}/sleeps

Authorization

AuthorizationBearer <token>

Your Vekta API key, sent as Authorization: Bearer vk_..., or an OAuth access token of an app you connected, sent as Authorization: Bearer <access token>.

In: header

Path Parameters

userId*string

Id of a user you have access to (see GET /users), or me for yourself

Query Parameters

from?string

First date to include (YYYY-MM-DD)

Formatdate
to?string

Last date to include (YYYY-MM-DD)

Formatdate

Response Body

application/json

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  }]