/api/user/profile
Requires authentication.
string
required
Bearer token obtained from
/api/auth/login or /api/auth/signup. Format: Bearer <token>.Request body
All fields are optional. Only the fields you include will be updated.string
New display name for the user.
string
URL of the new profile picture.
string
New email address. Must not be in use by another account.
string
New password to set for the account.
To change the password, provide
newPassword. The authenticated JWT is used as the primary
authorization check — no currentPassword field is required by the current implementation.Example
Response
200 OK Returns the full updated user profile, including the current email.string
required
Unique identifier for the user.
string
required
The user’s display name.
string
required
The user’s current email address.
string
URL of the user’s profile picture.
null if not set.number
required
Total habit points accumulated.
number
required
Current consecutive days with at least one completed habit.
number
required
All-time highest streak.
string
required
ISO 8601 timestamp of when the account was created.
string
required
ISO 8601 timestamp of the most recent profile update.
Example response