Update User Profile
const url = 'https://indepai.app/api/v1/user/profile';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"fullName":"John Doe","displayName":"example","avatarUrl":"https://example.com","birthYear":1990,"baseCurrency":"EUR","countryCode":"DE","city":"Berlin","currentCitySlug":"berlin-germany","timezone":"Europe/Berlin","annualIncome":80000,"annualExpenses":40000,"monthlyPassiveIncome":500,"currentSavings":200000,"fireType":"traditional","riskTolerance":"conservative","targetFIAge":45,"lifestyleCreepRate":0.02,"estimatePolicy":"estimateOnly","derivePassiveFromDividends":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://indepai.app/api/v1/user/profile \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "fullName": "John Doe", "displayName": "example", "avatarUrl": "https://example.com", "birthYear": 1990, "baseCurrency": "EUR", "countryCode": "DE", "city": "Berlin", "currentCitySlug": "berlin-germany", "timezone": "Europe/Berlin", "annualIncome": 80000, "annualExpenses": 40000, "monthlyPassiveIncome": 500, "currentSavings": 200000, "fireType": "traditional", "riskTolerance": "conservative", "targetFIAge": 45, "lifestyleCreepRate": 0.02, "estimatePolicy": "estimateOnly", "derivePassiveFromDividends": false }'Update the authenticated user’s profile
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
User’s full name
Example
John DoeDisplay name (alias for fullName)
Profile picture URL
Birth year
Example
1990Preferred base currency
Example
EURCountry code (ISO 3166-1 alpha-2)
Example
DECity of residence
Example
BerlinSlug FK to numbeo_data for geo-arbitrage
Example
berlin-germanyTimezone
Example
Europe/BerlinAnnual income after tax
Example
80000Annual expenses
Example
40000Monthly passive income (dividends, rental, interest)
Example
500Current savings/net worth
Example
200000Preferred FIRE strategy type
Example
traditionalInvestment risk tolerance level
Example
moderateTarget age to reach FI
Example
45Real annual spending growth above inflation (lifestyle creep); 0 = off
Example
0.02How the self-reported estimate (current_savings) combines with tracked holdings for net worth: holdingsAugment (estimate counts only as the ‘Other’ excess above holdings — default), holdingsOnly (ignore the estimate), or estimateOnly (net worth is the estimate).
Example
holdingsAugmentOpt-in (default false): when true, the FI-Score augments monthly passive income with the forward-DIVIDEND projection from tracked holdings (dividends only — no double-count with the trigger-maintained monthly_passive_income).
Example
falseResponses
Section titled “Responses”Profile updated
object
object
User ID
User email
User’s full name
Profile picture URL
Current subscription tier
Subscription status
Trial end date (if applicable)
Current billing period end date
Account creation date
Last profile update
object
Timestamp in ISO 8601 format
Example
{ "success": true, "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "email": "user@example.com", "fullName": "John Doe", "subscriptionTier": "free", "subscriptionStatus": "active", "trialEndsAt": "2024-01-15T10:30:00Z", "currentPeriodEnd": "2024-01-15T10:30:00Z", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }, "meta": { "timestamp": "2024-01-15T10:30:00Z" }}Validation error
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Unauthorized
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}