Good day Anna.
Is this a one-time add, or are you intending to this programmatically (as in a daily/weekly/monthly update)?
If the former, have you looked at the tabcmd tool from Tableau? It will allow you to create groups, and import users via CVS file, as well as some other neat stuff:
I've worked a little bit with the REST API calls using Python scripting. What you're describing is possible in the API. Which may not answer your question.