Update an activity
/v1/activities/{activity_id}requires activities.writeChange an activity's name, description, sport, prescribed workout, or the athlete's own subjective ratings (rpe 1-10 and feel 1-5).
workout_id attaches a library workout's intervals and replaces any already attached; clear_workout: true removes them. Only the fields you send are changed. This does not alter recorded data: to correct what was recorded, upload a corrected file.
Path parameters
activity_idstringrequiredThe activity ID, e.g. `act_2f...`. The owner is resolved from it.
Example
curl -X PATCH "https://api.stride.is/v1/activities/{activity_id}" \
-H "Authorization: Bearer $STRIDE_TOKEN" \
-H "Content-Type: application/json" \
-d '{ }'Response200
Success.
ascent_metersintegerTotal climbing in metres. A value the athlete entered wins over the recorded one.
avg_heart_rateintegerAverage heart rate in bpm: the plain mean of the recording, sensor dropouts excluded. For a session synced without a file, the average its provider reported.
avg_power_wattsintegerAverage power in watts, where a power meter was recording.
descriptionstringdistance_metersintegerDistance covered in metres. A value the athlete entered wins over the recorded one.
duration_secondsintegerTotal elapsed time in seconds. Present once the session is completed, whether recorded or entered by hand; a value the athlete entered wins over the recorded one.
feelintegerHow the session felt to the athlete, 1 (terrible) to 5 (great).
has_workoutbooleanTrue when a structured workout, with intervals, is prescribed for the session. A planned session without one is a placeholder that sends no intervals to the athlete's devices.
idstringalways presentkilojoulesintegerMechanical work done in kilojoules, from a power meter. Absent without one.
moving_time_secondsintegerTime spent moving in seconds, pauses excluded. Present once the session is completed, whether recorded or entered by hand; a value the athlete entered wins over the recorded one.
namestringplanned_atstringWhen the session is planned for, in the athlete's local wall-clock time with a Z suffix, on the same terms as started_at. Absent for an unplanned session.
planned_avg_power_wattsintegerPlanned average power in watts: the plain time-weighted mean, not normalised power. For a structured ride it is read from the intervals against the athlete's FTP on the day; otherwise it is what the coach entered, or derived from planned work and duration.
planned_distance_metersintegerPlanned distance in metres.
planned_duration_secondsintegerPlanned duration in seconds.
planned_intensitynumberPlanned intensity as a fraction of threshold, e.g. 0.75.
planned_kilojoulesintegerPlanned mechanical work in kilojoules. For a structured ride it is the sum of every interval's power times its duration; otherwise it is what the coach entered, or derived from planned average power and duration. Always consistent with planned_avg_power_watts x planned_duration_seconds / 1000, to rounding.
planned_pace_seconds_per_kmnumberPlanned pace in seconds per kilometre.
planned_training_scoreintegerPlanned training load for the session.
recording_withheldbooleanTrue when the session was completed but its recording came from Garmin Connect, which Stride may not share with other apps. The planned fields are present; the recorded ones are absent.
rpeintegerThe athlete's rate of perceived exertion, 1 (easy) to 10 (maximal).
sourcestringWhere the recording came from, e.g. GARMIN, WAHOO, STRIDE. STRIDE means the Stride app recorded it.
started_atstringWhen the session started, in the athlete's local wall-clock time with a Z suffix. This is NOT a UTC instant: read the athlete's timezone from the athlete endpoint to interpret it. Absent for a session that has not happened yet.
training_scoreintegerTraining load of the completed session, scored against the athlete's thresholds on the day. Absent for a session that has not happened.
typestringalways presentThe sport, e.g. RIDE, RUN, SWIM.
weighted_heart_rateintegerHeart rate in bpm, weighted towards the harder parts of the session rather than a flat average.
Errors
Every error is an RFC 9457 problem document. Branch on itscode, which is stable;detail is prose and may be reworded.
400The request was malformed: an unparseable date, an unknown enum value, or a parameter combination that cannot be satisfied.401No access token was supplied, or it is not valid for this API.402The Stride account the token belongs to has no active subscription or trial.403The token does not hold the scope this endpoint requires, or may not act on the athlete or team named.404No such resource, or it is not visible to this token. The two are deliberately indistinguishable.405The path exists but does not serve this method. The Allow header lists the ones it does.429A rate limit was exceeded. Retry after the period in the Retry-After header.500Something failed on Stride's side. The failure is logged with a trace ID.