Skip to main content
Update user information such as email or password.
Requires a valid authentication token in the AUTH header.

Headers

AUTH
string
required
Authentication token (JWT) obtained from the /auth/login endpoint

Request Body

email
string
required
The new email address of the user
password
string
required
The new password for the account

Example Request

curl -X PUT "https://api.example.com/users/me" \
  -H "Content-Type: application/json" \
  -H "AUTH: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -d '{
    "email": "[email protected]",
    "password": "NewPass456!"
  }'

Example Response

{
  "id": "123456789",
  "email": "[email protected]",
  "role": "user"
}

Success Response

StatusDescription
200User updated successfully

Error Responses

StatusDescriptionExample
400Invalid input{ "detail": "Invalid input format." }
401Invalid or missing token{ "detail": "Unauthorized: Invalid or expired token." }
403Account not validated{ "detail": "Forbidden: Account is not validated yet." }