# What does api.addSaveableUserOptionField do?

**URL:** https://meta.discourse.org/t/what-does-api-addsaveableuseroptionfield-do/381049
**Category:** Development
**Tags:** plugin-api
**Created:** [August 31, 2025, 7:54am UTC](https://meta.discourse.org/t/what-does-api-addsaveableuseroptionfield-do/381049 "2025-08-31T07:54:43Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [August 31, 2025, 4:00pm UTC](https://meta.discourse.org/t/what-does-api-addsaveableuseroptionfield-do/381049/3 "2025-08-31T16:00:55Z")

</div>

I don’t know, but here’s what I think I found out.

But first–My question is why do you care? Is there something you’re trying to do? But maybe if you’re trying to create a plugin that has user options, this is how to to do it. It’s not used in core since it’s a hook especially for plugins to be able to have their own user options.

> [@NateDhaliwal](#):
>
> addSaveableUserOptionField

Looks like it’s used in the Chat plugin like here:

> <https://github.com/discourse/discourse/blob/main/plugins/chat/assets/javascripts/discourse/initializers/chat-user-options.js#L22-L32>

Looks like if your plugin has user options then you use this to establish that it’s a user option with the `UserUpdater`.

> <https://github.com/discourse/discourse/blob/main/plugins/chat/plugin.rb#L56-L66>

---

_[View the full topic](https://meta.discourse.org/t/what-does-api-addsaveableuseroptionfield-do/381049)._
