Skip to main content

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.

The /api/me endpoints let an authenticated user read and update their own profile. Both routes scope to the identity encoded in the Bearer token, so no user ID is required in the path. All requests to these endpoints require a valid JWT. See Authentication for how to obtain a token.

Get current user

Returns the profile of the user identified by the Bearer token. GET /api/me Example request
curl https://api.gymflow.example/api/me \
  -H "Authorization: Bearer <your_token>"
Example response — 200 OK
{
  "id": 42,
  "email": "alex@example.com",
  "username": "alex",
  "location": "Barcelona",
  "name": "alex"
}
id
integer
Auto-generated primary key for the user.
email
string
The email address used to log in and identify the account.
username
string
The user’s display name.
location
string
The user’s location string.
name
string
The user’s full name. Set to the value of username at registration time unless subsequently updated.
Error responses
StatusMeaning
401Missing or invalid Bearer token.

Update current user

Updates one or more profile fields for the authenticated user. All fields are optional; omitted fields retain their current values. PUT /api/me
name
string
Full name to display on the profile.
username
string
Display name / handle.
email
string
Email address. This also updates the login identifier.
location
string
Location string.
Example request
curl -X PUT https://api.gymflow.example/api/me \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alexandra",
    "location": "Madrid"
  }'
Example response — 200 OK
{
  "message": "Profile updated",
  "user": {
    "name": "Alexandra",
    "username": "alex",
    "email": "alex@example.com",
    "location": "Madrid"
  }
}
message
string
Confirmation string. Always "Profile updated" on success.
user
object
The updated profile fields.
user.name
string
Updated full name.
user.username
string
Updated display name.
user.email
string
Updated email address.
user.location
string
Updated location.
Error responses
StatusMeaning
401Missing or invalid Bearer token.

Build docs developers (and LLMs) love