Custom API for user registration

Is it feasible to create a custom API in Frappe for user registration using email and password? I’m looking for guidance on implementing this functionality for a mobile application with Frappe as the backend. Furthermore, I would like to generate an API token/secret for subsequent API calls. Could someone please offer a detailed example for achieving this?