Sorry to hear you're having trouble! Apologies for the inconvenience.
It is currently not possible to edit the functional role through the API. However, I have entered an enhancement request with you as the requestor to have that added.
The default functional role has always been applied to new users and, unfortunately, we do not plan to change that in the near future.