Sleep sessions
Rate nights good or bad
Rates your own nights as good or bad (the session ids come from get_insights).
POST
Send session_id (one) or session_ids (several) with one rating. Each id gets its own result { session_id, ok, status }: status rated, not_found (not one of your nights) or deleted.
Request parameters
Authorization string requiredYour API key as a bearer token: Bearer os_…. Make one on the API keys page; see Authentication.
Body application/json
ratingenum<string> requiredgood or bad
Possible values:
goodbadsession_idstring (uuid)One night: a session_id from get_insights.
session_idsstring[] (uuid) min items 1max items 200Several nights: session_ids from get_insights.
Response parameters
200 OK application/json
resultsobject[] required
Errors
Every error answers { "error": { "code", "message" } }.
rate_sleep_sessions