The Registration Code module is a rest resource that allows anonymous users to request for a code before create
a new account. The code will be received by email and you need to insert this code when creating the new
user account using this resource https://www.drupal.org/node/2291055.
This is useful when you want to prevent fake registrations from a headless or native app and you don't
want to use the link that redirects to the website.
Here is an example for the code request using json as format: