Sleep Data

GET https://api.tryterra.co/v2/sleep?user_id={{user-id}}&start_date=2023-05-05&end_date=2023-05-11&to_webhook=false

Get the sleep data for the given Terra user ID

Request Params

KeyDatatypeRequiredDescription
user_idstringTerra user_id you'd like to get data for
start_datestringStart date of the date range you'd like to get data for
end_datestringEnd date of the date range you'd like to get data for. Defaults to start_date + 1 day if blank.
to_webhookbooleanBoolean describing if the data should be sent to your webhook or back in the HTTP response
with_samplesbooleanBoolean describing if the data should contain detailed samples such as HR, HRV, steps, etc...

HEADERS

KeyDatatypeRequiredDescription
dev-idstring