How to create custom registration and login by using REST api in Hippo CMS

We are trying to use REST api for front end user registration and login forms for which we are unable to create a new document type and create documents for each user in hippo CMS. Can you please help me in providing the steps on how to use REST api for creating and updating the document.