# API: cannot update user

**URL:** <https://meta.discourse.org/t/api-cannot-update-user/63876>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [June 3, 2017, 9:35am UTC](https://meta.discourse.org/t/api-cannot-update-user/63876 "2017-06-03T09:35:06Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Massimo\_Redaelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/massimo_redaelli/32/120795_2.png) [@Massimo\_Redaelli](https://meta.discourse.org/u/Massimo_Redaelli)\
**Post date:** [June 3, 2017, 9:35am UTC](https://meta.discourse.org/t/api-cannot-update-user/63876/1 "2017-06-03T09:35:06Z")

</div>

I’m trying to use the API to sync user data.

I was able to, for instance, add a user to a group with a `PUT` to `groups/:id/members.json`

However, now I’d like to update fields in the user profile – the name, for instance. I think it’s possible, based on [this example](https://github.com/discourse/discourse_api/blob/master/examples/update_user.rb).

So I’m posting request:

```
PUT /users/m.redaelli HTTP/1.1
HOST: disc.uaar.it
accept: application/json
content-length: 107
content-type: application/x-www-form-urlencoded

api_key=xxxx&api_username=m.redaelli&name=Pippo

```

using the master key.

As a result I get a 404 with an HTML page response saying that the requested page does not exist or is private.

Can you help? 🙂

---

_[View the full topic](https://meta.discourse.org/t/api-cannot-update-user/63876)._
