Allows an authenticated employee to change their password. Requires the current password for verification.
Request
Add the parameter Authorization
to Headers Example:Authorization: ********************
or
Body Params application/jsonRequired
{
"currentPassword": "aB3xK9mP",
"newPassword": "MyNewSecurePass1"
}
Request Code Samples
curl --location --request POST '/auth/change-password' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"currentPassword": "aB3xK9mP",
"newPassword": "MyNewSecurePass1"
}'
Responses
application/json
Password changed successfully
{
"success": true,
"data": {
"id": "cm5emp001",
"name": "Jane Smith",
"email": "emp1@org.com"
},
"message": "Password changed successfully"
}
Modified at 2026-02-22 18:59:05