Users
Change password (authenticated)
Changes the password for the authenticated user. Requires the current password for verification. Protected by selfOnly middleware (users can only change their own password). Rate-limited.
patch/users/chng-pass/{id}
Path parameters
idinteger required
User ID (must match authenticated user via selfOnly middleware)
Request body
Example request
{
"id": 1,
"currentPassword": "OldPassword123!",
"newPassword": "NewPassword456!"
}Response
Password changed successfully
Example response
{
"message": "Password updated successfully",
"data": {
"id": 1,
"name": "John",
"surname": "Doe",
"email": "john@example.com",
"role_id": 1,
"organization_id": 1
}
}