# Updating custom fields using API

**URL:** https://meta.discourse.org/t/updating-custom-fields-using-api/153337
**Category:** Development
**Tags:** rest-api, user-custom-fields
**Created:** [May 30, 2020, 9:29pm UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337 "2020-05-30T21:29:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hjalali](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hjalali/32/181824_2.png) [@hjalali](https://meta.discourse.org/u/hjalali)
#### Post date: [May 30, 2020, 9:29pm UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/1 "2020-05-30T21:29:16Z")

</div>

I have been reviewing the API documentation and can not seem to find how I can edit user information other than email and avatar. For example firstname, lastname, and more importantly custom fields.

 ![Screenshot 2020-05-30 at 22.10.02](https://global.discourse-cdn.com/meta/original/3X/7/7/77517a29a09638ed31166785c0ef4f6597e84895.png)

Can someone please help.

Thank you.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 30, 2020, 9:36pm UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/2 "2020-05-30T21:36:21Z")

</div>

You can learn the API request for that using [How to reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 30, 2020, 10:44pm UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/3 "2020-05-30T22:44:01Z")

</div>

This is at least twice in as many days that this has been the answer to a question. That link really needs to be at the top of the docs.

---

<div class="post-metadata">

### Author: ![hjalali](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hjalali/32/181824_2.png) [@hjalali](https://meta.discourse.org/u/hjalali)
#### Post date: [May 31, 2020, 9:42am UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/4 "2020-05-31T09:42:03Z")

</div>

I agree, if there is a docs document it is kind of assumed it is complete and if not it would be good to mention it.

---

<div class="post-metadata">

### Author: ![philipp96](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/philipp96/32/305474_2.png) [@philipp96](https://meta.discourse.org/u/philipp96)
#### Post date: [April 17, 2023, 10:42am UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/5 "2023-04-17T10:42:04Z")

</div>

Is there any detailed solution yet for this topic @hjalali ?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 17, 2023, 10:48am UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/6 "2023-04-17T10:48:57Z")

</div>

Is this topic any help?

> [@How to change user fields with API](https://meta.discourse.org/t/how-to-change-user-fields-with-api/147999):
>
> (Edit: see 2nd post for solution: how to change user fields with API)@sam, you mentioned (in a post in a topic now closed) with regards to someone who wanted to use the API to update a custom field in a user record: “the field needs to be whitelisted can you add it to /admin/customize/user\_fields or is this field meant to be completely hidden from users?” Two quick questions What is /admin/customize/ endpoint? How do you “whitelist” a field? (What does that mean-- whitelist it so the API can…

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 17, 2023, 11:08am UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/7 "2023-04-17T11:08:31Z")

</div>

There is now a message on [docs.discourse.org](http://docs.discourse.org):

> Note: For any endpoints not listed you can follow the [reverse engineer the Discourse API](https://meta.discourse.org/t/-/20576) guide to figure out how to use an API endpoint.

But we’ll try to update it from time to time to make it more complete.

@philipp96, did you have a look at [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)? Understanding how such an action is done is very easy. It’s a matter of seconds, literally, once you’ve learned how to do it. 🙂

For the custom field question:

1. Open the network tab of your dev tools in your browser.

2. Update a field in your user profile

3. Look at `[your username].json` in the “Name” section of the network tab (you can also filter by the string `json`)

4. Click the `Payload` tab on the right

5. All the data sent in the body of your request is written here:

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/f/9/df91a0c1a332e8d94c6039d68163d2eed4304cd0.png)

It’s the same process for other requests.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 17, 2023, 1:08pm UTC](https://meta.discourse.org/t/updating-custom-fields-using-api/153337/8 "2023-04-17T13:08:15Z")

</div>

4 posts were split to a new topic: [Dynamically update available user field values during a profile fill in](https://meta.discourse.org/t/dynamically-update-available-user-field-values-during-a-profile-fill-in/261944)
