Skip to main content
PUT
Update Profile

Authentication

This endpoint requires authentication. Include a valid JWT token in the Authorization header:

Request Body

string
required
User’s fitness goalAllowed values: lose_weight, maintain_weight, gain_weight
float
required
User’s height in centimetersConstraints: Must be between 140 and 220 cm
float
required
User’s weight in kilogramsConstraints: Must be between 35 and 300 kg
string
required
User’s body typeAllowed values: lean, normal, stocky, obese
string
required
User’s genderAllowed values: male, female
integer
required
Number of meals per dayConstraints: Must be between 1 and 6
string
required
User’s physical activity levelAllowed values: low, medium, high
string
required
User’s birth date in ISO format (YYYY-MM-DD)Constraints: User must be between 16 and 100 years old
float
User’s body fat percentageConstraints: Must be >= 0.0
float
User’s daily calorie targetConstraints: Must be >= 0.0
float
User’s daily protein target in gramsConstraints: Must be >= 0.0
float
User’s daily carbohydrate target in gramsConstraints: Must be >= 0.0
float
User’s daily fat target in gramsConstraints: Must be >= 0.0
array
default:[]
List of user’s taste preferences
integer
ID of existing taste category (optional for updates)
string
required
Name of the taste category (will be converted to lowercase)
array
default:[]
List of user’s dietary restrictions
integer
ID of existing restriction category (optional for updates)
string
required
Name of the restriction (will be converted to lowercase)
array
default:[]
List of user’s diet type preferencesAllowed values: high_protein, low_carb, vegan, vegetarian, low_calorie, high_fiber, high_carb

Response

Returns the complete profile object with the same structure as the Get Profile endpoint.
integer
required
Profile ID
integer
required
Associated User ID
string
required
User’s fitness goal
float
required
User’s height in centimeters
float
required
User’s weight in kilograms
string
required
User’s body type
string
required
User’s gender
integer
required
Number of meals per day
string
required
User’s activity level
string
required
User’s birth date
float
User’s body fat percentage
float
User’s target calories
float
User’s target protein in grams
float
User’s target carbs in grams
float
User’s target fat in grams
array
List of taste preferences
array
List of dietary restrictions
array
List of diet types

Example Request

Example Response

Error Responses

error
Validation error - invalid field values
error
Authentication token is missing or invalid

Notes

  • This endpoint performs an upsert operation - it will create a new profile if one doesn’t exist, or update the existing profile
  • All names in tastes and restrictions arrays are automatically converted to lowercase
  • The birth_date is validated to ensure the user is between 16 and 100 years old
  • Diet types must be one of the predefined enum values