Change Password

POST /accounts/change-password

Changes the authenticated user's password.

Authentication: Bearer token required (Authorization: Bearer <token>)


Request

Request Body

{
  "username": "example_user",
  "oldPassword": "examplePassword123",
  "newPassword": "newSecurePassword456"
}
Field
Type
Required
Description

username

string

Yes

The account username

oldPassword

string

Yes

The current password

newPassword

string

Yes

The new password to set


Response

Success Response

Status: 200 OK

Error Responses

Status
Description

401 Unauthorized

Invalid credentials or missing token

500 Internal Server Error

Unexpected server failure

Was this helpful?