You can find our user documentation at

Check out our new API beta site!

Child pages
  • WHM API 1 Functions - set_tweaksetting
Skip to end of metadata
Go to start of metadata


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


 Command Line
whmapi1 set_tweaksetting key=proxysubdomains value=1


  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:


 Output (JSON)
	"metadata": {
		"command": "set_tweaksetting",
		"version": 1,
		"reason": "OK",
		"result": 1
 Output (XML)


Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.


ParameterTypeDescriptionPossible valuesExample


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

The name of a setting that resides in the /var/cpanel/cpanel.config file.proxysubdomains

The Tweak Settings interface section.

The name of a Tweak Settings interface section.Main

The value to assign to the setting.

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

A valid string.

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


This function only returns metadata.