Update Profile
Profile
Update Profile
Create or update the authenticated user’s profile with fitness goals, body metrics, dietary preferences, and nutritional targets
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_weightfloat
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, obesestring
required
User’s genderAllowed values:
male, femaleinteger
required
Number of meals per dayConstraints: Must be between 1 and 6
string
required
User’s physical activity levelAllowed values:
low, medium, highstring
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:[]
array
default:[]
array
default:[]
List of user’s diet type preferencesAllowed values:
high_protein, low_carb, vegan, vegetarian, low_calorie, high_fiber, high_carbResponse
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
tastesandrestrictionsarrays are automatically converted to lowercase - The
birth_dateis validated to ensure the user is between 16 and 100 years old - Diet types must be one of the predefined enum values
