Stride

Search Documentation

Search for articles, guides, and more

← API overview

Record a metric

POST/v1/athletes/{athlete_id}/metricsrequires metrics.write

Record a threshold, body measurement or wellness reading.

Units follow the type: watts for power, kilograms for weight and muscle mass, bpm for heart rate, seconds per kilometre for pace, mmHg for blood pressure (BLOOD_PRESSURE_SYSTOLIC and BLOOD_PRESSURE_DIASTOLIC, one reading each), percent (0-100) for body fat and SpO2, ml/kg/min for VO2max. timestamp defaults to now; set it to backdate a reading, which is what you want when importing history.

Path parameters

  • athlete_idstringrequired

    The athlete to act on. `me` is the athlete who authorized this token; any other ID must be an athlete they coach.

Example

bash
curl -X POST "https://api.stride.is/v1/athletes/{athlete_id}/metrics" \
  -H "Authorization: Bearer $STRIDE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ }'

Response201

Created. The Location header points at the new resource.

  • sourcestring

    Where the reading came from, e.g. the provider that reported it or MANUAL when the athlete entered it.

  • timestampstring

    When the reading was taken.

  • typestringalways present

    The metric, e.g. FTP, WEIGHT, THRESHOLD_HEART_RATE.

  • valuenumberalways present

    The reading. Units follow the type: watts for power, kilograms for weight and muscle mass, bpm for heart rate, seconds per kilometre for pace, mmHg for blood pressure (BLOOD_PRESSURE_SYSTOLIC and BLOOD_PRESSURE_DIASTOLIC, one reading each), percent (0-100) for body fat and SpO2, ml/kg/min for VO2max.

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.
  • 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.