How to set user's location string with Discourse API

See Reverse engineer the Discourse API while you execute that operation in the user interface.