Update service configuration key

This function configures global properties for specific services listed in the /var/cpanel/conf directory.

SecurityBasicAuth
Request
query Parameters
key
required
string

The configuration key's name.

  • This parameter uses the key names listed in the /var/cpanel/conf/{service}/main file, where {service} is the service's name from the service parameter.
  • This function does not support subkeys.
Example: key=mail_process_size
service
required
string

The service's name.

  • A list of service names exists in the /var/cpanel/conf directory.
Example: service=dovecot
required
string or integer

The new value for the configuration key.

Example: value=512
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/set_service_config_key
Request samples
whmapi1 --output=jsonpretty \
  set_service_config_key \
  service='dovecot' \
  key='mail_process_size' \
  value='512'
Response samples
application/json
{
  • "metadata": {
    • "command": "set_service_config_key",
    • "reason": "Succeeded",
    • "result": 1,
    • "version": 1
    }
}