Record a metric
/v1/athletes/{athlete_id}/metricsrequires metrics.writeRecord a threshold, body measurement or wellness reading.
Units follow the type: watts for power, kilograms for weight, bpm for heart rate, seconds per kilometre for pace. timestamp defaults to now; set it to backdate a reading, which is what you want when importing history.
Path parameters
athlete_idstringrequiredThe athlete to act on. `me` is the athlete who authorized this token; any other ID must be an athlete they coach.
Example
curl -X POST "https://api.stride.is/v1/athletes/{athlete_id}/metrics" \
-H "Authorization: Bearer $STRIDE_TOKEN" \
-H "Content-Type: application/json" \
-d '{ }'Response 201
Created. The Location header points at the new resource.
sourcestringWhere the reading came from, e.g. the provider that reported it or MANUAL when the athlete entered it.
timestampstringWhen the reading was taken.
typestringalways presentThe metric, e.g. FTP, WEIGHT, THRESHOLD_HEART_RATE.
valuenumberalways presentThe reading. Units follow the type: watts for power, kilograms for weight, bpm for heart rate, seconds per kilometre for pace.
Errors
Every error is an RFC 9457 problem document. Branch on its code, 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.422The request was understood but could not be carried out: most often an upload that produced no activity.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.