/api/user/profile
Requires authentication.
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.New display name for the user.
URL of the new profile picture.
New email address. Must not be in use by another account.
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.Unique identifier for the user.
The user’s display name.
The user’s current email address.
URL of the user’s profile picture.
null if not set.Total habit points accumulated.
Current consecutive days with at least one completed habit.
All-time highest streak.
ISO 8601 timestamp of when the account was created.
ISO 8601 timestamp of the most recent profile update.
Example response
Errors
| Status | Description |
|---|---|
400 | Supplied email is already in use by another account, or request body fails validation. |
401 | Missing, invalid, or expired token. |