I am trying to use the REST API to change the role of a user from "registered" to "administrator".
I am using PHP to make a PUT request through curl with the following data:
{"role":{"name":"administrator","isrole":true},"visibleByTheUser":[],"visibleByFriends":[],"visibleByRegisteredUsers":{"company":"Company name","name":"Users Name","_social":[]},"visibleByAnonymousUsers":[]}
I am sending the request to myserveraddress:9000/admin/user/username with the session and app code in the HTTP headers.
I am getting an error response "The 'visibleByAnonymousUsers' field is missing"
Can anyone help me spot what is wrong with this? Although this call is not in the API documentation I had read on some forums that this should work.