This function enables or disables a service and its monitoring.


whmapi1 configureservice service=mysql enabled=1 monitored=1

  "metadata": {
    "version": 1,
    "reason": "Enabled monitoring for mysql.",
    "result": 1,
    "command": "configureservice"

        <reason>Enabled monitoring for mysql.</reason>



ParameterTypeDescriptionPossible valuesExample


The service to configure.

For more information, read our Service Manager documentation.

  • apache_php_fpm
  • cpanel_php_fpm
  • cpanellogd
  • cpdavd
  • cphulkd
  • cpsrvd
  • crond
  • dnsadmin
  • exim
  • exim-altport
  • ftpd
  • httpd
  • imap
  • ipaliases
  • lmtp
  • mailman
  • mysql
  • named
  • nscd
  • p0f
  • pop
  • queueprocd
  • rsyslogd
  • spamd
  • sshd

Whether to enable the service.

If you do not use this parameter, the function will not change the enabled status of the service.

Do not use this function to disable the cpsrvd service.

  • 1 — Enable the service.
  • 0 — Disable the service.

Whether to monitor the service in WHM's Service Status interface (Home >> Server Status >> Service Status).

If you do not use this parameter, the function will not change the monitoring status of the service.

  • 1 — Monitor the service.
  • 0 — Do not monitor the service.
exim-altportnum integer

The alternative port or ports on which Exim will listen for inbound connections.

  • The function only uses this parameter if you set exim-altport as the service parameter's value.
  • We introduced this parameter in cPanel & WHM version 68. 

This parameter defaults to 26.

A comma-separated list of integers.26


This function only returns metadata.