Skip to main content
POST
/
api
/
v1
/
providers
/
{provider}
/
users
/
{user_id}
/
sync
Sync User Data
curl --request POST \
  --url https://api.example.com/api/v1/providers/{provider}/users/{user_id}/sync \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.example.com/api/v1/providers/{provider}/users/{user_id}/sync"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.example.com/api/v1/providers/{provider}/users/{user_id}/sync', 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/providers/{provider}/users/{user_id}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/providers/{provider}/users/{user_id}/sync"

req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/v1/providers/{provider}/users/{user_id}/sync")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/providers/{provider}/users/{user_id}/sync")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Open-Wearables-API-Key
string | null

Path Parameters

provider
enum<string>
required

Data provider

Available options:
apple,
samsung,
google,
garmin,
polar,
suunto,
whoop,
strava,
oura,
fitbit,
ultrahuman,
unknown,
internal
user_id
string<uuid>
required

Query Parameters

data_type
enum<string>
default:all

Type of data to sync: workouts, 247 (sleep/recovery/activity), or all

Available options:
workouts,
247,
all
since
integer
default:0

Unix timestamp to synchronize data since (0 = all, Suunto only)

limit
integer
default:50

Maximum number of items (Suunto: max 100)

Required range: x <= 100
offset
integer
default:0

Offset for pagination (Suunto only)

filter_by_modification_time
boolean
default:true

Filter by modification time instead of creation time (Suunto only)

samples
boolean
default:false

Synchronize sample data (Polar only)

zones
boolean
default:false

Synchronize zones data (Polar only)

route
boolean
default:false

Synchronize route data (Polar only)

summary_start_time
string | null

Activity start time as Unix timestamp or ISO 8601 date (Garmin only)

summary_end_time
string | null

Activity end time as Unix timestamp or ISO 8601 date (Garmin only)

async
boolean
default:true

Run sync asynchronously via Celery (default: true). Set false for sync.

Response

Successful Response

{key}