openapi: 3.2.0 info: contact: email: cs@cpanel.net name: WebPros International, LLC url: https://cpanel.net/support/ description: WHM API. license: name: cPanel License url: https://cpanel.net/legal-notices/ termsOfService: https://cpanel.net/legal-notices/ title: WHM Services API version: 11.137.9999.106 x-api-evangelist-provenance: 'Harvested verbatim from cPanel''s developer portal on 2026-09-05 via the MCP tool get-full-api-description at https://api.docs.cpanel.net/mcp. ONE mechanical change was made before storage: example values containing PEM private-key or certificate blocks, and AWS-access-key-shaped example strings, were replaced with REDACTED_* placeholders so the file can be stored in a public git repository without tripping secret scanning. No path, operation, parameter, schema or description was altered, added or removed.' servers: - description: A server running WHM. url: https://{host}:{port}/json-api variables: host: default: whm-server.tld description: The hostname of a server running WHM. port: default: '2087' description: The WHM port. security: - BasicAuth: [] tags: - description: Server Administration / Services name: Services paths: /get_service_proxy_backends: get: description: 'This function reports a cPanel account''s service proxying configuration.' operationId: Accounts-get_service_proxy_backends parameters: - description: The cPanel account's username. in: query name: username required: true schema: example: example format: username type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: The account’s service proxying backends. items: properties: backend: description: The name of the server to which the system will proxy requests for this service group. example: example.com format: domain type: string service_group: description: 'The name of the proxying service group, if applicable. * null — The account’s general service proxying backend.' example: Mail type: - string - 'null' type: object type: array metadata: properties: command: description: The method name called. example: get_service_proxy_backends type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return a cPanel account’s service proxying setup tags: - Services x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_service_proxy_backends \\\n username='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_service_proxy_backends?api.version=1&username=example x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '94' /set_service_proxy_backends: get: description: 'This function lets you configure a cPanel account''s service proxying. **Note:** * If the cPanel account is a distributed account, and you call this function on the account’s parent node, the system will propagate the new service proxying to the child node. * If the Web Server role is active on the server, this function rebuilds the user''s web virtual hosts (vhosts) and restarts the web server. * If the system cannot rebuild the user''s vhosts, the API call will still succeed. However, the function returns a failure warning in the metadata. * To remove an account''s service proxying, use the WHM API 1 `unset_all_service_proxy_backends` function.' operationId: Accounts-set_service_proxy_backends parameters: - description: The cPanel account's username. in: query name: username required: true schema: example: example format: username type: string - description: 'The hostname or IP address to assign as the server that handles the account''s service proxy requests. This parameter defaults to the existing service proxy configuration, if one exists.' in: query name: general required: false schema: anyOf: - description: A valid hostname. example: hostname.example.com format: hostname type: string - description: A valid IP address. example: 192.0.2.102 format: ipv4 type: string - description: "The name of a service group for which to assign a proxy backend. The\ncorresponding `service_group_backend` value will be the service group's\nnew proxy backend.\n\n* `Mail` — The [Mail service group](https://go.cpanel.net/ServiceProxying#Mail).\n\nThis parameter defaults to the existing setting, if one exists.\n\n**Note:**\n\n * When you call this parameter, you **must** include a corresponding\n `service_group_backend` value.\n * To add `multiple service_group` values, increment the parameter name. For example,\n `service_group-1`, `service_group-2`, and `service_group-3`." examples: multiple: summary: Add multiple service backend groups. value: service-group-0=Mail&service-group-1=Mail&service-group-3=Mail single: summary: Add a single service backend group. value: Mail in: query name: service_group required: false schema: enum: - Mail type: string - description: "The hostname or IP address of the server to assign as the corresponding\n`service_group` value's proxy backend server.\n\nThis parameter defaults to the existing setting, if one exists.\n\n**Note:**\n\n * When you call this parameter, you **must** include a corresponding `service_group`\n value.\n * To add multiple `service_group_backend` values, increment the parameter name.\n For example, `service_group_backend-1`, `service_group_backend-2`,\n and `service_group_backend-3`." examples: multiple: summary: Add multiple service group backend servers. value: service_group_backend-1=mail.example1.com&service_group_backend-2=mail.example2.com&service_group_backend-3=mail.example3.com single: summary: Add a single service group backend server. value: mail.example.com in: query name: service_group_backend required: false schema: anyOf: - description: A valid hostname. example: hostname.example.com format: hostname type: string - description: A valid IP address. example: 192.0.2.102 format: ipv4 type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: set_service_proxy_backends type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Update cPanel account service proxying tags: - Services x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_service_proxy_backends \\\n username='example'\n" - label: CLI (general proxy) lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_service_proxy_backends \\\n username='example' \\\n general='proxy.example.com'\n" - label: CLI (Mail service group) lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_service_proxy_backends \\\n username='example' \\\n service_group='Mail' \\\n service_group_backend='mail.example.com'\n" - label: CLI (multiple service groups) lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_service_proxy_backends \\\n username='example' \\\n service_group-1='Mail' \\\n service_group_backend-1='mail1.example.com' \\\n service_group-2='Mail' \\\n service_group_backend-2='mail2.example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_service_proxy_backends?api.version=1&username=example - label: URL (general proxy) lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_service_proxy_backends?api.version=1&username=example&general=proxy.example.com - label: URL (Mail service group) lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_service_proxy_backends?api.version=1&username=example&service_group=Mail&service_group_backend=mail.example.com - label: URL (multiple service groups) lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_service_proxy_backends?api.version=1&username=example&service_group-1=Mail&service_group_backend-1=mail1.example.com&service_group-2=Mail&service_group_backend-2=mail2.example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '90' /unset_all_service_proxy_backends: get: description: 'This function removes a cPanel account''s service proxying. **Note:** * If the cPanel account is a distributed account, this function will also unset **all** service proxying for the cPanel account on the child node. * If the Web Server role is active on the server, this function rebuilds the cPanel user''s web virtual hosts (vhosts) and restarts the web server. * If the system **cannot** rebuild the cPanel user''s vhosts, the API call will still succeed. However, the function returns a failure warning in the metadata. * To set a service proxying for a cPanel account, use the WHM API 1 `set_service_proxy_backends` function.' operationId: Accounts-unset_all_service_proxy_backends parameters: - description: The cPanel account's username. in: query name: username required: true schema: example: username format: username type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: unset_all_service_proxy_backends type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove cPanel account service proxying tags: - Services x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n unset_all_service_proxy_backends \\\n username='username'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/unset_all_service_proxy_backends?api.version=1&username=username x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '90' components: securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ x-tagGroups: - name: Account Restoration tags: - Restore Account - Restore Queue Management - Restore Queue Reporting - name: Accounts tags: - Account Creation - Account Enhancements - Account Management - Bandwidth and Disk Quotas - Domain Information - Passwords - Styles - Suspensions - name: API Development Tools tags: - API Execution - API Statistics - API Token Management - Applications - Session - name: Authentication tags: - Authentication Providers - External Authentication - Login URL - SSH Keys and Connections - Two-Factor Authentication - name: Backups tags: - Backup Destination - Backup or Restore - Backup Settings - Legacy Migration - name: Commerce Integration tags: - Market Integration - Sitejet - name: cPanel Market tags: - Product Management - Provider Management - name: cPanel Support Tickets tags: - Support Access - Ticket Management - name: Customizations tags: - Brand - Customizations - name: Databases tags: - Manage MySQL Server - MySQL Databases - PostgreSQL Databases - Remote MySQL Databases - name: DNS tags: - DNS Cluster Settings - DNS Security - DNS Zones - Domain Management - Domain Management - Resolvers - Service Records - name: Hosting Plans tags: - Feature Access - Feature Lists - Hosting Plan Extensions - Hosting Plans - name: InProductSurvey tags: - InProductSurvey - name: Integrations tags: - API Authentication - Links - Scripts Hooks - name: IP Address Management tags: - IPv4 Address Settings - IPv6 Address Settings - Network Address Translation - name: Login Security (cPHulk) tags: - Management - Reporting - Settings - name: Logs tags: - Web Log Retention - name: Mail tags: - cPanel Account Mail Management - Mail DNS Settings - Mail Server Settings - Spam Management - Spam Protection (Greylisting) - name: Monitoring tags: - 360 Monitoring - name: NGINX Manager tags: - NGINX Manager - name: Resellers tags: - Account Enhancement Limit - Account Limits - Account Permissions - Account Settings - Reseller Account Management - name: Security tags: - WHM Access - name: Server Administration tags: - Configuration Clusters - Configurations - Connected Applications - Connections - cPanel Analytics - License Management - Notifications - Plugin-Based Features - Security - Server Nodes - Server Profiles - Services - System Information - Updates - name: SSL Certificates tags: - Auto-Generated Certificates - cPanel Account Settings - SSL Server Settings - name: System Package Management tags: - Install or Uninstall Package - List Package Information - Package Manager Settings - name: Transfers tags: - cPanel Account Transfer - Transfer Configuration - Transfer Monitoring - name: UserData tags: - UserData - name: Web Server Configuration tags: - EasyApache Settings - PHP - PHP-FPM - name: Web Server Security (ModSecurity) tags: - Rule Settings - Rule Vendor Settings - Server Settings