Update setting
Update the value of a setting by passing the settings unique _id
URL | Requires Auth | HTTP Method |
---|---|---|
|
|
|
The _id
of a setting is the first argument of the RocketChat.settings.add
method used in Rocket.Chat/packages/rocketchat-lib/server/startup/settings.js
(among other files). For example, the following code in that settings.js
file
means that the setting labeled "Allow anonymous read" in the section "Accounts" has _id
equal to 'Accounts_AllowAnonymousRead'
. The second argument is the default value (false
). The third argument specifies the variable's type and whether it is public, hidden, and so on. To set a color, you can send
And also to trigger a action-button use:
Payload
Argument | Example | Required | Description |
---|---|---|---|
|
| Required | The setting's |
|
| Required | The value to update the setting. |
|
| Optional | The color code to update the setting. |
|
| Required if color was set | The editor key, with |
|
| Optional | To trigger a action-button |
Example Call
Example Result
Example Call
Setting a color
Example Result
Example Call
Trigger an action
Example Result
Change Log
Version | Description |
---|---|
0.65.0 | Added option to set a color and trigger an action |
0.42.0 | Added |
Last updated