> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quader864.ir/llms.txt
> Use this file to discover all available pages before exploring further.

# Change password

> Change password for authenticated users

<Note>
  This endpoint requires authentication. Include your JWT token in the request.
</Note>

## Request body

<ParamField body="currentPassword" type="string" required>
  User's current password
</ParamField>

<ParamField body="newPassword" type="string" required>
  New password (minimum 8 characters)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the password change was successful
</ResponseField>

<ResponseField name="message" type="string">
  Success or error message
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api-verifier-2.onrender.com/password-change \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <your-token>" \
    -d '{
      "currentPassword": "oldpassword123",
      "newPassword": "newpassword456"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Password changed successfully"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "New password must be different from current password"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Current password is incorrect"
  }
  ```
</ResponseExample>
