Update Tweak Settings option

This function sets an option's value in WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings). The system stores the keys and values that this function updates in the /var/cpanel/cpanel.config file.

SecurityBasicAuth
Request
query Parameters
key
required
string

The cpanel.config setting name that corresponds to the desired setting in WHM's Tweak Settings interface (WHM >>Home >> Server Configuration >> Tweak Settings).

Example: key=proxysubdomains
module
string
Default: "Main"

The Tweak Settings interface section.

Note:

The possible section names are:

  • Apache
  • Basic
  • Mail
  • Main
Enum: "Apache" "Basic" "Mail" "Main"
Example: module=Main
value
string

The value to assign to the setting. If you include this parameter in the call but do not set a value, the value defaults to an empty value.

Note:

For more information about the requirements for values in the cpanel.config file settings, read our cpanel.config file documentation.

Example: value=0
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/set_tweaksetting
Request samples
whmapi1 --output=jsonpretty \
  set_tweaksetting \
  key='proxysubdomains'
Response samples
application/json
{
  • "metadata": {
    • "command": "set_tweaksetting",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}