Record a weight measurement
POST
/api/v1/athlete/weights
const url = 'http://localhost:8080/api/v1/athlete/weights';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"weight":71.4,"on":"2026-09-08"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/athlete/weights \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "weight": 71.4, "on": "2026-09-08" }'Creates a weight measurement for a calendar date, or replaces the existing measurement for that date.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
weight
required
The measurement in the configured Appearance unit system: kilograms for Metric and pounds for Imperial.
number
on
required
The measurement date as YYYY-MM-DD.
string format: date
Responses
Section titled “Responses”The measurement for the date was recorded.
Media typeapplication/json
object
on
required
string format: date
weight
required
The measurement in the configured Appearance unit system: kilograms for Metric and pounds for Imperial.
number
Examplegenerated
{ "on": "2026-04-15", "weight": 1}The JSON body, date, or weight is invalid.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Example
{ "error": "invalid_token"}The Authorization header was missing, malformed, or did not match the configured key.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Examples
ExampleinvalidToken
{ "error": "invalid_token", "message": "A valid API token is required. Send it in the Authorization header as a Bearer token."}Headers
Section titled “Headers”WWW-Authenticate
string
The body was not application/json.
Media typeapplication/json
Every error uses this shape.
object
error
required
A stable, machine readable code.
string
message
required
string
Example
{ "error": "invalid_token"}