How to create users while registering with different roles via API?

This fix will be in the next release version 2.1.1. It will available around mid March.