Ingest nightly sleep summaries
Up to 500 items per request. Same idempotency / provider-stamp / `is_backfill` semantics as the activity ingest. Optional `stage_intervals` per item carry per-stage segments (same shape as `/sleep/stream`); the returned `sample_id` joins the summary and per-stage views.
Authorization
MemberBearer Member-scoped JWT minted by POST /v1/auth/token. Required on every /v1/users/{user_id}/... route; the token's sub claim must match the path user_id.
In: header
Path Parameters
uuidHeader Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://loading/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/metrics/sleep/summary" \ -H "Content-Type: application/json" \ -d '{ "data": [ {} ] }'{
"data": [
{
"client_id": "string",
"status": "accepted",
"sample_id": "c94907f0-0a7b-412b-9563-59396ce4afee",
"error": {}
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Sleep summaries for a date range
Nightly aggregate (duration, efficiency, stage totals, HR, HRV, respiratory rate) per night in the window. For per-stage intervals, use `GET /metrics/sleep/stream`; both share a `sample_id` for joining.
Per-stage sleep segments (deep/light/rem/awake)
Returns deep/light/rem/awake segments with start/end timestamps for each night in the window. `sample_id` correlates 1:1 with the nightly summary's `sample_id` so partners can render a summary row alongside its hypnogram without an extra fetch.