Health
Sleep duration trend for the current user. week=7 nightly hours, month=30 nightly hours, year=12 monthly-avg hours. Points are sparse — missing days/months are omitted. Goal field carries the active sleep goal in hours. Premium-only.
Changed onget/api/health/sleep/trend/me
Request
- Base URLhttps://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
- URLhttps://api.rewritelifestyle.ai/api/health/sleep/trend/me
- AuthHTTP bearer
Query parameters
window'week' | 'month' | '6months' | 'year'
Time window. "week" = 7 daily points, "month" = 30 daily points, "6months" = ~26 weekly-average points, "year" = 12 monthly-average points. Defaults to "week".
datestring
Example:2026-05-19
End-date anchor in YYYY-MM-DD. Defaults to today in UTC. The window runs backwards from this date.
Changes
- info
added the new enum value
6monthsto thequeryrequest parameterwindow
- info