Change Password
Authentication
Change Password
Change the password for the authenticated account
POST
Change Password
Endpoint
http://localhost:3000/api/v1
This endpoint requires Bearer authentication.
Authentication
Include the access token in the Authorization header:- Job Seekers
- Companies
Request Body
string
required
The current password for the authenticated account.
string
required
The new password to set. Minimum 6 characters.
Request Shape
Example Request
Response
Success Response (200 OK)
Response Notes
Current Implementation Detail: The success payload depends on the account type and repository
implementation. Treat the success status and message as the primary confirmation that the password
was changed.
What Happens
1
Find User
The backend looks up the authenticated account in both job seeker and company tables.
2
Verify Current Password
The provided
currentPassword is compared against the stored password hash.3
Hash New Password
The new password is hashed before it is saved.
4
Update Password
The backend updates the password for the authenticated account.
Error Responses
400 Bad Request - Validation Error
401 Unauthorized - Not Authenticated
401 Unauthorized - Current Password Is Incorrect
404 Not Found - User Not Found
500 Internal Server Error
Validation Rules
Related Endpoints
- Login - Sign in with the new password after changing it
- Forgot Password - Use OTP-based recovery if the current password is unknown
- Logout - End the current session
