When using the route POST /rest/servicedesk/user as documented here, it seems to create a user and it's not possible to assign a specific project.
By looking the way the Atlassian front end does it, it seems to POST on /rest/servicedesk/1/pages/people/customers/pagination/<project>/invite with
{"emails":["<customer email>"]}This second method does precisely what we want as it can be called with API token, creates a user with the right permissions and returns success even if the customer already exists or is a Jira user.
Thus, is it safe to use the second method as it is not documented in the rest API's. And if not what is the proper way to do this?