WHOOP API
Download OpenAPI specification:Download
OAuth
Security Scheme Type | OAuth2 |
---|---|
authorizationCode OAuth Flow | Authorization URL: https://api.prod.whoop.com/oauth/oauth2/auth Token URL: https://api.prod.whoop.com/oauth/oauth2/token Scopes:
|
getCycleById
Get the cycle for the specified ID
Authorizations:
read:cycles
path Parameters
cycleId required | integer <int64> ID of the cycle to retrieve |
Responses
Response samples
- 200
{- "id": 93845,
- "user_id": 10129,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "start": "2022-04-24T02:25:44.774Z",
- "end": "2022-04-24T10:25:44.774Z",
- "timezone_offset": "-05:00",
- "score_state": "SCORED",
- "score": {
- "strain": 5.2951527,
- "kilojoule": 8288.297,
- "average_heart_rate": 68,
- "max_heart_rate": 141
}
}
getCycleCollection
Get all physiological cycles for a user, paginated. Results are sorted by start time in descending order.
Authorizations:
read:cycles
query Parameters
limit | integer <int32> <= 25 Default: 10 Limit on the number of cycles returned |
start | string <date-time> Return cycles that occurred after or during (inclusive) this time. If not specified, the response will not filter cycles by a minimum time. |
end | string <date-time> Return cycles that intersect this time or ended before (exclusive) this time. If not specified, |
nextToken | string Optional next token from the previous response to get the next page. If not provided, the first page in the collection is returned |
Responses
Response samples
- 200
{- "records": [
- {
- "id": 93845,
- "user_id": 10129,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "start": "2022-04-24T02:25:44.774Z",
- "end": "2022-04-24T10:25:44.774Z",
- "timezone_offset": "-05:00",
- "score_state": "SCORED",
- "score": {
- "strain": 5.2951527,
- "kilojoule": 8288.297,
- "average_heart_rate": 68,
- "max_heart_rate": 141
}
}
], - "next_token": "MTIzOjEyMzEyMw"
}
getRecoveryCollection
Get all recoveries for a user, paginated. Results are sorted by start time of the related sleep in descending order.
Authorizations:
read:recovery
query Parameters
limit | integer <int32> <= 25 Default: 10 Limit on the number of recoveries returned |
start | string <date-time> Return recoveries that occurred after or during (inclusive) this time. If not specified, the response will not filter recoveries by a minimum time. |
end | string <date-time> Return recoveries that intersect this time or ended before (exclusive) this time. If not specified, |
nextToken | string Optional next token from the previous response to get the next page. If not provided, the first page in the collection is returned |
Responses
Response samples
- 200
{- "records": [
- {
- "cycle_id": 93845,
- "sleep_id": 10235,
- "user_id": 10129,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "score_state": "SCORED",
- "score": {
- "user_calibrating": false,
- "recovery_score": 44,
- "resting_heart_rate": 64,
- "hrv_rmssd_milli": 31.813562,
- "spo2_percentage": 95.6875,
- "skin_temp_celsius": 33.7
}
}
], - "next_token": "MTIzOjEyMzEyMw"
}
getRecoveryForCycle
Get the recovery for a cycle
Authorizations:
read:recovery
path Parameters
cycleId required | integer <int64> ID of the cycle to retrieve |
Responses
Response samples
- 200
{- "cycle_id": 93845,
- "sleep_id": 10235,
- "user_id": 10129,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "score_state": "SCORED",
- "score": {
- "user_calibrating": false,
- "recovery_score": 44,
- "resting_heart_rate": 64,
- "hrv_rmssd_milli": 31.813562,
- "spo2_percentage": 95.6875,
- "skin_temp_celsius": 33.7
}
}
getSleepById
Get the sleep for the specified ID
Authorizations:
read:sleep
path Parameters
sleepId required | integer <int64> ID of the sleep to retrieve |
Responses
Response samples
- 200
{- "id": 93845,
- "user_id": 10129,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "start": "2022-04-24T02:25:44.774Z",
- "end": "2022-04-24T10:25:44.774Z",
- "timezone_offset": "-05:00",
- "nap": false,
- "score_state": "SCORED",
- "score": {
- "stage_summary": {
- "total_in_bed_time_milli": 30272735,
- "total_awake_time_milli": 1403507,
- "total_no_data_time_milli": 0,
- "total_light_sleep_time_milli": 14905851,
- "total_slow_wave_sleep_time_milli": 6630370,
- "total_rem_sleep_time_milli": 5879573,
- "sleep_cycle_count": 3,
- "disturbance_count": 12
}, - "sleep_needed": {
- "baseline_milli": 27395716,
- "need_from_sleep_debt_milli": 352230,
- "need_from_recent_strain_milli": 208595,
- "need_from_recent_nap_milli": -12312
}, - "respiratory_rate": 16.11328125,
- "sleep_performance_percentage": 98,
- "sleep_consistency_percentage": 90,
- "sleep_efficiency_percentage": 91.69533848
}
}
getSleepCollection
Get all sleeps for a user, paginated. Results are sorted by start time in descending order.
Authorizations:
read:sleep
query Parameters
limit | integer <int32> <= 25 Default: 10 Limit on the number of sleeps returned |
start | string <date-time> Return sleeps that occurred after or during (inclusive) this time. If not specified, the response will not filter sleeps by a minimum time. |
end | string <date-time> Return sleeps that intersect this time or ended before (exclusive) this time. If not specified, |
nextToken | string Optional next token from the previous response to get the next page. If not provided, the first page in the collection is returned |
Responses
Response samples
- 200
{- "records": [
- {
- "id": 93845,
- "user_id": 10129,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "start": "2022-04-24T02:25:44.774Z",
- "end": "2022-04-24T10:25:44.774Z",
- "timezone_offset": "-05:00",
- "nap": false,
- "score_state": "SCORED",
- "score": {
- "stage_summary": {
- "total_in_bed_time_milli": 30272735,
- "total_awake_time_milli": 1403507,
- "total_no_data_time_milli": 0,
- "total_light_sleep_time_milli": 14905851,
- "total_slow_wave_sleep_time_milli": 6630370,
- "total_rem_sleep_time_milli": 5879573,
- "sleep_cycle_count": 3,
- "disturbance_count": 12
}, - "sleep_needed": {
- "baseline_milli": 27395716,
- "need_from_sleep_debt_milli": 352230,
- "need_from_recent_strain_milli": 208595,
- "need_from_recent_nap_milli": -12312
}, - "respiratory_rate": 16.11328125,
- "sleep_performance_percentage": 98,
- "sleep_consistency_percentage": 90,
- "sleep_efficiency_percentage": 91.69533848
}
}
], - "next_token": "MTIzOjEyMzEyMw"
}
getBodyMeasurement
Get the user's body measurements
Authorizations:
read:body_measurement
Responses
Response samples
- 200
{- "height_meter": 1.8288,
- "weight_kilogram": 90.7185,
- "max_heart_rate": 200
}
Response samples
- 200
{- "user_id": 10129,
- "email": "jsmith123@whoop.com",
- "first_name": "John",
- "last_name": "Smith"
}
getWorkoutById
Get the workout for the specified ID
Authorizations:
read:workout
path Parameters
workoutId required | integer <int64> ID of the workout to retrieve |
Responses
Response samples
- 200
{- "id": 1043,
- "user_id": 9012,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "start": "2022-04-24T02:25:44.774Z",
- "end": "2022-04-24T10:25:44.774Z",
- "timezone_offset": "-05:00",
- "sport_id": 1,
- "score_state": "SCORED",
- "score": {
- "strain": 8.2463,
- "average_heart_rate": 123,
- "max_heart_rate": 146,
- "kilojoule": 1569.34033203125,
- "percent_recorded": 100,
- "distance_meter": 1772.77035916,
- "altitude_gain_meter": 46.64384460449,
- "altitude_change_meter": -0.781372010707855,
- "zone_duration": {
- "zone_zero_milli": 13458,
- "zone_one_milli": 389370,
- "zone_two_milli": 388367,
- "zone_three_milli": 71137,
- "zone_four_milli": 0,
- "zone_five_milli": 0
}
}
}
getWorkoutCollection
Get all workouts for a user, paginated. Results are sorted by start time in descending order.
Authorizations:
read:workout
query Parameters
limit | integer <int32> <= 25 Default: 10 Limit on the number of workouts returned |
start | string <date-time> Return workouts that occurred after or during (inclusive) this time. If not specified, the response will not filter workouts by a minimum time. |
end | string <date-time> Return workouts that intersect this time or ended before (exclusive) this time. If not specified, |
nextToken | string Optional next token from the previous response to get the next page. If not provided, the first page in the collection is returned |
Responses
Response samples
- 200
{- "records": [
- {
- "id": 1043,
- "user_id": 9012,
- "created_at": "2022-04-24T11:25:44.774Z",
- "updated_at": "2022-04-24T14:25:44.774Z",
- "start": "2022-04-24T02:25:44.774Z",
- "end": "2022-04-24T10:25:44.774Z",
- "timezone_offset": "-05:00",
- "sport_id": 1,
- "score_state": "SCORED",
- "score": {
- "strain": 8.2463,
- "average_heart_rate": 123,
- "max_heart_rate": 146,
- "kilojoule": 1569.34033203125,
- "percent_recorded": 100,
- "distance_meter": 1772.77035916,
- "altitude_gain_meter": 46.64384460449,
- "altitude_change_meter": -0.781372010707855,
- "zone_duration": {
- "zone_zero_milli": 13458,
- "zone_one_milli": 389370,
- "zone_two_milli": 388367,
- "zone_three_milli": 71137,
- "zone_four_milli": 0,
- "zone_five_milli": 0
}
}
}
], - "next_token": "MTIzOjEyMzEyMw"
}