Users

Reset user password

Changed on

Resets the password for a user identified by email. Protected by resetPasswordMiddleware (validates reset token/permission). Password is hashed via bcrypt before storage.

post/users/reset-password

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/users/reset-password
  • Auth
    none declared

Request body

emailstring email required
newPasswordstring password required

Must be 8+ chars with uppercase, lowercase, and digit

Example request

{
  "email": "user@example.com",
  "newPassword": "NewSecure123!"
}

Response

Password reset successfully

messagestring

Example response

{
  "message": "Accepted",
  "data": {
    "id": 1,
    "name": "John",
    "surname": "Doe",
    "email": "john@example.com",
    "role_id": 1,
    "organization_id": 1
  }
}

Changes

    • breaking

      the response property / became nullable for the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      api operation id resetPassword was added

    • info

      api tag Users added

    • info

      api tag Users - Password removed