# Modifying a user's user\_option attributes via API

**URL:** https://meta.discourse.org/t/modifying-a-users-user-option-attributes-via-api/43625
**Category:** Support
**Created:** [May 3, 2016, 6:10pm UTC](https://meta.discourse.org/t/modifying-a-users-user-option-attributes-via-api/43625 "2016-05-03T18:10:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![paully21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paully21/32/72673_2.png) [@paully21](https://meta.discourse.org/u/paully21)
#### Post date: [May 3, 2016, 6:10pm UTC](https://meta.discourse.org/t/modifying-a-users-user-option-attributes-via-api/43625/1 "2016-05-03T18:10:11Z")

</div>

Our website allows our users to manage a small number of attributes of their Discourse profile. (Discourse is mostly used as a mailing list replacement)

We allow them to change their display name, bio, email address and how they wish to receive messages from Discourse.

For that last part we let the user choose whether they would like a digest or all emails via the attributes email\_digests and mailing\_list\_mode.

Using C# (and RestSharp) I used to be able to PUT a request like this

`/users/{username}.json?api_key={api_key}&api_username={api_username}`

Then add the form data to the request `email_digests=true&mailing_list_mode=false`

In our previous version of Discourse, that worked great. Now that those attributes have moved to the `user_option`. I can’t get it to work.

I have tried posting using dotted identifiers (user\_option.email\_digests) no luck. I looked at the routes and there isn’t one specifically for getting or change the user\_option (s)…I didn’t expect there to be, but, I’m just saying I looked 🙂

Anyone out here that can point me in the right direction?

---

<div class="post-metadata">

### Author: ![paully21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paully21/32/72673_2.png) [@paully21](https://meta.discourse.org/u/paully21)
#### Post date: [May 4, 2016, 12:04pm UTC](https://meta.discourse.org/t/modifying-a-users-user-option-attributes-via-api/43625/2 "2016-05-04T12:04:29Z")

</div>

Not sure if this made a difference, but I changed the PUT URL to drop the .json and now everything seems to be working.

To figure that out, I started up Fiddler and made a change directly to my profile in Discourse. I was able to see how the form data was sent and it was exactly how I had it, but the URL was slightly different.

I’m sorry to waste the time of everyone that read this, but it is a good lesson learned for me. ALWAYS look closely at the little things (and monitor the network to see how it is supposed to work).

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 4, 2016, 2:48pm UTC](https://meta.discourse.org/t/modifying-a-users-user-option-attributes-via-api/43625/3 "2016-05-04T14:48:47Z")

</div>


