Update service configuration key

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

Authorizations:
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

Response Schema: application/json
object

Request samples

whmapi1 --output=jsonpretty \
  set_service_config_key \
  service='dovecot' \
  key='mail_process_size' \
  value='512'

Response samples

Content type
application/json
{
  • "metadata": {
    • "command": "set_service_config_key",
    • "reason": "Succeeded",
    • "result": 1,
    • "version": 1
    }
}