Change Password API
Welcome to the documentation for the Change Password API. This API helps user's change their password to a new one.
Base URL
{baseURL}/v1/users/change-password | PUT
Authorization
Include the following Authorization header in your HTTP requests using a Bearer token:
Authorization: Bearer YOUR_ACCESS_TOKEN
Request Payload
Field | Type | Source | Required | Description |
---|---|---|---|---|
user_id | string | body | ✅ Yes | User's ID |
new_password | string | body | ✅ Yes | User's new password |
old_password | string | body | ✅ Yes | User's old password |
confirm_password | string | body | ✅ Yes | Confirm new password |
Sample Request
curl -X PUT {baseURL}/v1/users/change-password \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"user_id": "64f474b96eebd8d8308bb3a3",
"new_password": "user1234567",
"old_password": "user123456",
"confirm_password": "user1234567"
}'
Sample 200 Response
{
"message": "Password changed successfully",
"success": true
}