# 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:** 2

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [June 3, 2017, 10:02am UTC](https://meta.discourse.org/t/api-cannot-update-user/63876/2 "2017-06-03T10:02:24Z")

</div>

Hi @Massimo_Redaelli,

Here is a working curl example with an `application/json` Content-Type header and a json body:

```plaintext
curl -X "PUT" "http://localhost:4000/users/joffreyjaffeux?api_key=b07032eebba01d9f200771a28efc0874014501bc9b866460206626172691be0d&api_username=joffreyjaffeux" \
     -H "Content-Type: application/json" \
     -d $'{
  "name": "newname"
}'

```

---

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