Skip to main content
POST
Create activity

Authorizations

Authorization
string
header
required

OAuth bearer token for Health API authentication

Path Parameters

user_id
string
required

User ID (e.g., google_104940819145861640201)

Body

application/json

Activity creation data

type
enum<string>
required

Type of activity

Available options:
workout
start_datetime
string<date-time>
required

Start time of the workout in ISO 8601 format

end_datetime
string<date-time>
required

End time of the workout in ISO 8601 format

data_source
string
required

Source of the workout data

duration_seconds
integer
required

Duration of the workout in seconds

Required range: x >= 0
type_name
string
required

Name/type of the workout

tss
number<float>
required

Training Stress Score

created_at
string<date-time>
required

When the mindfulness activity was created

updated_at
string<date-time>
required

When the mindfulness activity was last updated

used_ftp
number<float>

Used Functional Threshold Power

guessed_ftp
number<float>

Estimated Functional Threshold Power

is_breakthrough_ftp
boolean

Whether this workout represents an FTP breakthrough

zone_power
string

Power zone distribution

normalized_power
number<float>

Normalized power for the workout

variability_index
number<float>

Variability index of power

intensity_factor
number<float>

Intensity factor

tss_power
number<float>

TSS calculated from power

average_hr
number<float>

Average heart rate

average_power
number<float>

Average power

zone_hr
string

Heart rate zone distribution

used_lthr
number<float>

Used Lactate Threshold Heart Rate

guessed_lthr
number<float>

Estimated Lactate Threshold Heart Rate

guessed_mhr
number<float>

Estimated Maximum Heart Rate

is_breakthrough_lthr
boolean

Whether this workout represents an LTHR breakthrough

tss_hr
number<float>

TSS calculated from heart rate

peak_duration_hr
number<float>

Time spent in peak heart rate zone

cardio_duration_hr
number<float>

Time spent in cardio heart rate zone

fatburn_duration_hr
number<float>

Time spent in fat burn heart rate zone

light_duration_hr
number<float>

Time spent in light heart rate zone

hr_series
string

Heart rate series data

hr_series_sampling_rate
string

Sampling rate for heart rate series

peak_threshold_hr
number<float>

Peak heart rate threshold

cardio_threshold_hr
number<float>

Cardio heart rate threshold

fatburn_threshold_hr
number<float>

Fat burn heart rate threshold

calories
number<float>

Calories burned during workout

max_hr
number<float>

Maximum heart rate during workout

hr_zone_durations_seconds
integer[]

Time spent in each heart rate zone (seconds)

hr_zone_thresholds
integer[]

Heart rate zone thresholds

power_zone_durations_seconds
integer[]

Time spent in each power zone (seconds)

power_zone_thresholds
integer[]

Power zone thresholds

activity_score_before
integer

Activity score before workout

activity_score_after
integer

Activity score after workout

group_id
integer

Group identifier for related workouts

selected
boolean

Whether this workout is selected for analysis

Response

Activity created successfully

project_id
string
required

Project identifier

user_id
string
required

User identifier

type
enum<string>
required

Type of activity

Available options:
workout
start_datetime
string<date-time>
required

Start time of the workout in ISO 8601 format

end_datetime
string<date-time>
required

End time of the workout in ISO 8601 format

data_source
string
required

Source of the workout data

duration_seconds
integer
required

Duration of the workout in seconds

Required range: x >= 0
type_name
string
required

Name/type of the workout

tss
number<float>
required

Training Stress Score

id
string

Unique identifier for the workout

used_ftp
number<float>

Used Functional Threshold Power

guessed_ftp
number<float>

Estimated Functional Threshold Power

is_breakthrough_ftp
boolean

Whether this workout represents an FTP breakthrough

zone_power
string

Power zone distribution

normalized_power
number<float>

Normalized power for the workout

variability_index
number<float>

Variability index of power

intensity_factor
number<float>

Intensity factor

tss_power
number<float>

TSS calculated from power

average_hr
number<float>

Average heart rate

average_power
number<float>

Average power

zone_hr
string

Heart rate zone distribution

used_lthr
number<float>

Used Lactate Threshold Heart Rate

guessed_lthr
number<float>

Estimated Lactate Threshold Heart Rate

guessed_mhr
number<float>

Estimated Maximum Heart Rate

is_breakthrough_lthr
boolean

Whether this workout represents an LTHR breakthrough

tss_hr
number<float>

TSS calculated from heart rate

peak_duration_hr
number<float>

Time spent in peak heart rate zone

cardio_duration_hr
number<float>

Time spent in cardio heart rate zone

fatburn_duration_hr
number<float>

Time spent in fat burn heart rate zone

light_duration_hr
number<float>

Time spent in light heart rate zone

hr_series
string

Heart rate series data

hr_series_sampling_rate
string

Sampling rate for heart rate series

peak_threshold_hr
number<float>

Peak heart rate threshold

cardio_threshold_hr
number<float>

Cardio heart rate threshold

fatburn_threshold_hr
number<float>

Fat burn heart rate threshold

calories
number<float>

Calories burned during workout

max_hr
number<float>

Maximum heart rate during workout

hr_zone_durations_seconds
integer[]

Time spent in each heart rate zone (seconds)

hr_zone_thresholds
integer[]

Heart rate zone thresholds

power_zone_durations_seconds
integer[]

Time spent in each power zone (seconds)

power_zone_thresholds
integer[]

Power zone thresholds

activity_score_before
integer

Activity score before workout

activity_score_after
integer

Activity score after workout

group_id
integer

Group identifier for related workouts

selected
boolean

Whether this workout is selected for analysis

created_at
string<date-time>

When the workout was created

updated_at
string<date-time>

When the workout was last updated