Any API or programmatic way to add users

The admin guide has instructions about adding users from the Admin UI.

Is there any way to do this programmatically ? Either through an API or with some utility that might be available in the codebase ?

Thanks

I got some ideas from here : External HTTP API? - #5 by tom

In case anyone else has similar needs this might be helpful please refer below. But before that please look into the api (metabase/src/metabase/api/user.clj at master · metabase/metabase · GitHub) and ensure the JSON payload is upto date.

curl -X POST
-H "Cookie: metabase.SESSION_ID=XXXXXXXXXXXXXXX"
-H "Content-Type: application/json"
-d '{"first_name" : "FIRSTNAME", "last_name": "LASTNAME" , "email": "EMAIL" , "password" : "PASSWORD" }'
http://YOURHOST:PORT/api/user