curl --request GET \
--url https://api.example.com/api/v1/users/{user_id}/events/workouts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/users/{user_id}/events/workouts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/users/{user_id}/events/workouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/{user_id}/events/workouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/{user_id}/events/workouts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/users/{user_id}/events/workouts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/{user_id}/events/workouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"source": {
"provider": "apple",
"device_name": "<string>",
"source": "Connect",
"device": "iPhone15,2",
"device_type": "phone"
},
"name": "Morning Run",
"zone_offset": "<string>",
"duration_seconds": 123,
"entry_source": "automatic",
"intensity": "moderate",
"calories_kcal": 123,
"distance_meters": 123,
"avg_heart_rate_bpm": 123,
"max_heart_rate_bpm": 123,
"avg_pace_sec_per_km": 123,
"elevation_gain_meters": 123,
"heart_rate_min": 123,
"steps_count": 123,
"average_speed": 123,
"max_speed": 123,
"average_cadence": 123,
"average_watts": 123,
"max_watts": 123,
"moving_time_seconds": 123,
"elev_high": 123,
"elev_low": 123,
"hr_zones": {
"zones": [
{
"zone": 123,
"seconds": 123,
"max_bpm": 123
}
],
"max_hr": 123,
"threshold_hr": 123
},
"power_zones": {
"zones": [
{
"zone": 123,
"seconds": 123,
"max_watts": 123
}
],
"ftp_watts": 123
},
"segments": [
{}
]
}
],
"pagination": {
"has_more": true,
"next_cursor": "eyJpZCI6IjEyMzQ1Njc4OTAiLCJ0cyI6MTcwNDA2NzIwMH0",
"previous_cursor": "<string>",
"total_count": 150
},
"metadata": {
"resolution": "raw",
"sample_count": 123,
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}List Workouts
Returns workout sessions.
curl --request GET \
--url https://api.example.com/api/v1/users/{user_id}/events/workouts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/users/{user_id}/events/workouts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/users/{user_id}/events/workouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/{user_id}/events/workouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/{user_id}/events/workouts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/users/{user_id}/events/workouts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/{user_id}/events/workouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z",
"source": {
"provider": "apple",
"device_name": "<string>",
"source": "Connect",
"device": "iPhone15,2",
"device_type": "phone"
},
"name": "Morning Run",
"zone_offset": "<string>",
"duration_seconds": 123,
"entry_source": "automatic",
"intensity": "moderate",
"calories_kcal": 123,
"distance_meters": 123,
"avg_heart_rate_bpm": 123,
"max_heart_rate_bpm": 123,
"avg_pace_sec_per_km": 123,
"elevation_gain_meters": 123,
"heart_rate_min": 123,
"steps_count": 123,
"average_speed": 123,
"max_speed": 123,
"average_cadence": 123,
"average_watts": 123,
"max_watts": 123,
"moving_time_seconds": 123,
"elev_high": 123,
"elev_low": 123,
"hr_zones": {
"zones": [
{
"zone": 123,
"seconds": 123,
"max_bpm": 123
}
],
"max_hr": 123,
"threshold_hr": 123
},
"power_zones": {
"zones": [
{
"zone": 123,
"seconds": 123,
"max_watts": 123
}
],
"ftp_watts": 123
},
"segments": [
{}
]
}
],
"pagination": {
"has_more": true,
"next_cursor": "eyJpZCI6IjEyMzQ1Njc4OTAiLCJ0cyI6MTcwNDA2NzIwMH0",
"previous_cursor": "<string>",
"total_count": 150
},
"metadata": {
"resolution": "raw",
"sample_count": 123,
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Path Parameters
Query Parameters
ISO 8601 datetime (e.g. 2023-11-07T05:31:56Z) or Unix timestamp in seconds. Date-only strings (e.g. 2023-11-07) are also accepted and cover the whole day, so a date-only range includes both boundary days.
"2023-11-07T05:31:56Z"
"2023-11-07"
ISO 8601 datetime (e.g. 2023-11-07T05:31:56Z) or Unix timestamp in seconds. Date-only strings (e.g. 2023-11-07) are also accepted and cover the whole day, so a date-only range includes both boundary days.
"2023-11-07T05:31:56Z"
"2023-11-07"
Optional expansions for workout read models, requested via the include query parameter.
zones, segments Exact normalized workout type. Unlike record_type, does not substring-match.
Unified workout/activity types for Polar, Suunto, and Garmin.
Based on FIT SDK sport types and common activities across platforms. Excludes branded/niche activities (e.g., LES MILLS classes, specific dance types).
running, trail_running, treadmill, walking, hiking, mountaineering, cycling, mountain_biking, indoor_cycling, cyclocross, swimming, pool_swimming, open_water_swimming, strength_training, cardio_training, fitness_equipment, elliptical, rowing_machine, stair_climbing, yoga, pilates, stretching, meditation, cross_country_skiing, alpine_skiing, backcountry_skiing, downhill_skiing, snowboarding, snowshoeing, ice_skating, snowmobiling, winter_sports, snow_sports, rowing, kayaking, canoeing, paddling, stand_up_paddleboarding, surfing, kitesurfing, windsurfing, sailing, water_polo, wakeboarding, water_skiing, boating, water_sports, soccer, basketball, football, american_football, baseball, tennis, badminton, volleyball, handball, rugby, hockey, floorball, lacrosse, cricket, squash, table_tennis, padel, pickleball, racquetball, racket_sports, boxing, martial_arts, wrestling, fencing, rock_climbing, indoor_climbing, bouldering, trail_hiking, orienteering, archery, fishing, hunting, paragliding, parkour, golf, skating, inline_skating, skateboarding, horseback_riding, gymnastics, bowling, curling, disc_sports, triathlon, multisport, motorcycling, motor_sports, dance, aerobics, group_exercise, e_biking, virtual_activity, diving, snorkeling, walking_fitness, casual_walking, transition, team_sports, para_sports, play, wheelchair, recovery, gaming, chores, lifestyle, work, operations, generic, other, sport 1 <= x <= 1000Supported data providers.
apple, samsung, garmin, health_connect, google_health, polar, suunto, whoop, strava, oura, fitbit, ultrahuman, sensorbio, withings, unknown, internal Was this page helpful?

