The workout endpoints let an authenticated user log, edit, and remove individual workout entries. Every entry records a single exercise performed with a specific number of sets, reps, and optional weight. The server always sets the timestamp to the moment of creation — clients cannot supply a custom date. All three endpoints require a valid JWT. See Authentication for how to obtain a token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Lokhy87/gymApp/llms.txt
Use this file to discover all available pages before exploring further.
Create a workout
Logs a new workout entry for the authenticated user.POST /api/workouts
The ID of the exercise performed. Must match an existing exercise from
GET /api/exercises.Number of sets completed.
Number of repetitions per set.
Weight used in kilograms (or any consistent unit). Defaults to
0 if omitted.Optional free-text notes about the set (e.g. form cues, perceived effort).
Confirmation string. Always
"Workout created successfully" on success.The auto-generated ID of the new workout entry. Use this to update or delete the entry later.
| Status | Meaning |
|---|---|
400 | Request body is not valid JSON, or exercise_id, sets, or reps is missing. |
401 | Missing or invalid Bearer token. |
404 | No exercise found with the given exercise_id. |
Update a workout
Updates one or more fields of an existing workout entry. Only the entry’s owner may update it. All fields are optional; omitted fields retain their current values.PUT /api/workouts/{id}
The ID of the workout entry to update, as returned by
POST /api/workouts.Updated number of sets.
Updated number of repetitions.
Updated weight value.
Updated comments.
Confirmation string. Always
"Workout updated" on success.| Status | Meaning |
|---|---|
401 | Missing or invalid Bearer token. |
403 | The workout exists but was created by a different user. |
404 | No workout found with the given id. |
Delete a workout
Permanently removes a workout entry. Only the entry’s owner may delete it.DELETE /api/workouts/{id}
The ID of the workout entry to delete.
Confirmation string. Always
"Workout deleted" on success.| Status | Meaning |
|---|---|
401 | Missing or invalid Bearer token. |
403 | The workout exists but was created by a different user. |
404 | No workout found with the given id. |