> For the complete documentation index, see [llms.txt](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/user/update-user-password-with-otp-code.md).

# Update User Password with OTP Code

The `PUT /user/set-new-password/` endpoint allows a user/mechanic to reset their password using an OTP (One-Time Password) code.

#### Parameters

| **Name**   | **Description**                                              | **Type**            | **Required** | **Example Value**  |
| ---------- | ------------------------------------------------------------ | ------------------- | ------------ | ------------------ |
| `data`     | Request body containing user information for password reset. | Object              | Yes          |                    |
| `email`    | The email address associated with the account.               | String              | Yes          | `user@example.com` |
| `otp_code` | The OTP code sent to the user for password verification.     | String (6 chars)    | Yes          | `123456`           |
| `password` | The new password for the user.                               | String (6-80 chars) | Yes          | `NewPassword123`   |

#### Response Content Type

**Code: 200**

* **Description**: Password successfully updated.
* **Example Response**:

```json
{
  "email": "user@example.com",
  "otp_code": "123456",
  "password": "NewPassword123"
}
```
