# Creating and Adding Values to \`custom\_fields\` via API

**URL:** <https://meta.discourse.org/t/creating-and-adding-values-to-custom-fields-via-api/93477>\
**Category:** Product Support\
**Created:** [July 30, 2018, 2:00pm UTC](https://meta.discourse.org/t/creating-and-adding-values-to-custom-fields-via-api/93477 "2018-07-30T14:00:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jezra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jezra/32/105986_2.png) [@jezra](https://meta.discourse.org/u/jezra)\
**Post date:** [August 6, 2018, 11:33pm UTC](https://meta.discourse.org/t/creating-and-adding-values-to-custom-fields-via-api/93477/5 "2018-08-06T23:33:03Z")

</div>

When updating the custom fields via the API, use the custom fields ‘number’ and not it’s name. If ‘test-val’ were the first field you created, the data line of your script would be:  
`-d '{ "user_fields": { "1": "0.1" } }'`

---

_[View the full topic](https://meta.discourse.org/t/creating-and-adding-values-to-custom-fields-via-api/93477)._
