> ## Documentation Index
> Fetch the complete documentation index at: https://replyke-feat-push-rich-payload-fields.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Password

> Change the password for an authenticated user

Allows an authenticated user to change their password by verifying the current password and setting a new one.

## Body Parameters

<ParamField body="password" type="string" required>
  The user's current password for verification
</ParamField>

<ParamField body="newPassword" type="string" required>
  The new password to set (will be securely hashed)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates whether the password was changed successfully
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message
</ResponseField>

## Error Responses

<AccordionGroup>
  <Accordion title="Missing Fields - 400 Bad Request">
    ```json theme={null}
    {
      "error": "Email, password, and a new password are all required.",
      "code": "auth/missing-fields"
    }
    ```
  </Accordion>

  <Accordion title="User Not Found - 403 Forbidden">
    ```json theme={null}
    {
      "error": "User not found.",
      "code": "auth/no-user-found"
    }
    ```
  </Accordion>

  <Accordion title="User Not Password Authenticated - 400 Bad Request">
    ```json theme={null}
    {
      "error": "User is not authenticated with email and password.",
      "code": "auth/not-password-authenticated"
    }
    ```
  </Accordion>

  <Accordion title="Incorrect Password - 401 Unauthorized">
    ```json theme={null}
    {
      "error": "Incorrect password.",
      "code": "auth/wrong-password"
    }
    ```
  </Accordion>

  <Accordion title="Server Error - 500 Internal Server Error">
    ```json theme={null}
    {
      "error": "Internal server error.",
      "code": "auth/server-error",
      "details": "<Error message>"
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Notes

* Only users authenticated via email and password can change their password.
* The current password must be correct.
* New password is hashed and stored securely.
