openapi: 3.2.0 info: title: Cpanel DNS API version: 11.137.9999.106 contact: email: cs@cpanel.net name: WebPros International, LLC url: https://cpanel.net/support/ license: name: cPanel License url: https://cpanel.net/legal-notices/ termsOfService: https://cpanel.net/legal-notices/ 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.' description: 'Operations tagged DNS across 2 of this provider''s published API definitions: cpanel-uapi-openapi.yml, cpanel-whm-api-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. - 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: The DNS module for UAPI. name: DNS paths: /DNS/ensure_domains_reside_only_locally: get: x-readonly: true description: This function indicates whether the account's domains resolve exclusively to this server. operationId: DNS-ensure_domains_reside_only_locally parameters: - description: 'The domain to check. **Note:** To check multiple domains, duplicate or increment the parameter name. For example, to exclude three domains, you could: * Use the `domain` parameter multiple times. * Use the `domain`, `domain-1`, and `domain-2` parameters.' examples: multiple: summary: Multiple domains value: domain=example.com&domain-1=example1.com&domain-2=example2.com multiple-alternative: summary: Multiple domains value: domain=example.com&domain=example1.com&domain=example2.com single: summary: A single domain. value: example.com in: query name: domain required: true schema: example: example1.com format: domain type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: ensure_domains_reside_only_locally type: string module: description: The name of the module called. example: DNS type: string result: properties: data: description: "The results from each domain parameter's DNS query.\n* `null` - The domain **only** resolves locally to the server.\n* A valid string that explains to where the domain resolves.\n\n**Note:**\n\n The function returns the results from the domains in the same order that you called them." items: example: The domain resolves to Mars. Beep beep beep. type: string type: - array - 'null' errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` - Success. * `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return whether domains only resolve locally tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNS \\\n ensure_domains_reside_only_locally \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/ensure_domains_reside_only_locally?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_ensure_domains_reside_only_locally.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_ensure_domains_reside_only_locally.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/ensure_domains_reside_only_locally/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n foreach my $item (@{$data}) {\n # Do something with the $item\n }\n\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_ensure_domains_reside_only_locally.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_ensure_domains_reside_only_locally.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'ensure_domains_reside_only_locally',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n foreach ($data as $item) {\n // Do something with the $item\n }\n\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 56 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/fetch_cpanel_generated_domains: get: x-readonly: true description: 'This function retrieves the list of subdomains that cPanel automatically generates for a given domain. These include proxy subdomains such as `webmail`, `mail`, and `cpanel`, as well as other system-generated domain names.' operationId: DNS-fetch_cpanel_generated_domains parameters: - description: The domain for which to retrieve cPanel-generated subdomains. examples: single: summary: Retrieve generated subdomains for a domain. value: example.com in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: fetch_cpanel_generated_domains type: string module: description: The name of the module called. example: DNS type: string result: properties: data: description: An array of objects containing the cPanel-generated domain names for the specified domain. example: - domain: example.com. - domain: cpanel.example.com. - domain: mail.example.com. - domain: webmail.example.com. - domain: webdisk.example.com. items: properties: domain: description: 'A cPanel-generated domain name, returned as a fully-qualified domain name (FQDN) with a trailing dot.' example: webmail.example.com. format: domain type: string type: object type: array errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 1 - 0 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Retrieve cPanel-generated subdomains for a domain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNS \\\n fetch_cpanel_generated_domains \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/fetch_cpanel_generated_domains?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_fetch_cpanel_generated_domains.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_fetch_cpanel_generated_domains.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/fetch_cpanel_generated_domains/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n foreach my $item (@{$data}) {\n # Do something with the $item\n }\n\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_fetch_cpanel_generated_domains.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_fetch_cpanel_generated_domains.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'fetch_cpanel_generated_domains',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n foreach ($data as $item) {\n // Do something with the $item\n }\n\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 120 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/has_local_authority: get: x-readonly: true description: This function checks whether the local server is authoritative for the domain's DNS records. operationId: DNS-has_local_authority parameters: - description: 'The domain to check whether the local server is authoritative for the domain''s DNS records. **Note:** To check multiple domains, increment or duplicate the parameter name. For example, `domain-0`, `domain-1`, and `domain-2`.' examples: multiple: summary: Check multiple domains. value: domain-0=example.com domain-1=example1.com domain-2=example2.com multiple-alternative: summary: Check multiple domains. value: domain=example.com domain=example1.com domain=example2.com single: summary: Check a single domain. value: example.com in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: has_local_authority type: string module: description: The name of the module called. example: DNS type: string result: properties: data: description: An array of objects containing information about the authoritative status of a domain's local DNS zone files. example: - domain: example.com local_authority: 1 nameservers: - ns1.example.com - ns2.example.com zone: example.com - domain: example2.com local_authority: 0 nameservers: [] - domain: example3.com error: (XID 3z756a) DNS query (example3.com/SOA) timeout! local_authority: 0 nameservers: [] zone: example3.com items: properties: domain: description: The queried domain. format: domain type: string error: description: 'An error message that details the reason why the local server''s authoritative check failed. **Note:** The function **only** returns this value when the check fails.' type: string local_authority: description: 'Whether the local server is authoritative for the domain''s DNS records. * `1` — The local server is authoritative for the domain''s DNS records. * `0` — The local server is **not** authoritative for the domain''s DNS records.' enum: - 1 - 0 type: integer nameservers: description: The domain's nameservers, if any exist. items: format: domain type: string type: array zone: description: 'The domain''s DNS zone, if one exists. * `null` — No valid DNS zone.' format: domain type: - string - 'null' type: object type: array errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 1 - 0 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: [] items: type: - string - 'null' type: array type: object type: object description: HTTP Request was successful. summary: Return whether local DNS server is authoritative tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNS \\\n has_local_authority \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/has_local_authority?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_has_local_authority.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_has_local_authority.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/has_local_authority/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n foreach my $item (@{$data}) {\n # Do something with the $item\n }\n\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_has_local_authority.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_has_local_authority.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'has_local_authority',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n foreach ($data as $item) {\n // Do something with the $item\n }\n\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 78 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/is_alias_available: get: x-readonly: true description: 'This function returns whether `ALIAS` and `ANAME` records are available and the value of the running PowerDNS (PDNS) `resolver` setting, if any exists. For more information, read our `ALIAS` documentation.' operationId: DNS-is_alias_available responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: is_alias_available type: string module: description: The name of the module called. example: DNS type: string result: properties: data: properties: alias: description: 'Whether `ALIAS` records are available. * `1` - Available. * `0` - Not available. When `ALIAS` records are enabled, they may work in API calls that accept `A` and `AAAA` records. However, the `ALIAS` record must use a fully qualified domain name (FQDN) rather than an IP address.' enum: - 1 - 0 example: 1 type: integer aname: description: 'Whether `ANAME` records are available. * `1` - Available. * `0` - Not available. **NOTE:** The `aname` value is always set to false (i.e. Not available). The `ANAME` record is currently not supported. It is included for completeness and future proofing.' enum: - 1 - 0 example: 0 type: integer resolver: description: The value (if any) of the running PDNS’s `resolver` setting. example: 8.8.8.8 type: string type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return `ALIAS` DNS record availability & resolver tags: - DNS x-codeSamples: - label: CLI lang: Shell source: 'uapi --output=jsonpretty --user=username DNS is_alias_available ' - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/is_alias_available - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_is_alias_available.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_is_alias_available.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(DNS => 'is_alias_available');\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_is_alias_available.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_is_alias_available.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'is_alias_available'\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 122 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/is_https_available: get: x-readonly: true description: 'This function fetches information regarding HTTPS records support. HTTPS records are defined in RFC 9460 and provide service parameters for HTTPS endpoints. For more information, read our Zone Editor documentation.' operationId: DNS-is_https_available responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: is_https_available type: string module: description: The name of the module called. example: DNS type: string result: properties: data: properties: https: description: 'Whether HTTPS records are supported. * `1` - Supported. * `0` - Not supported.' enum: - 1 - 0 example: 1 type: integer dns_server: description: The DNS server type currently in use (bind, pdns, etc.). example: pdns type: string type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return DNS HTTPS record support information tags: - DNS x-codeSamples: - label: CLI lang: Shell source: 'uapi --output=jsonpretty --user=username DNS is_https_available ' - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/is_https_available - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_is_https_available.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_is_https_available.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(DNS => 'is_https_available');\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_is_https_available.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_is_https_available.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'is_https_available'\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 122 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/is_svcb_available: get: x-readonly: true description: 'This function fetches information regarding SVCB records support. SVCB records are defined in RFC 9460 and provide service binding and aliasing for arbitrary services. For more information, read our Zone Editor documentation.' operationId: DNS-is_svcb_available responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: is_svcb_available type: string module: description: The name of the module called. example: DNS type: string result: properties: data: properties: svcb: description: 'Whether SVCB records are supported. * `1` - Supported. * `0` - Not supported.' enum: - 1 - 0 example: 1 type: integer dns_server: description: The DNS server type currently in use (bind, pdns, etc.). example: pdns type: string type: object errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return DNS SVCB record support information tags: - DNS x-codeSamples: - label: CLI lang: Shell source: 'uapi --output=jsonpretty --user=username DNS is_svcb_available ' - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/is_svcb_available - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_is_svcb_available.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_is_svcb_available.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(DNS => 'is_svcb_available');\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_is_svcb_available.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_is_svcb_available.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'is_svcb_available'\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 122 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/lookup: get: x-readonly: true description: This function returns DNS zone information about a domain. operationId: DNS-lookup parameters: - description: A fully qualified domain name. in: query name: domain required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: lookup type: string module: description: The name of the module called. example: DNS type: string result: properties: data: description: Contains each response item. example: - example.com has address 93.184.216.34 - example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946 - example.com mail is handled by 0 . items: type: string type: - array - 'null' errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '- 1 - Success - 0 - Failed: Check the errors field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return domain's DNS information tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNS \\\n lookup \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/lookup?domain=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_lookup.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_lookup.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/lookup/,\n {\n 'domain' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n foreach my $item (@{$data}) {\n # Do something with the $item\n }\n\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_lookup.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_lookup.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'lookup',\n array (\n 'domain' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n foreach ($data as $item) {\n // Do something with the $item\n }\n\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: 90 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/mass_edit_zone: get: x-readonly: false x-rollback: none description: 'This function updates a DNS zone by allowing multiple records to be added, modified, or removed in a single call. It also ensures modified records occupy the same number of lines as before the edit. **NOTE:** You cannot use this function to edit temporary domains.' operationId: DNS-mass_edit_zone parameters: - description: 'The current serial number in the DNS zone’s SOA (Start of Authority) record. If this value does not match the zone’s current state, the request fails.' in: query name: serial required: true schema: example: 202001010100 minimum: 0 type: integer - description: The name of one of the user’s DNS zones. in: query name: zone required: true schema: example: example.com type: string - description: "The records to add to the zone. Each item must be a serialized\nJSON object that contains:\n\n* `dname` — The record’s name.\n* `ttl` — The record’s TTL (Time-To-Live) value.\n* `record_type` — The record’s type. For example, `A` or `TXT`.\n* `data` — An array of strings. The format and number of the\n strings depend on the `record_type` value." examples: a: description: An A record. value: '''{"dname":"example", "ttl":14400, "record_type":"A", "data":["11.22.33.44"]}''' aaaa: description: A TXT record. value: '''{"dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}''' explode: true in: query name: add required: false schema: items: format: json type: string type: array - description: "The records to edit in the zone. Each item must be a serialized\nJSON object that contains:\n\n* `line_index` — The line number in the DNS zone where the record starts.\n This is a 0-based index, so to edit the first line in the file\n use the `0` value. To edit the second line, give `1`, and so forth.\n* `dname` — The record’s name.\n* `ttl` — The record’s TTL (Time-To-Live) value.\n* `record_type` — The record’s new type. For example, `A` or `TXT`.\n* `data` — An array of strings. The format and number of the\n strings depend on the `record_type` value." explode: true in: query name: edit required: false schema: items: example: '''{"line_index": 9, "dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}''' format: json type: string type: array - description: The line indexes of records to remove from the zone. explode: true in: query name: remove required: false schema: items: example: 22 minimum: 0 type: integer type: array responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: mass_edit_zone type: string module: description: The name of the module called. example: DNS type: string result: properties: data: properties: new_serial: description: 'The DNS zone’s SOA record’s new serial number. You can use this to submit later edits if you track the number of lines each record takes up.' example: 2021031903 minimum: 0 type: integer errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Update a DNS zone tags: - DNS x-codeSamples: - label: CLI lang: Shell source: uapi --output=jsonpretty --user=username DNS mass_edit_zone zone='example.com' serial='202001010100' remove=23 add='{"dname":"example","ttl":14400,"record_type":"A","data":["127.0.0.1"]}' - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/mass_edit_zone?zone=example.com&serial=202001010100&remove=23 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_mass_edit_zone.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_mass_edit_zone.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/mass_edit_zone/,\n {\n 'zone' => 'example.com',\n 'serial' => '202001010100',\n 'add' => '{\"dname\":\"example\",\"ttl\":14400,\"record_type\":\"A\",\"data\":[\"127.0.0.1\"]}',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_mass_edit_zone.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_mass_edit_zone.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'mass_edit_zone',\n array (\n 'zone' => 'example.com',\n 'serial' => '202001010100',\n 'add' => '{\"dname\":\"example\",\"ttl\":14400,\"record_type\":\"A\",\"data\":[\"127.0.0.1\"]}',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: 96 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/parse_zone: get: x-readonly: true description: 'This function parses a given DNS zone. **Important:** Most DNS zones contain only 7-bit ASCII. However, it is possible for DNS zones to contain any binary sequence. An application that decodes this function''s base64 output **must** be able to handle cases where the decoded octets do not match any specific character encoding.' operationId: DNS-parse_zone parameters: - description: The name of one of the user’s DNS zones. in: query name: zone required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: parse_zone type: string module: description: The name of the module called. example: DNS type: string result: properties: data: $ref: '#/components/schemas/Payload' errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: transformed: description: Post-processing may have transformed the data. enum: - 1 example: 1 type: integer status: description: '* `1` — Success. * `0` — Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return a parsed DNS zone tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n DNS \\\n parse_zone \\\n zone='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/parse_zone?zone=example.com - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_parse_zone.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_parse_zone.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/parse_zone/,\n {\n 'zone' => 'example.com',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_parse_zone.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_parse_zone.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'parse_zone',\n array (\n 'zone' => 'example.com',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: 96 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /DNS/swap_ip_in_zones: get: x-readonly: false x-rollback: none description: 'This function replaces a domain''s IPv4 address in the DNS zone file with the specified destination IPv4 address.' operationId: DNS-swap_ip_in_zones parameters: - description: The IPv4 address to use as the replacement in the zone files. in: query name: dest_ip required: true schema: type: string format: ipv4 example: 192.0.2.1 - description: 'The domain to perform the zone file updates on. **Note:** To update multiple domains, increment or duplicate the parameter name. For example, `domain-0`, `domain-1`, and `domain-2`.' examples: multiple: summary: Update multiple domains. value: example.com domain-1=example1.com domain-2=example2.com multiple-alternative: summary: Update multiple domains. value: example.com domain=example1.com domain=example2.com single: summary: Update a single domain. value: example.com in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The IPv4 address to use as the replacement for FTP records in the zone files. If this parameter is **not** provided, then the system will use the `dest_ip` value.' in: query name: ftp_ip required: false schema: type: string format: ipv4 example: 192.0.2.1 - description: 'The IPv4 address to replace in the zone files. The detected source IPv4 address is one of: * If there is an A record for the root of the zone **and** the IP address is **not** a loopback address, then the system will use its address. * If there are any A records in the zone whose addresses are **not** loopback addresses, then the system will use the address of the first such A record in the zone file. * If no A records exist in the zone **or** all A records have loopback addresses, then the system will **not** update the zone file. If you do **not** call this parameter, the system will automatically detect the IP addresses in the zone files.' in: query name: source_ip required: false schema: type: string format: ipv4 example: 192.0.2.0 responses: '200': content: application/json: schema: properties: apiversion: description: The version of the API. example: 3 type: integer func: description: The name of the method called. example: swap_ip_in_zones type: string module: description: The name of the module called. example: DNS type: string result: properties: data: description: An array of objects containing the updated DNS records, including their previous values. items: properties: zone_name: description: The DNS zone in which the system updated the domain's record. format: domain type: string example: example.com record_name: description: The name of the domain's updated DNS record. format: domain type: string example: example.com record_type: description: The type of the DNS record which was updated. type: string example: A old_value: description: The value of the DNS record before it was updated. type: string example: 192.0.2.0 new_value: description: The value of the DNS record after it was updated. type: string example: 192.0.2.1 errors: description: List of errors if the API failed. example: null items: type: string type: - array - 'null' messages: description: List of messages generated by the API. example: null items: type: string type: - array - 'null' metadata: properties: {} status: description: '* `1` - Success. * `0` - Failed. Check the `errors` field for more details.' enum: - 0 - 1 example: 1 type: integer warnings: description: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Update IP addresses in zone files tags: - DNS x-codeSamples: - label: CLI lang: Shell source: uapi --user=username DNS swap_ip_in_zones domain='example.com' source_ip='192.0.2.0' dest_ip='192.0.2.1' - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/DNS/swap_ip_in_zones?domain=example.com&source_ip=192.0.2.0&dest_ip=192.0.2.1 - label: LiveAPI Perl lang: Perl source: "#--------------------------------------------------------------------------------------\n# Instructions:\n#--------------------------------------------------------------------------------------\n# is the theme assigned to cPanel account.\n# 1) cd /usr/local/cpanel/base/frontend/\n# 2) mkdir api_examples\n# 3) cd api_examples\n# 4) create a file DNS_swap_ip_in_zones.live.pl and put this code into that file.\n# 5) In your browser login to a cPanel account.\n# 6) Manually change the url from: .../frontend//\n# to .../frontend//api_examples/DNS_swap_ip_in_zones.live.pl\n#--------------------------------------------------------------------------------------\n\nuse strict;\n\nuse Cpanel::LiveAPI ();\n\nmy $cpanel = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.\n\n# Print the header\nprint \"Content-type: text/plain\\r\\n\\r\\n\";\n\n# Call the API\nmy $response = $cpanel->uapi(\n q/DNS/,\n q/swap_ip_in_zones/,\n {\n 'domain' => 'example.com',\n 'source_ip' => '192.0.2.0',\n 'dest_ip' => '192.0.2.1',\n }\n);\n\n# Handle the response\nif ($response->{cpanelresult}{result}{status}) {\n my $data = $response->{cpanelresult}{result}{data};\n # Do something with the $data\n # So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n # Report errors:\n print to_json($response->{cpanelresult}{result}{errors});\n}\n\n# Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n#--------------------------------------------------------------------------------------\n# Helper function to convert a perl object to html printable json\n#--------------------------------------------------------------------------------------\nsub to_json {\n require JSON;\n my $str = JSON->new->pretty->encode($_[0]);\n return $str;\n}\n" - label: LiveAPI PHP lang: PHP source: " is the theme assigned to cPanel account.\n// 1) cd /usr/local/cpanel/base/frontend/\n// 2) mkdir api_examples\n// 3) cd api_examples\n// 4) create a file DNS_swap_ip_in_zones.live.php and put this code into that file.\n// 5) In your browser login to a cPanel account.\n// 6) Manually change the url from: .../frontend//\n// to .../frontend//api_examples/DNS_swap_ip_in_zones.live.php\n//--------------------------------------------------------------------------------------\n\n// Instantiate the CPANEL object.\nrequire_once \"/usr/local/cpanel/php/cpanel.php\";\n\n// Print the header\nheader('Content-Type: text/plain');\n\n// Connect to cPanel - only do this once.\n$cpanel = new CPANEL();\n\n// Call the API\n$response = $cpanel->uapi(\n 'DNS',\n 'swap_ip_in_zones',\n array (\n 'domain' => 'example.com',\n 'source_ip' => '192.0.2.0',\n 'dest_ip' => '192.0.2.1',\n )\n);\n\n// Handle the response\nif ($response['cpanelresult']['result']['status']) {\n $data = $response['cpanelresult']['result']['data'];\n // Do something with the $data\n // So you can see the data shape we print it here.\n print to_json($data);\n}\nelse {\n // Report errors:\n print to_json($response['cpanelresult']['result']['errors']);\n}\n\n// Disconnect from cPanel - only do this once.\n$cpanel->end();\n\n//--------------------------------------------------------------------------------------\n// Helper function to convert a PHP value to html printable json\n//--------------------------------------------------------------------------------------\nfunction to_json($data) {\n return json_encode($data, JSON_PRETTY_PRINT);\n}" x-cpanel-api-version: UAPI x-cpanel-available-version: cPanel 96 servers: - description: A server running cPanel. url: https://{host}:{port}/execute variables: host: default: cpanel-server.tld description: The hostname of a server running cPanel. port: default: '2083' description: The cPanel port. /activate_zone_key: get: description: This function activates a domain's DNSSEC security key. operationId: DNS-activate_zone_key parameters: - description: The domain for which to activate a security key. in: query name: domain required: true schema: example: example.com type: string - description: 'The security key''s ID. **Note:** Use the WHM AP1 `fetch_ds_records_for_domains` function to locate the domain''s security key ID.' in: query name: key_id required: true schema: example: 1 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: activate_zone_key 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Enable domain's DNSSEC key tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n activate_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/activate_zone_key?api.version=1&domain=example.com&key_id=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /add_zone_key: get: description: 'This function generates a DNSSEC zone key for a domain. **Note:** * Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error. * After you enable DNSSEC on the domain, you **must** add the Delegation of Signing (DS) records to your zone record and your registrar. * You **cannot** modify the DNSSEC security key. To make any changes, you **must** disable, delete, and re-create the DNSSEC security key.' operationId: DNS-add_zone_key parameters: - description: 'The algorithm that the system uses to generate the security key. * `5` — RSA/SHA-1 * `6` — DSA-NSEC3-SHA1 * `7` — RSA SHA1-NSEC3-SHA1 * `8` — RSA/SHA-256 * `13` — ECDSA Curve P-256 with SHA-256 * `14` — ECDSA Curve P-384 with SHA-384 **Note:** We recommend that you use a `13` (ECDSA Curve P-256 with SHA-256) value if your registrar supports it.' in: query name: algo_num required: true schema: enum: - 5 - 6 - 7 - 8 - 13 - 14 example: 13 type: integer - description: The domain for which to enable DNSSEC. in: query name: domain required: true schema: example: example.com type: string - description: 'The type of security key to add. * `ksk` — Key Signing Key. * `zsk` — Zone Signing Key. **Note:** You **must** call these values in lowercase.' in: query name: key_type required: true schema: example: ksk type: string - description: 'Whether to activate the new security key. * `1` — Activate. * `0` — Do **not** activate.' in: query name: active required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: "The security key size, in bits.\n\n**Note:**\n\nThis parameter defaults to the following values, depending on the `algo_num`\nand `key_type` values:\n\n* `algo_num` = `5`\n * `ksk` = `2048`\n * `zsk` = `1024`\n* `algo_num` = `6`\n * `ksk` = `2048`\n * `zsk` = `1024`\n* `algo_num` = `7`\n * `ksk` = `2048`\n * `zsk` = `1024`\n* `algo_num` = `8`\n * `ksk` = `2048`\n * `zsk` = `1024`\n* `algo_num` = `13`\n * `ksk` and `zsk` = `256`\n* `algo_num` = `14`\n * `ksk` and `zsk` = `384`" in: query name: key_size required: false schema: enum: - 256 - 384 - 1024 - 2048 example: 256 type: integer responses: '200': content: application/json: schema: properties: data: properties: new_key_id: description: The security key's ID. example: '1' type: string type: object metadata: properties: command: description: The method name called. example: add_zone_key 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create domain's DNSSEC zone key tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n add_zone_key \\\n domain='example.com' \\\n algo_num='13' \\\n key_type='ksk'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/add_zone_key?api.version=1&domain=example.com&algo_num=13&key_type=ksk x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /adddns: get: description: 'This function creates a DNS zone. If `trueowner=user`, this function does the following: * Adds a DNS entry in the `/var/cpanel/users/USER` file, where `USER` represents the `trueowner` parameter''s value. * Creates the `/etc/vdomainaliases/DOMAIN` file, where `DOMAIN` represents the new zone''s domain. * Creates the `/etc/vfilters/DOMAIN` file, where `DOMAIN` represents the new zone''s domain. When you call this function, the system uses the domain name and IP address that you supply. WHM''s standard zone template determines all other zone information. This function generates the DNS zone''s MX record, domain PTR, and A records automatically. **Important:** When you disable the DNS role, the system **disables** this function. **NOTE:** You **cannot** use this function to add temporary domains.' operationId: DNS-adddns parameters: - description: The new zone's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The domain's IP address. in: query name: ip required: true schema: example: 192.168.0.20 format: ipv4 type: string - description: The domain's IPv6 address. in: query name: ipv6 required: false schema: example: 2001:0db8:0:0:1:0:0:1 format: ipv6 type: - string - 'null' - description: 'The zone file template. * `standard` * `simple` * `standardvirtualftp` * The name of a custom zone template file in the `/var/cpanel/zonetemplates` directory.' in: query name: template required: false schema: default: standard example: standard type: string - description: The new zone's owner. This parameter defaults to the currently-authenticated user. in: query name: trueowner required: false schema: example: user format: username type: - string - 'null' responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: adddns 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: Added example.com ok belonging to user user type: string result: description: '* `1` - Success. * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create DNS zone tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n adddns \\\n domain='example.com' \\\n trueowner='user' \\\n ip='192.168.0.20'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/adddns?api.version=1&domain=example.com&ip=192.168.0.20 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.28' 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. /addzonerecord: post: description: 'This function adds a DNS zone record. **Important:** * When you call this function, you **must** include the additional parameters for the selected zone record type. * When you disable the DNS role, the system **disables** this function. **Note:** On servers that run CentOS 7, you may see a `named` warning about the absence of SPF resource records on DNS. * This warning is **not** relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain `bind-9.9.4-23.el7`, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.' operationId: DNS-addzonerecord requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/DnsAddZoneParameterType' responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: addzonerecord 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: 'Bind reloading on hostname using rndc zone: [example.com] ' type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create DNS zone record tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --input=json --output=jsonpretty \\\n addzonerecord\n" - label: HTTP Request (Wire Format) lang: HTTP source: 'POST /cpsess##########/json-api/addzonerecord HTTP/1.1 Host: example.com:2083 Cookie: ################################### Content-Type: application/json Content-Length: 0 ' x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /cluster_member_has_trust_with: get: description: 'This function queries whether nameservers in a DNS cluster can share records with one another. Servers in a DNS cluster **must** exist in a Reverse Trust relationship to share information. This relationship requires each server to have an API token. **Note:** DNS servers in a Write-Only role do not need to exist in a Reverse Trust relationship. For more information, read our Guide to DNS Cluster Configurations documentation.' operationId: ClusterServer-cluster_member_has_trust_with parameters: - description: The nameserver's IP address. in: query name: host required: true schema: example: 192.0.2.0 format: ipv4 type: string - description: The nameserver's alternate IP address. This is useful, for example, if your DNS cluster exists in a NAT-configured network. in: query name: althost required: false schema: default: 8.8.8.8 example: 192.0.3.0 format: ipv4 type: string responses: '200': content: application/json: schema: properties: data: properties: has_trust: description: 'Whether the nameserver can send information to other cluster members. * `1` — Can send information. * `0` — Can''t send information.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: cluster_member_has_trust_with 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: - 0 - 1 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 whether DNS cluster server can share records tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n cluster_member_has_trust_with \\\n host='192.0.2.0'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/cluster_member_has_trust_with?api.version=1&host=192.0.2.0 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' 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. /create_parked_domain_for_user: get: description: This function creates an alias (parks a domain on a web virtual host). operationId: UserDomains-create_parked_domain_for_user parameters: - description: The domain name to park. in: query name: domain required: true schema: example: park.example.com format: domain type: string - description: The cPanel user account. in: query name: username required: true schema: example: username type: string - description: "An existing web virtual host to which the new domain name should be added.\n\n**Note:**\n\n If this is not the cPanel account’s main domain, then the system will consider the new domain to be an [addon domain](https://go.cpanel.net/cpaneldocsAddonDomains)." in: query name: web_vhost_domain required: true schema: example: vhost.example.com type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: create_parked_domain_for_user 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create domain alias tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n create_parked_domain_for_user \\\n domain='park.example.com' \\\n username='username' \\\n web_vhost_domain='vhost.example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/create_parked_domain_for_user?api.version=1&domain=park.example.com&username=username&web_vhost_domain=vhost.example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '82' 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. /create_subdomain: get: description: This function creates a subdomain. operationId: UserDomains-create_subdomain parameters: - description: "The subdomain's document root within the home directory.\n\n **Note:**\n\n * An invalid document root path will cause this function to **fail**.\n * If the *Restrict document roots to public_html* value is set to `On` in WHM's [Tweak Settings](https://go.cpanel.net/whmdocsTweakSettings) interface (*WHM >> Home >> Server Configuration >> Tweak Settings*), this parameter **must** begin with the `public_html/` path. For more information, read the [cpanel.config](https://go.cpanel.net/cpanelconfiginvalid) file documentation." in: query name: document_root required: true schema: example: public_html/directory_name type: string - description: The subdomain name to create. in: query name: domain required: true schema: example: subdomain.example.com format: domain type: string - description: 'Whether to use a canonical name in the [Apache® configuration for self-referential URLs](https://httpd.apache.org/docs/2.4/mod/core.html#usecanonicalname). * `1` — Use the canonical name. * `0` — Do **not** use the canonical name.' in: query name: use_canonical_name required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer responses: '200': content: application/json: schema: properties: data: properties: username: description: "The cPanel account username.\n\n**Note:**\n\n This return **only** appears if the function succeeds." example: example format: username type: string type: object metadata: properties: command: description: The method name called. example: create_subdomain 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create subdomain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n create_subdomain \\\n domain='subdomain.example.com' \\\n document_root='public_html/directory_name'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/create_subdomain?api.version=1&domain=subdomain.example.com&document_root=public_html%2fdirectory_name x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /deactivate_zone_key: get: description: 'This function deactivates a domain''s DNSSEC security key. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-deactivate_zone_key parameters: - description: The domain for which to deactivate a security key. in: query name: domain required: true schema: example: example.com type: string - description: 'The security key''s ID. **Note:** Use the WHM AP1 `fetch_ds_records_for_domains` function to locate the domain''s security key ID.' in: query name: key_id required: true schema: example: 1 type: integer responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: deactivate_zone_key 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Disable domain's DNSSEC key tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n deactivate_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/deactivate_zone_key?api.version=1&domain=example.com&key_id=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /delete_domain: get: description: 'This function deletes a domain. **Note:** This function does **not** remove an addon domain''s associated subdomain. You **must** also run this function for the associated subdomain.' operationId: UserDomains-delete_domain parameters: - description: The name of the domain to delete. in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: type: description: 'The type of domain that the function deleted. * `addon` — An addon domain. * `parked` — A parked (alias) domain. * `sub` — A subdomain. * `null` — The domain does not exist on the server.' enum: - addon - parked - sub example: addon type: - string - 'null' username: description: 'The cPanel user that owned the domain. * A cPanel account username. * `null` — The function did **not** find a cPanel account that owns the given domain.' example: username format: domain type: string type: object metadata: properties: command: description: The method name called. example: delete_domain 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Delete domain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n delete_domain \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/delete_domain?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /disable_dnssec_for_domains: get: description: 'This function disables DNSSEC on the domain. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error. **Warning:** - This action is **irreversible**. If you disable DNSSEC on the domain, you will lose the associated keys. You can only retrieve the keys by restoring them from a full back up of the account. - If you disable DNSSEC, you **must** remove the Delegation of Signing (DS) records on your DNS server and with your registrar.' operationId: DNS-disable_dnssec_for_domains parameters: - description: 'The domain for which to disable DNSSEC. **Note:** To disable DNSSEC for multiple domains, duplicate or increment the parameter name. For example, to check three domains, you could: * Use the `domain` parameter multiple times. * Use the `domain`, `domain-1`, `domain-2` parameters.' examples: multiple: summary: Multiple domains value: domain=example.com&domain-1=example1.com&domain-2=example2.com multiple-alternative: summary: Multiple domains value: domain=example.com&domain=example1.com&domain=example2.com single: summary: A single domain. value: example.com in: query name: domain required: true schema: format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: domains: description: An array of objects that contains information about each domain. items: properties: disabled: description: 'Whether the system disabled DNSSEC. * `1` - Disabled. * `0` - The system failed to disable DNSSEC.' enum: - 0 - 1 example: 1 type: integer domain: description: The domain for which the system disabled DNSSEC. example: example.com format: domain type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: disable_dnssec_for_domains 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Disable DNSSEC on domain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n disable_dnssec_for_domains \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/disable_dnssec_for_domains?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /dumpzone: get: deprecated: true description: 'This function returns a domain''s DNS zone configuration. **Important:** * This function is **deprecated**. Use WHM''s `parse_dns_zone` function. * You **must** include either the `domain` or the `zone` parameters. * When you disable the DNS role, the system **disables** this function. **Note:** On servers that run CentOS 7, you may see a `named` warning about the absence of SPF resource records on DNS. * This warning is **not** relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain `bind-9.9.4-23.el7`, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.' operationId: DNS-dumpzone parameters: - description: The zone record's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The zone file's name. in: query name: zone required: false schema: example: example.com.db type: string responses: '200': content: application/json: schema: properties: data: properties: zone: description: An array of objects of zone information. This array contains the `record` array of objects. items: anyOf: - $ref: '#/components/schemas/a' - $ref: '#/components/schemas/a6' - $ref: '#/components/schemas/aaaa' - $ref: '#/components/schemas/asfdb' - $ref: '#/components/schemas/caa' - $ref: '#/components/schemas/cname' - $ref: '#/components/schemas/dname' - $ref: '#/components/schemas/ds' - $ref: '#/components/schemas/hinfo' - $ref: '#/components/schemas/loc' - $ref: '#/components/schemas/mx' - $ref: '#/components/schemas/ns' - $ref: '#/components/schemas/ptr' - $ref: '#/components/schemas/rp' - $ref: '#/components/schemas/soa' - $ref: '#/components/schemas/srv' - $ref: '#/components/schemas/sshfp' - $ref: '#/components/schemas/txt' type: array type: object metadata: properties: command: description: The method name called. example: dumpzone 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: Zone Serialized type: string result: description: '* `1` - Success. * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 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 domain's DNS zone configuration tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n dumpzone \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/dumpzone?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /editzonerecord: post: description: 'This function edits a DNS zone record. To effectively use this function, use the following workflow: 1. Run the `dumpzone` function on the DNS zone record to edit. 1. Locate the `Line` value that corresponds to the data to edit. 1. Use the values from that zone record to formulate the appropriate `editzonerecord` parameters. **Important:** * When you call this function, you **must** include the additional parameters for the selected zone record type. * To change the zone record''s IP address, we recommend that you use the `swapip` script or the `setsiteip` function instead. * You **cannot** edit other DNS zones that reside on *Write-only* servers in a DNS cluster. **Note:** On servers that run CentOS 7, you may see a `named` warning about the absence of SPF resource records on DNS. * This warning is **not** relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain `bind-9.9.4-23.el7`, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNS-editzonerecord requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/DnsEditZoneParameterType' description: The updated DNS Zone Record. required: true responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: editzonerecord 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: 'Bind reloading on hostname using rndc zone: [example.com] ' type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 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 DNS zone record tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --input=json --output=jsonpretty \\\n editzonerecord\n" - label: HTTP Request (Wire Format) lang: HTTP source: 'POST /cpsess##########/json-api/editzonerecord HTTP/1.1 Host: example.com:2083 Cookie: ################################### Content-Type: application/json Content-Length: 0 ' x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /enable_dnssec_for_domains: get: description: 'This function enables DNSSEC on the domain. **Note:** * Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error. * After you enable DNSSEC on the domain, you **must** add the Delegation of Signing (DS) records on your DNS server and with your registrar. * You **cannot** modify the DNSSEC security key. To make any changes, you **must** disable, delete, and re-create the DNSSEC security key.' operationId: DNS-enable_dnssec_for_domains parameters: - description: 'The domain for which to enable DNSSEC. **Note:** To enable DNSSEC on multiple domains, duplicate or increment the parameter name. For example, to check three domains, you could: * Use the `domain` parameter multiple times. * Use the `domain`, `domain-1`, and `domain-2` parameters.' examples: multiple: summary: Multiple domains value: domain=example.com&domain-1=example1.com&domain-2=example2.com multiple-alternative: summary: Multiple domains value: domain=example.com&domain=example1.com&domain=example2.com single: summary: A single domain. value: example.com in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'Whether to activate the newly-created key. * `1` - Activate the key. * `0` - Do **not** activate the key.' in: query name: active required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: 'The algorithm that the system uses to generate the security key. * `5` - RSA/SHA-1 * `6` - DSA-NSEC3-SHA1 * `7` - RSASHA1-NSEC3-SHA1 * `8` - RSA/SHA-256 * `10` - RSA/SHA-512 * `13` - ECDSA Curve P-256 with SHA-256 * `14` - ECDSA Curve P-384 with SHA-384 **Note:** We recommend that you use an ECDSA Curve P-256 with SHA-256 (13) value if your registrar supports it.' in: query name: algo_num required: false schema: default: 8 enum: - 5 - 6 - 7 - 8 - 10 - 13 - 14 example: 8 type: integer - description: 'The manner in which the system creates the security key. * `classic` - Use separate keys for KSK and ZSK. Use this value when the `algo_num` parameter is equal to or less than 8. * `simple` - Use a single key for both KSK and ZSK. Use this value when the `algo_num` parameter is greater than 8.' in: query name: key_setup required: false schema: default: classic enum: - classic - simple example: classic type: string - description: The number of times that the system rehashes the first resource record hash operation. in: query name: nsec3_iterations required: false schema: default: 7 example: 7 maximum: 500 minimum: 1 type: integer - description: 'Whether NSEC3 operates in Narrow or Inclusive mode. **Note:** For information about these modes, read [PowerDNS''s DNSSEC documentation](https://doc.powerdns.com/authoritative/dnssec/intro.html). * `1` - Narrow mode. * `0` - Inclusive mode.' in: query name: nsec3_narrow required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer - description: 'Whether the system will create records for all delegations. * `1` - Create records for all delegations. * `0` - Create records only for secure delegations. **Note:** Only use the `1` value if you **must** create records for all delegations.' in: query name: nsec3_opt_out required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'A hexadecimal string that the system appends to the domain name before it applies the hash function to the name. **Note:** For information about salt values, read [RFC 5155](https://tools.ietf.org/html/rfc5155#section-3.1.5).' in: query name: nsec3_salt required: false schema: example: 1a2b3c4d5e6f type: string - description: 'Whether the domain will use [Next Secure Record](https://tools.ietf.org/html/rfc4470) (NSEC) or NSEC3 semantics. * `1` - Use NSEC3 semantics. * `0` - Use NSEC semantics. **Note:** If you use this value, the system ignores the other NSEC3 options.' in: query name: use_nsec3 required: false schema: default: 1 enum: - 0 - 1 example: 1 type: integer responses: '200': content: application/json: schema: properties: data: properties: domains: description: An array of objects that contains information about each domain. items: properties: domain: description: The domain for which the system enabled DNSSEC. example: example.com format: domain type: string enabled: description: 'Whether the system enabled DNSSEC. * `1` - Enabled. * `0` - The system failed to enable DNSSEC. **Note:** This function will **not** return the `nsec_version` and `new_key_id` returns if this return is a `0` value.' enum: - 0 - 1 example: 1 type: integer new_key_id: description: The assigned security key ID. A valid ID. example: '2' type: string nsec_error: description: 'The domain has a NSEC3 configuration error. **Note:** The function **only** displays this return if there is a NSEC3 configuration error. An error message.' example: Error message. type: string nsec_version: description: 'The version of DNSSEC the system used. * `NSEC3` * `NSEC` **Note:** The function only displays this return if there is a NSEC3 configuration error. The system also returns the error in the `nsec_error` return.' enum: - NSEC3 - NSEC example: NSEC3 type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: enable_dnssec_for_domains 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Enable DNSSEC on domain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n enable_dnssec_for_domains \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/enable_dnssec_for_domains?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /export_zone_dnskey: get: description: This function exports a domain's DNSKEY record value. operationId: DNS-export_zone_dnskey parameters: - description: The domain from which to fetch the DNSKEY record value. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The DNSSEC record's ID. in: query name: key_id required: true schema: example: 12345 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: data: properties: dnskey: description: The DNSKEY record value. example: AwEAAch8SGW4vE6PjFWA9rbUm0AfTq+gJ0HC/nLu+2axdWHBIStt9lsOzKDorAr4vlmhlJzEzA62s96xp6mZ7XHUyWnkFwLs8obo6upL2in4h1ToOxzVl3lTs8O+kWtDq5/h1nwFlPDs9zpLJhlkTCtx2OTGbvimEYeqwPolUuSQR/Yb type: string key_id: description: The security key's ID. example: 12345 minimum: 1 type: integer type: object metadata: properties: command: description: The method name called. example: export_zone_dnskey 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Export domain's DNSKEY record value tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n export_zone_dnskey \\\n domain='example.com' \\\n key_id='12345'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/export_zone_dnskey?api.version=1&domain=example.com&key_id=12345 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '88' 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. /export_zone_files: get: description: 'This function returns one or more DNS zones, in RFC-1035 format. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNS-export_zone_files parameters: - description: The DNS zones to display. in: query name: zone required: true schema: example: - example.com - example.net items: example: example.com format: domain type: string type: array responses: '200': content: application/json: schema: properties: data: properties: payload: description: The requested DNS zone texts. example: - text_b64: AAAABBCCDdshjke== zone: example.com - text_b64: BBBBCCDDDdshjke== zone: example.net items: properties: text_b64: description: The DNS zone’s text representation. format: base64 type: string zone: description: The DNS zone’s name. format: domain type: string type: object type: array metadata: properties: command: description: The method name called. example: export_zone_files 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Export DNS zones in zone file format tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n export_zone_files \\\n zone='example.com' zone='example.net'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/export_zone_files?api.version=1&zone=example.com&zone=example.net x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.96' 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. /export_zone_key: get: description: 'This function exports a DNSSEC security key to a domain. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-export_zone_key parameters: - description: The domain to export the security key to. in: query name: domain required: true schema: example: example.com type: string - description: 'The security key''s ID. **Note:** You can locate the ID with the WHM AP1 `fetch_ds_records_for_domains` function.' in: query name: key_id required: true schema: example: 1 type: integer responses: '200': content: application/json: schema: properties: data: properties: key_tag: description: The security key's integer value. example: 40481 type: integer key_type: description: 'The type of security key. * `CSK` — Combined Signing Key. * `KSK` — Key Signing Key. * `ZSK` — Zone Signing Key.' example: CSK type: string type: object metadata: properties: command: description: The method name called. example: export_zone_key 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Export domain's DNSSEC key tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n export_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/export_zone_key?api.version=1&domain=example.com&key_id=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /fetch_ds_records_for_domains: get: description: 'This function fetches a domain''s Delegation of Signing (DS) record. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-fetch_ds_records_for_domains parameters: - description: 'The domain to fetch a DS record from. **Note:** To fetch records from multiple domains, duplicate or increment the parameter name. For example, to check three domains, you could: * Use the `domain` parameter multiple times. * Use the `domain`, `domain-1`, and `domain-2` parameters.' examples: multiple: summary: Multiple domains value: domain=example.com&domain-1=example1.com&domain-2=example2.com multiple-alternative: summary: Multiple domains value: domain=example.com&domain=example1.com&domain=example2.com single: summary: A single domain. value: example.com in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: domains: description: An array of objects that contains information about each domain. items: properties: domain: description: The domain name. example: example.com format: domain type: string ds_records: description: 'An object that contains domain''s DS records. **Note:** If the domain does **not** have a DS record, this function returns an empty object.' example: keys: '40481': active: 1 algo_desc: RSA/SHA-256 algo_num: 8 algo_tag: RSASHA256 bits: 2048 created: 1575395316 digests: - algo_desc: SHA-1 algo_num: 1 digest: 2808a14b89118256119d93d24b9e6b673dca092b - algo_desc: SHA-256 algo_num: 2 digest: 02a57812deb952438382ed8dd20f00d4af844a55b5324d28bb - algo_desc: SHA-384 algo_num: 4 digest: 4569a6fcfe9e151ec6a163307e67eaa3a9547f16cd80751b0d46eb498bd96743bd4ff7c4f6fd5f76cc780aeb979cd08d flags: 257 key_id: 1 key_tag: 40481 key_type: KSK privatekey: 'Private-key-format: v1.2 Algorithm: 8 (RSASHA256) Modulus: syUlztxieV1aOtuYAGGA4VBxgquwqPTWQXcDVY1VRFcPgFmLMWYr6dDnN4OUhu2yIulK3KMeZmAc/DmwM+yNdCdYc9y84gw5OyONKduuPGYXfwCiJfOJ+NpGaFomK6fVFN8BMi6LUBytdA4gotPw45Uz8FIbl1KsEOnV4/ZpjiM= PublicExponent: AQAB PrivateExponent: LxIfsQ7vQPxqbPSuJ8t21b0RVkhOjtZmRaVD1wLf2KkXhZ4BmOVDvJgLaObF6/4gxFOQPBEQN84hT5TI25vYPrAwRAlP/yGmQ4Z2aPIYeEawoqqNoYEa5Xjs1X90i6/+Y8mJSZpGvr4/Y4ElothZTUw+LCYb6o9ulg53yya8KUE= Prime1: 4od92Rbx9fSXRIk6eSSdTYN/Do3zgDiCuxmuZaCrrEAlkiK11iz/s4aZGj9+Yk4NfusjXr3NqU1OMfBiIp67Sw== Prime2: ynOJdz/E4/B6iBtuz/4y0kasljMtiJnaNIxPr4LG+hByx7WWCnaPm6p8g1pz3FC/w7HAdWq9xzR1VnbRPGcZiQ== Exponent1: KUKmkIEWZ0c6ujgIl4IsyK6X2O3QGV2xqiSeWFJwknpInZqG5lDh7jAo+NfxzDQNTz3C/oGx0RGMmZoANfAViw== Exponent2: ZcFkmpdmstqv+7EuJUSy7pWvMV9Px5Ts4/SSKLkmoZGa314Zp/CnhapPIwZXrai4effhsCKSeImZYHgf+qgnYQ== Coefficient: PBQUQquZB0kG//cy8oVA6nHvKkvVJ8zV4GVlkXHTDylbjoWBTuNWwQ93t5SM7Rz3JePHImWdOVMYNIXpPlp56g== ' nsec_details: nsec3_hash_algo_desc: SHA-1 nsec3_hash_algo_num: 1 nsec3_iterations: 7 nsec3_narrow: 1 nsec3_opt_out: 0 nsec3_salt: 1a2b3c4d5e6f nsec_version: NSEC3 properties: keys: additionalProperties: description: Each key/value property includes information related the domain's DNSSEC record. properties: active: description: 'Whether the DS key is active. * `1` - Active. * `0` - Inactive.' enum: - 0 - 1 example: 1 type: integer algo_desc: description: A description of the algorithm that the DS key uses. example: RSA/SHA-256 type: string algo_num: description: 'The [Internet Engineering Task Force](https://www.ietf.org/) (IETF)-recognized DNSSEC Digest Algorithm Number. * `5` - RSA/SHA-1 * `6` - DSA-NSEC3-SHA1 * `7` - RSASHA1-NSEC3-SHA1 * `8` - RSA/SHA-256 * `10` - RSA/SHA-512 * `13` - ECDSA Curve P-256 with SHA-256 * `14` - ECDSA Curve P-384 with SHA-384' enum: - 5 - 6 - 7 - 8 - 10 - 13 - 14 example: 8 type: integer algo_tag: description: The short-form reference to the algorithm. example: RSASHA256 type: string bits: description: The DS key's size, in bits. example: 2048 format: bits type: integer created: description: 'The key''s creation time, in [Unix time format](https://en.wikipedia.org/wiki/Unix_time). * `0` - The creation time is unknown. * A valid timestamp, in Unix epoch time.' example: 1575395316 format: unix_timestamp type: integer digests: description: An array of objects of information the registrar uses to populate DS records. items: properties: algo_desc: description: A description of the algorithm that the DS record uses. example: SHA-1 type: string algo_num: description: The IETF-recognized DNSSEC Algorithm Number. example: 1 minimum: 1 type: integer digest: description: The actual digest in the DS record. example: 2808a14b89118256119d93d24b9e6b673dca092b type: string type: object type: array flags: description: 'An integer that determines the `key_type` value. * `256` - A Zone Signing Key (ZSK). * `257` - A Combined Signing Key (CSK) or Key Signing Key (KSK).' enum: - 256 - 257 example: 257 type: integer key_id: description: PowerDNS's internal identifier. example: 1 minimum: 1 type: integer key_tag: description: The DS key's integer value. example: 40481 minimum: 1 type: integer key_type: description: 'The DS key''s signing type. * `CSK` - Combined Signing Key. * `KSK` - Key Signing Key. * `ZSK` - Zone Signing Key.' enum: - CSK - KSK - ZSK example: KSK type: string privatekey: description: The private key in ISC format. example: 'Private-key-format: v1.2 Algorithm: 8 (RSASHA256) Modulus: syUlztxieV1aOtuYAGGA4VBxgquwqPTWQXcDVY1VRFcPgFmLMWYr6dDnN4OUhu2yIulK3KMeZmAc/DmwM+yNdCdYc9y84gw5OyONKduuPGYXfwCiJfOJ+NpGaFomK6fVFN8BMi6LUBytdA4gotPw45Uz8FIbl1KsEOnV4/ZpjiM= PublicExponent: AQAB PrivateExponent: LxIfsQ7vQPxqbPSuJ8t21b0RVkhOjtZmRaVD1wLf2KkXhZ4BmOVDvJgLaObF6/4gxFOQPBEQN84hT5TI25vYPrAwRAlP/yGmQ4Z2aPIYeEawoqqNoYEa5Xjs1X90i6/+Y8mJSZpGvr4/Y4ElothZTUw+LCYb6o9ulg53yya8KUE= Prime1: 4od92Rbx9fSXRIk6eSSdTYN/Do3zgDiCuxmuZaCrrEAlkiK11iz/s4aZGj9+Yk4NfusjXr3NqU1OMfBiIp67Sw== Prime2: ynOJdz/E4/B6iBtuz/4y0kasljMtiJnaNIxPr4LG+hByx7WWCnaPm6p8g1pz3FC/w7HAdWq9xzR1VnbRPGcZiQ== Exponent1: KUKmkIEWZ0c6ujgIl4IsyK6X2O3QGV2xqiSeWFJwknpInZqG5lDh7jAo+NfxzDQNTz3C/oGx0RGMmZoANfAViw== Exponent2: ZcFkmpdmstqv+7EuJUSy7pWvMV9Px5Ts4/SSKLkmoZGa314Zp/CnhapPIwZXrai4effhsCKSeImZYHgf+qgnYQ== Coefficient: PBQUQquZB0kG//cy8oVA6nHvKkvVJ8zV4GVlkXHTDylbjoWBTuNWwQ93t5SM7Rz3JePHImWdOVMYNIXpPlp56g== ' type: string type: object description: An object containing the DS keys on the requested domain. type: object nsec_details: description: 'An object with of the domain''s [Next Secure Record](https://tools.ietf.org/html/rfc4470) (NSEC) information. **Note:** If the domain uses NSEC semantics, only the `nsec_version` return appears in this object.' properties: nsec3_hash_algo_desc: description: description of the NSEC3 key's algorithm. example: SHA-1 type: string nsec3_hash_algo_num: description: The DNSSEC ([Domain Name Security Extensions](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions)) Digest Algorithm Number. example: 1 minimum: 1 type: integer nsec3_iterations: description: The number of times that the system rehashes the first hash operation. example: 7 minimum: 1 type: integer nsec3_narrow: description: 'Whether NSEC3 will operate in Narrow or Inclusive mode. **Note:** For more information about these modes, read [PowerDNS''s DNSSEC documentation](https://doc.powerdns.com/authoritative/dnssec/intro.html). * `1` - Narrow mode. * `0` - Inclusive mode.' enum: - 0 - 1 example: 1 type: integer nsec3_opt_out: description: 'Whether NSEC3 will create records for all delegations or only for secure delegations. * `1` - Create records for all delegations. * `0` - Create records **only** for secure delegations.' enum: - 0 - 1 example: 0 type: integer nsec3_salt: description: 'The salt value that PowerDNS uses in the hashes. **Note:** For more information about salt values, read [RFC 5155](https://tools.ietf.org/html/rfc5155#section-3.1.5).' example: 1a2b3c4d5e6f type: string nsec_version: description: Whether the domain uses NSEC or NSEC3 ([Next Secure Record version 3](https://tools.ietf.org/html/rfc5155)) DNSSEC semantics. enum: - NSEC - NSEC3 example: NSEC3 type: string type: object type: object type: object type: array type: object metadata: properties: command: description: The method name called. example: fetch_ds_records_for_domains 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: - 0 - 1 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 domain's DS record tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n fetch_ds_records_for_domains \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/fetch_ds_records_for_domains?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /get_nameserver_config: get: description: This function retrieves the default nameservers for the currently-authenticated user. operationId: Nameserver-get_nameserver_config parameters: [] responses: '200': content: application/json: schema: properties: data: properties: nameservers: description: The currently-authenticated user's nameservers. example: - ns1.example.com - ns2.example.com items: type: string type: array type: object metadata: properties: command: description: The method name called. example: get_nameserver_config 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: - 0 - 1 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 current user's nameservers tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_nameserver_config\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_nameserver_config?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '56' 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. /getzonerecord: get: description: 'This function returns a line from a domain''s DNS zone configuration. **Note:** On servers that run CentOS 7, you may see a named warning about the absence of SPF resource records on DNS. * This warning is **not** relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records. * Red Hat 7.1 and CentOS 7.1 both contain `bind-9.9.4-23.el7`, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors. **Important:** When you disable the DNS Role, the system **disables** this function.' operationId: DNS-getzonerecord parameters: - description: The zone record's domain. in: query name: domain required: true schema: example: example.com type: string - description: The zone record's line number. in: query name: line required: true schema: example: 2 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: data: properties: record: description: An array of objects containing the domain's zone record data. items: $ref: '#/components/schemas/getzonerecordResponseBase' type: array type: object metadata: properties: command: description: The method name called. example: getzonerecord 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: Record obtained. type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 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 specific line from domain's DNS configuration tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n getzonerecord \\\n domain='example.com' \\\n line='2'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/getzonerecord?api.version=1&domain=example.com&line=2 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /has_local_authority: get: description: 'This function checks whether the local server has the authority to publish changes for the domain''s DNS records. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: getHasLocalAuthority parameters: - description: 'The domain to check whether the local server is authoritative for the domain''s DNS records. **Note:** To check multiple domains, duplicate or increment the parameter name. For example, to check three domains, use the `domain` parameter multiple times. Or the `domain`, `domain-1`, and `domain-2` parameters.' examples: multiple: summary: Multiple domains value: domain=example.com domain-1=example1.com domain-2=example2.com single: summary: A single domain value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: records: description: An array of objects that contains information about about the authoritative status of a domain's local DNS zone files. items: properties: domain: description: The queried domain. example: example.com type: string error: description: "A message that details the reason why the local server's authoritative check failed.\n\n**Note:**\n\n The function **only** returns this value when the check fails." example: (XID qdbmuk) DNS query (example3.com/SOA) timeout! type: string local_authority: description: 'Whether the local server is authoritative for the domain''s DNS records. * `1` — The local server is authoritative for the domain''s DNS records. * `0` — The local server is **not** authoritative for the domain''s DNS records.' enum: - 0 - 1 example: 1 type: integer nameservers: description: The domain's authoritative nameservers, if any exist. example: - ns1.example.com - ns2.example.com items: format: domain type: string type: array zone: description: The DNS zone that contains the domain's DNS records, if one exists. example: example.com format: domain type: - string - 'null' type: object type: array type: object metadata: properties: command: description: The method name called. example: has_local_authority 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate local server is authoritative tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n has_local_authority \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/has_local_authority?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' x-operation-id-source: normalized x-operation-id-original: DNS-has_local_authority 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. /import_zone_key: get: description: 'This function imports a DNSSEC security key. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-import_zone_key parameters: - description: The domain for which to import the security key. in: query name: domain required: true schema: example: example.com type: string - description: 'The security key''s data that the [pdnsuti](https://doc.powerdns.com/authoritative/manpages/pdnsutil.1.html) utility''s `export-zone-key` call returns.' in: query name: key_data required: true schema: example: Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A type: string - description: 'The security key''s type. * `ksk` — Key-Signing Key * `zsk` — Zone Signing Key **Note:** You **must** call these values in lowercase.' in: query name: key_type required: true schema: example: ksk type: string responses: '200': content: application/json: schema: properties: data: properties: import_key_id: description: The system's assigned ID for the imported security key. example: 1 minimum: 1 type: integer type: object metadata: properties: command: description: The method name called. example: import_zone_key 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Import DNSSEC key tags: - DNS x-codeSamples: - label: CLI lang: Shell source: whmapi1 --output=jsonpretty import_zone_key domain='example.com' key_type='ksk' key_data='Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A' - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/import_zone_key?api.version=1&domain=example.com&key_type=ksk&key_data=Private-key-format%3a%2520v1.2%250AAlgorithm%3a%252013%2520%5c%28ECDSAP256SHA256%5c%29%250APrivateKey%3a%2520xCM281KtWE9oCsUX8fP1hDZ02%2fX7JCjp4QZA%2fDZjfX0%3d%250A%250A x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /is_alias_available: get: description: 'This function returns whether `ALIAS` and `ANAME` records are available and the value of the running PowerDNS (PDNS) `resolver` setting, if any exists. For more information, read our `ALIAS` documentation.' operationId: getIsAliasAvailable responses: '200': content: application/json: schema: properties: data: properties: alias: description: 'Whether `ALIAS` records are available. * `1` - Available. * `0` - Not available. When `ALIAS` records are enabled, they may work in API calls that accept `A` and `AAAA` records. However, the `ALIAS` record must use a fully qualified domain name (FQDN) rather than an IP address.' enum: - 1 - 0 example: 1 type: integer aname: description: 'Whether `ANAME` records are available. * `1` - Available. * `0` - Not available. **Note:** The `aname` value is always set to false (i.e. Not available). The `ANAME` record is currently not supported. It is included for completeness and future proofing.' enum: - 1 - 0 example: 0 type: integer resolver: description: The value (if any) of the running PDNS’s `resolver` setting. example: 8.8.8.8 type: string type: object metadata: properties: command: description: The method name called. example: is_alias_available 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: - 0 - 1 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 `ALIAS` DNS record availability & resolver tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n is_alias_available\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/is_alias_available?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: cPanel 122 x-operation-id-source: normalized x-operation-id-original: DNS-is_alias_available 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. /is_https_available: get: description: 'This function fetches information regarding HTTPS records support. HTTPS records are defined in RFC 9460 and provide service parameters for HTTPS endpoints. For more information, read our DNS Zone Manager documentation.' operationId: getIsHttpsAvailable responses: '200': content: application/json: schema: properties: data: properties: https: description: 'Whether HTTPS records are supported. * `1` - Supported. * `0` - Not supported.' enum: - 1 - 0 example: 1 type: integer dns_server: description: The DNS server type currently in use (bind, pdns, etc.). example: pdns type: string type: object metadata: properties: command: description: The method name called. example: is_https_available 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: - 0 - 1 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 HTTPS DNS record support information tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n is_https_available\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/is_https_available?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: cPanel 122 x-operation-id-source: normalized x-operation-id-original: DNS-is_https_available 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. /is_svcb_available: get: description: 'This function fetches information regarding SVCB records support. SVCB records are defined in RFC 9460 and provide service binding and aliasing for arbitrary services. For more information, read our DNS Zone Manager documentation.' operationId: getIsSvcbAvailable responses: '200': content: application/json: schema: properties: data: properties: svcb: description: 'Whether SVCB records are supported. * `1` - Supported. * `0` - Not supported.' enum: - 1 - 0 example: 1 type: integer dns_server: description: The DNS server type currently in use (bind, pdns, etc.). example: pdns type: string type: object metadata: properties: command: description: The method name called. example: is_svcb_available 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: - 0 - 1 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 SVCB DNS record support information tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n is_svcb_available\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/is_svcb_available?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: cPanel 122 x-operation-id-source: normalized x-operation-id-original: DNS-is_svcb_available 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. /killdns: get: description: 'This function deletes a DNS zone. **Important:** - The WHM API 1 adddns function adds an XDNS entry for a domain in the following locations: - The `/var/cpanel/users/USER` file, where `USER` represents the domain''s owner. - The `/etc/vdomainaliases/DOMAIN` directory, where `DOMAIN` represents the new zone''s domain. - The `/etc/vfilters/DOMAIN` directory, where `DOMAIN` represents the new zone''s domain. - This function does **not** automatically delete these entries. You **must** manually delete these entries, or you **cannot** use this domain as a value in other API functions. - You cannot delete other DNS zones that reside on *Write-only* servers in a DNS cluster. **Important:** When you disable the DNS role, the system **disables** this function. **NOTE:** You **cannot** use this function to delete temporary domains.' operationId: DNS-killdns parameters: - description: The zone record's domain. in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: killdns type: string output: properties: raw: description: The raw response output. example: example.com => deleted from example. type: string type: object 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: Zones Removed type: string result: description: '* `1` - Success. * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Delete DNS zone tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n killdns \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/killdns?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /listmxs: get: description: 'This function lists a domain''s MX records. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNS-listmxs parameters: - description: The zone record's domain. in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: record: description: An array of zone record data objects. items: properties: Line: description: The zone record's line number. example: 1 minimum: 1 type: integer class: description: The record's class. example: IN type: string exchange: description: The domain's mail exchanger. example: mail.example.com format: domain type: string name: description: The record's name. example: hostname.example.com type: string preference: description: 'The MX record''s priority order. **Note:** Lower values indicate a higher priority order.' example: 20 minimum: 1 type: integer ttl: description: The record's Time To Live (TTL) in seconds. example: 86400 minimum: 1 type: integer type: description: The DNS record's type. example: MX type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: listmxs 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: Records obtained. type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 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 domain's mail exchanger records tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n listmxs \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/listmxs?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /listzones: get: description: 'This function lists the server''s DNS zones. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNS-listzones parameters: [] responses: '200': content: application/json: schema: properties: data: properties: zone: description: An array of objects of zone information. items: properties: domain: description: The domain name. example: example.com format: domain type: string zonefile: description: The zone file's name. example: example.net.db type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: listzones 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: - 0 - 1 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 server's DNS zones tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n listzones\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/listzones?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /lookupnsip: get: description: This function retrieves a nameserver's IP address. operationId: Nameserver-lookupnsip parameters: - description: The nameserver's hostname. in: query name: host required: true schema: example: ns1.example.com format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: ip: description: The nameserver's IP address. example: 192.168.0.20 format: ipv4 type: string type: object metadata: properties: command: description: The method name called. example: lookupnsip 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: - 0 - 1 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 nameserver's IP address tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n lookupnsip \\\n host='ns1.example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/lookupnsip?api.version=1&host=ns1.example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /lookupnsips: get: description: This function retrieves a nameserver's IPv4 and IPv6 addresses. operationId: Nameserver-lookupnsips parameters: - description: The nameserver's hostname. in: query name: host required: true schema: example: ns1.example.com type: string responses: '200': content: application/json: schema: properties: data: properties: ipv4: description: "The nameserver's IPv4 address.\n\n**Note:**\n\n The function returns this value **only** if a nameserver with an IPv4 address exists on the server." example: 192.0.2.0 format: ipv4 type: string ipv6: description: "The nameserver's IPv6 address.\n\n**Note:**\n\n The function returns this value **only** if a nameserver with an IPv6 address exists on the server." example: 2001:0db8:0:0:1:0:0:1 format: ipv6 type: string type: object metadata: properties: command: description: The method name called. example: lookupnsips 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: - 0 - 1 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 nameserver's IPv4 and IPv6 addresses tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n lookupnsips \\\n host='ns1.example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/lookupnsips?api.version=1&host=ns1.example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '60' 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. /mass_edit_dns_zone: get: description: 'This function updates a given DNS zone. It can add, edit, and remove many records in a single call. It also ensures that each record not removed will occupy the same number of lines after the edit as it did before the edit. **NOTE:** You **cannot** use this function to modify temporary domains.' operationId: DNS-mass_edit_dns_zone parameters: - description: 'The current serial number in the DNS zone’s SOA (Start of Authority) record. If this value does not match the zone’s current state, the request fails.' in: query name: serial required: true schema: example: 202001010100 minimum: 0 type: integer - description: The name of one of the user’s DNS zones. in: query name: zone required: true schema: example: example.com type: string - description: "The records to add to the zone. Each item must be a serialized\nJSON object that contains:\n\n* `dname` — The record’s name.\n* `ttl` — The record’s TTL (Time-To-Live) value.\n* `record_type` — The record’s type. For example, `A` or `TXT`.\n* `data` — An array of strings. The format and number of the\n strings depend on the `record_type` value." examples: a: description: An A record. value: '''{"dname":"example", "ttl":14400, "record_type":"A", "data":["11.22.33.44"]}''' aaaa: description: A TXT record. value: '''{"dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}''' explode: true in: query name: add required: false schema: items: format: json type: string type: array - description: "The records to edit in the zone. Each item must be a serialized\nJSON object that contains:\n\n* `line_index` — The line number in the DNS zone where the record starts.\n This is a 0-based index, so to edit the first line in the file\n use the `0` value. To edit the second line, give `1`, and so forth.\n* `dname` — The record’s name.\n* `ttl` — The record’s TTL (Time-To-Live) value.\n* `record_type` — The record’s new type. For example, `A` or `TXT`.\n* `data` — An array of strings. The format and number of the\n strings depend on the `record_type` value." explode: true in: query name: edit required: false schema: items: example: '''{"line_index": 9, "dname":"example", "ttl":14400, "record_type": "TXT", "data":["string1", "string2"]}''' format: json type: string type: array - description: The line indexes of records to remove from the zone. explode: true in: query name: remove required: false schema: items: example: 22 minimum: 0 type: integer type: array responses: '200': content: application/json: schema: properties: data: properties: new_serial: description: 'The DNS zone’s SOA record’s new serial number. You can use this to submit later edits if you track the number of lines each record takes up.' example: 2021031903 minimum: 0 type: integer metadata: properties: command: description: The method name called. example: mass_edit_dns_zone 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: - 0 - 1 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 a DNS zone tags: - DNS x-codeSamples: - label: CLI lang: Shell source: whmapi1 mass_edit_dns_zone zone='example.com' serial='202001010100' remove=23 add='{"dname":"example", "ttl":14400, "record_type":"A", "data":["11.22.33.44"]}' - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/mass_edit_dns_zone?api.version=1&add=%27%7B%22dname%22%3A%22example%22%2C+%22ttl%22%3A14400%2C+%22record_type%22%3A%22A%22%2C+%22data%22%3A%5B%2211.22.33.44%22%5D%7D%27 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: 96 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. /parse_dns_zone: get: description: 'This function parses a given DNS zone. **Important:** Most DNS zones contain only 7-bit ASCII. However, it is possible for DNS zones to contain any binary sequence. An application that decodes this function''s base64 output **must** be able to handle cases where the decoded octets do not match any specific character encoding.' operationId: DNS-parse_dns_zone parameters: - description: The name of one of the user’s DNS zones. in: query name: zone required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: data: properties: payload: $ref: '#/components/schemas/Payload' type: object metadata: properties: command: description: The method name called. example: parse_dns_zone 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: - 0 - 1 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 parsed DNS zone tags: - DNS x-codeSamples: - label: CLI lang: Shell source: whmapi1 parse_dns_zone zone='example.com' - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/parse_dns_zone?api.version=1&zone=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: 96 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. /remove_zone_key: get: description: 'This function removes a DNSSEC security key. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-remove_zone_key parameters: - description: The domain for which to remove a security key. in: query name: domain required: true schema: example: example.com type: string - description: 'The security key''s ID. **Note:** Use the WHM AP1 `fetch_ds_records_for_domains` function to locate the domain''s security key ID.' in: query name: key_id required: true schema: example: 1 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: remove_zone_key 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: - 0 - 1 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 DNSSEC key tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n remove_zone_key \\\n domain='example.com' \\\n key_id='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/remove_zone_key?api.version=1&domain=example.com&key_id=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /removezonerecord: get: description: 'This function deletes a DNS zone record. **Warning:** Incorrect use of this function could cause domains to resolve incorrectly. Exercise **extreme caution** when you remove DNS zone records. To effectively use this function, use the following workflow: 1. Run the `dumpzone` function. 2. Locate the `Line` value that corresponds to the zone record to delete. 3. Use the values from that zone record to formulate the appropriate `removezonerecord` parameters. **Important:** * When you disable the DNS role, the system **disables** this function. * You **cannot** use this function to modify temporary domains.' operationId: DNS-removezonerecord parameters: - description: The DNS zone record file's line number. in: query name: line required: true schema: example: 4 minimum: 1 type: integer - description: The zone record's domain. in: query name: zone required: true schema: example: example.com format: domain type: string - description: 'The zone file''s serial number. This parameter defaults to the zone file''s current serial number.' in: query name: serialnum required: false schema: example: '2013122501' type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: removezonerecord 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: 'Bind reloading on hostname using rndc zone: [example.com] ' type: string result: description: '* `1` - Success. * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Delete DNS zone record tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n removezonerecord \\\n zone='example.com' \\\n line='4'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/removezonerecord?api.version=1&zone=example.com&line=4 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /resetzone: get: description: 'This function resets a DNS zone to its default values. This also resets the domain''s subdomain DNS records, and restores zone file subdomains in the server''s `httpd.conf` file. For example, use this function to restore DNS zones that are corrupt. **Note:** Zone resets preserve valid TXT records, but **all** other records will return to their default values. **Important:** When you disable the DNS role, the system **disables** this function. **Note** You **must** include either the `domain` or the `zone` parameters.' operationId: DNS-resetzone parameters: - description: The domain. in: query name: domain required: false schema: example: example.com format: domain type: string - description: The domain's owner. in: query name: user required: false schema: example: user format: username type: string - description: The zone file. in: query name: zone required: false schema: example: example.com.db type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: resetzone 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Restore DNS zone to default values tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n resetzone\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/resetzone?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /resolvedomainname: get: description: This function resolves a domain's IPv4 address. operationId: Nameserver-resolvedomainname parameters: - description: The domain. in: query name: domain required: true schema: example: example.com format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: ip: description: The domain's IPv4 address. example: 192.168.0.20 format: ipv4 type: string type: object metadata: properties: command: description: The method name called. example: resolvedomainname 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: - 0 - 1 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 domain's IP address tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n resolvedomainname \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/resolvedomainname?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.28' 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. /savemxs: get: description: 'This function creates a new MX record. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNS-savemxs parameters: - description: The zone record's domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The domain's mail exchanger. in: query name: exchange required: true schema: example: mail.example.com format: domain type: string - description: The record name. in: query name: name required: true schema: example: mail.example.com type: string - description: 'The MX record''s priority order. **Note:** Lower numbers indicate a higher priority order.' in: query name: preference required: true schema: example: 20 minimum: 1 type: integer - description: The record's class. in: query name: class required: false schema: default: IN example: IN type: string - description: The record's Time To Live (TTL) in seconds. in: query name: ttl required: false schema: default: 14400 example: 14400 minimum: 1 type: integer responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: savemxs 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: 'Bind reloading on server1 using rndc zone: [example.com] ' type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create mail exchanger record tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n savemxs \\\n domain='example.com' \\\n name='mail.example.com' \\\n exchange='mail.example.com' \\\n preference='20'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/savemxs?api.version=1&domain=example.com&name=mail.example.com&exchange=mail.example.com&preference=20 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.28' 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. /set_nameserver: get: description: This function sets the nameserver software that the remote servers in a DNS cluster run. The system queues the nameserver software that you select until the HTTP request finishes. Then, it sets the remote servers' nameserver software. operationId: Nameserver-set_nameserver parameters: - description: 'The nameserver software. * `BIND` * `PowerDNS` * `Disabled`' in: query name: nameserver required: true schema: enum: - BIND - PowerDNS - Disabled example: BIND type: string responses: '200': content: application/json: schema: properties: data: properties: message: description: A confirmation message from the system. example: Queued task to set nameserver to bind successfully. type: string nameserver: description: 'The nameserver software. * `bind` * `powerdns` * `disabled`' enum: - bind - powerdns - disabled example: bind type: string type: object metadata: properties: command: description: The method name called. example: set_nameserver 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: - 0 - 1 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 remote DNS server's nameserver software tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_nameserver \\\n nameserver='BIND'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_nameserver?api.version=1&nameserver=BIND x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' 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. /set_nsec3_for_domains: get: description: 'This function configures the domain to use Next Secure Record 3 (NSEC3) semantics. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-set_nsec3_for_domains parameters: - description: The domain for which to enable NSEC3 semantics. in: query name: domain required: true schema: example: example.com format: domain type: string - description: The number of times that the system re-executes the first resource record hash operation. in: query name: nsec3_iterations required: true schema: example: 7 maximum: 500 minimum: 0 type: integer - description: "Whether NSEC3 will operate in Narrow mode or Inclusive mode.\n\n **Note**\n\nFor information about these modes, read [PowerDNS's DNSSEC documentation](https://doc.powerdns.com/authoritative/dnssec/intro.html).\n\n* `1` - Narrow mode.\n* `0` - Inclusive mode." in: query name: nsec3_narrow required: true schema: enum: - 0 - 1 example: 1 type: integer - description: 'Whether the system will create records for **all** delegations. * `1` - Create records for **all** delegations. * `0` - Create records **only** for secure delegations. **Note** Only select `1` if you **must** create records for all delegations.' in: query name: nsec3_opt_out required: true schema: enum: - 0 - 1 example: 0 type: integer - description: "The salt value that PowerDNS uses in the hashes.\n\n **Note:**\n\n For information about salt values, read [RFC 5155](https://tools.ietf.org/html/rfc5155#section-3.1.5)." in: query name: nsec3_salt required: true schema: example: 1a2b3c4d5e6f type: string responses: '200': content: application/json: schema: properties: data: properties: domains: description: An array of objects that contains information about each domain. items: properties: domain: description: The domain for which the system enabled NSEC3. example: example.com format: domain type: string enabled: description: 'Whether the system enabled NSEC3. - `1` — Enabled. - `0` — The system failed to enable NSEC3.' enum: - 0 - 1 example: 1 type: integer error: description: "An error message that describes why the system could not enable NSEC3.\n\n**Note:**\n\n The function **only** displays this return when the enabled return is a `0` value." example: Error message. type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: set_nsec3_for_domains 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Enable NSEC3 semantics for domain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_nsec3_for_domains \\\n domain='example.com' \\\n nsec3_opt_out='0' \\\n nsec3_iterations='7' \\\n nsec3_narrow='1' \\\n nsec3_salt='1a2b3c4d5e6f'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_nsec3_for_domains?api.version=1&domain=example.com&nsec3_opt_out=0&nsec3_iterations=7&nsec3_narrow=1&nsec3_salt=1a2b3c4d5e6f x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /set_up_dns_resolver_workarounds: get: description: 'This function creates an Unbound (`libunbound`) DNS resolver configuration. **Important:** When you disable the DNS role, the system **disables** this function.' operationId: DNS-set_up_dns_resolver_workarounds parameters: [] responses: '200': content: application/json: schema: properties: data: properties: flags: description: 'An object that contains of [`libunbound` configuration options](https://www.nlnetlabs.nl/documentation/unbound/unbound.conf/). **Note:** The function **only** returns an option if the system finds a configuration issue.' properties: do-ip6: description: The system **cannot** create an [IPv6](https://en.wikipedia.org/wiki/IPv6) socket. example: 'no' type: string do-udp: description: The system **cannot** receive a [User Datagram Protocol (UDP)](https://en.wikipedia.org/wiki/User_Datagram_Protocol) DNS response. example: 'no' type: string edns-buffer-size: description: The [extension mechanism for DNS (EDNS)](https://en.wikipedia.org/wiki/Extension_mechanisms_for_DNS) length size is at or exceeds 512 bytes. example: '512' type: string type: object type: object metadata: properties: command: description: The method name called. example: set_up_dns_resolver_workarounds 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create unbound DNS resolver tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_up_dns_resolver_workarounds\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_up_dns_resolver_workarounds?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' 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. /setresolvers: get: description: 'This function configures the server''s resolver nameservers. **Warning:** * The nameservers that the server uses as resolvers **must** function correctly. If they do not, the server will experience performance and stability issues. * **Never** set a resolver nameserver to `127.0.0.1` on a cPanel & WHM server.' operationId: Resolvers-setresolvers parameters: - description: The server's primary resolver nameserver. in: query name: nameserver1 required: true schema: example: 192.168.0.20 oneOf: - format: ipv4 type: string - format: ipv6 type: string - description: The server's secondary resolver nameserver. in: query name: nameserver2 required: true schema: example: 192.168.0.21 format: ipv4 oneOf: - format: ipv4 type: string - format: ipv6 type: string - description: The server's tertiary resolver nameserver. in: query name: nameserver3 required: false schema: default: '' example: 2001:4860:4860::8888 oneOf: - format: ipv4 type: string - format: ipv6 type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: setresolvers type: string output: description: Messages returned from the call. properties: messages: example: 'Listed in order they are: 192.168.0.20 192.168.0.21 2001:4860:4860::8888 ' type: string type: object 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: Your resolvers have been setup! type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 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 server's resolver nameservers tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n setresolvers \\\n nameserver1='192.168.0.20' \\\n nameserver2='192.168.0.21'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/setresolvers?api.version=1&nameserver1=192.168.0.20&nameserver2=192.168.0.21 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' 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. /unset_nsec3_for_domains: get: description: 'This function configures the domain to use Next Secure Record (NSEC) semantics instead of Next Secure Record 3 (NSEC3) semantics. **Note:** Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn''t use PowerDNS, you will receive an error.' operationId: DNS-unset_nsec3_for_domains parameters: - description: The domain for which to disable NSEC3 semantics and use NSEC semantics. in: query name: domain required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: data: properties: domains: description: An array of objects that contain information about each domain. items: properties: disabled: description: 'Whether the system disabled NSEC3. * `1` — Disabled. * `0` — The system failed to disable NSEC3.' enum: - 0 - 1 example: 1 type: integer domain: description: The domain for which to disable NSEC3. example: example.com type: string error: description: 'An error message that describes why the system could not disable NSEC3. **Note:** The function **only** displays this return when the `disabled` return is a `0` value.' example: Error message. type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: unset_nsec3_for_domains 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: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Enable NSEC semantics for domain tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n unset_nsec3_for_domains \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/unset_nsec3_for_domains?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /update_nameservers_config: get: description: This function updates nameservers in the `wwwacct.conf` file. For more information, read our Installation Guide - Customize Your Installation documentation. operationId: Wwwacct-update_nameservers_config parameters: - description: The nameserver to add or update as the `wwwacct.conf` file's `NS` setting. If you do not supply a value, the function does not update the setting. in: query name: nameserver required: false schema: example: ns1.example.com format: domain type: string - description: The nameserver to add or update as the `wwwacct.conf` file's `NS2` setting. If you do not supply a value, the function does not update the setting. in: query name: nameserver2 required: false schema: example: ns2.example.com format: domain type: string - description: The nameserver to add or update as the `wwwacct.conf` file's `NS3` setting. If you do not supply a value, the function does not update the setting. in: query name: nameserver3 required: false schema: example: ns3.example.com format: domain type: string - description: The nameserver to add or update as the `wwwacct.conf` file's `NS4` setting. If you do not supply a value, the function does not update the setting. in: query name: nameserver4 required: false schema: example: ns4.example.com format: domain type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: update_nameservers_config 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: - 0 - 1 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 default nameservers tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n update_nameservers_config\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/update_nameservers_config?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '76' 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. /update_reverse_dns_cache: get: description: This function queries DNS and updates the map of local IP addresses to reverse DNS names. operationId: DNS-update_reverse_dns_cache parameters: [] responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: update_reverse_dns_cache 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: - 0 - 1 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 reverse DNS cache tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n update_reverse_dns_cache\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/update_reverse_dns_cache?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. /updateuserdomains: get: description: This function updates the `/etc/userdomains` file based on the entries in `/var/cpanel/users` directory. operationId: UserDomains-updateuserdomains parameters: [] responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: updateuserdomains 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: - 0 - 1 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 /etc/userdomains file tags: - DNS x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n updateuserdomains\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/updateuserdomains?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '86' 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. components: schemas: Payload: description: The zone’s content. items: discriminator: mapping: comment: '#/components/schemas/ResponseComment' control: '#/components/schemas/ResponseControl' record: '#/components/schemas/ResponseRR' propertyName: type oneOf: - $ref: '#/components/schemas/ResponseRR' - $ref: '#/components/schemas/ResponseControl' - $ref: '#/components/schemas/ResponseComment' type: array ResponseBase: properties: line_index: description: The line’s index in the zone file. example: 22 minimum: 0 type: integer type: description: 'The type of object in the zone file: * `record` - A resource record. * `control` - A control statement. * `comment` - A line comment.' enum: - record - control - comment type: string type: object ResponseControlOrComment: allOf: - $ref: '#/components/schemas/ResponseBase' - properties: text_b64: description: The line’s text, encoded to base64. example: OyBab25lIGZpbGUgZm9yIHRleGFzLmNvbQ== format: base64 type: string type: object ResponseComment: allOf: - $ref: '#/components/schemas/ResponseControlOrComment' title: Comment ResponseControl: allOf: - $ref: '#/components/schemas/ResponseControlOrComment' title: Control ResponseRR: allOf: - $ref: '#/components/schemas/ResponseBase' - properties: data_b64: description: The resource record’s content, encoded to base64. items: example: dGV4YXMuY29tLg== format: base64 type: string type: array dname_b64: description: The resource record’s owner, encoded to base64. A base64-decoded owner that lacks a trailing period (`.`) is a subdomain of the zone. example: dGV4YXMuY29tLg== format: base64 type: string record_type: description: The resource record’s type. example: MX type: string ttl: description: The resource record’s TTL (Time-to-Live). example: 14400 minimum: 0 type: integer type: object title: Resource Record asfdb: allOf: - properties: hostname: description: The database servers' hostname. example: afs.example.com type: string subtype: description: The AFS cell type. A 16-bit integer that represents the type of AFS cell. For example, a value of 1 indicates an AFS version 3.0 Volume Location Server. example: 1 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `AFSDB` — AFSDB records store the location of an AFS cell''s database servers.' example: AFSDB type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing AFSDB record data. **Note:** For more information about AFSDB records, read [RFC 1183 at IANA](http://tools.ietf.org/html/rfc1183).' DnsEditZoneParameterTypeALIAS: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: alias: description: 'The hostname you want to point to. **Note:** We strongly recommend that you do not use this function. Using the ALIAS DNS record may result in unexpected behavior, including website downtimes outside of your control, inconsistency in the handling of the record, and security vulnerabilities. This record is only available if you enable access to it and use PowerDNS.' example: hostname.example.com format: domain type: string required: - alias type: object a: allOf: - properties: address: description: The zone record's IPv4 address. example: 192.168.0.20 type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `A` — A records store IPv4 addresses. Use them to map a hostname to an IPv4 address.' example: A type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing A record data. **Note:** For more information about A records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' DnsEditZoneParameterTypePTR: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: ptrdname: description: 'A pointer to a canonical name (CNAME). **Note:** * Do **not** omit any necessary trailing periods. * For more information about PTR records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: hostname.example.com format: domain type: string type: object DnsAddZoneParameterTypeRP: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: mbox: description: 'The Responsible Person''s (RP) email address. **Note:** * Replace the `@` symbol with a period (`.`). * Do **not** omit any necessary trailing periods. * For more information about RP records, read [RFC 1183 at IANA](http://tools.ietf.org/html/rfc1183).' example: user.example.com. type: string txtdname: description: 'The RP''s domain name. **Note:** Do **not** omit any necessary trailing periods.' example: mx1.host.example.com. format: domain type: string type: object DnsAddZoneParameterTypeMX: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: exchange: description: The server's location's canonical name (CNAME). example: mail.example.com format: domain type: string preference: description: 'The record''s priority order. **Note:** * Lower values have a higher priority order. * For more information about MX records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: 10 type: integer type: object DnsEditZoneParameterTypeCAA: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: flag: description: 'Whether the Certificate Authority (CA) will issue an SSL certificate if the CAA resource record contains unknown property tags. * `0` - The CA will issue an SSL certificate. * `1` - The CA will **not** issue an SSL certificate. For more information about CAA record flags and property tags, read the [RFC 6844 documentation](https://tools.ietf.org/html/rfc6844#section-3).' enum: - 0 - 1 example: 0 type: integer tag: description: 'The CAA record''s property type. * `issue` - Authorize a CA to issue a certificate for the domain. * `issuewild` - Authorize a CA to issue a wildcard certificate for the domain. * `iodef` - Specify a URL to which a CA may report policy violations.' enum: - issue - issuewild - iodef example: issue type: string value: description: 'The CA''s domain or URL. This is a valid [SSL provider](https://sslmate.com/labs/caa/), `mailto` URL, or a standard URL. **Note:** If you use `iodef` as the `tag` parameter''s value, enter a URL that a CA can use to report issues as this parameter''s value.' example: exampleca.com type: string required: - flag - tag - value type: object srv: allOf: - properties: port: description: The target host's port. example: 389 type: integer priority: description: 'The target host''s preference. An integer that represents the target host''s priority order. **Note:** Lower numbers have a higher priority order.' example: 0 type: integer target: description: The service's target host. example: service.example.com format: domain type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `SRV` — SRV records store the service location records for newer protocols (for example, Autodiscover).' example: SRV type: string weight: description: A relative weight. The system uses this value to rank entries with the same `priority` value. An integer that represents the target host's weight against other hosts with the same `priority` value. example: 2 type: integer type: object - $ref: '#/components/schemas/record' description: 'An object representing SRV record data. **Note:** For more information about SRV records, read [RFC 2782 at IANA](http://tools.ietf.org/html/rfc2782).' a6: allOf: - properties: prefix: description: The record's prefix length. example: 48 type: integer refer: description: The record's address suffix. example: 0::0 type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `A6` — A6 records store IPv6 addresses. **Important:** A6 records are **deprecated**. We strongly **recommend** that you use [AAAA](http://tools.ietf.org/html/rfc3596) records to store IPv6 addresses.' example: A6 type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing A6 record data. **Important:** A6 records are **deprecated**. We strongly **recommend** that you use [AAAA](http://tools.ietf.org/html/rfc3596) records to store IPv6 addresses.' txt: allOf: - properties: txtdata: description: The TXT record's data. example: v=spf1 a -all type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `TXT` — TXT records store descriptive text or useful records (for example, SPF or DKIM records).' example: TXT type: string unencoded: description: 'Whether the TXT record''s data is encoded. * `1` — Encoded. * `0` — **Not** encoded.' example: 1 type: integer type: object - $ref: '#/components/schemas/record' description: 'An object representing TXT record data. **Note:** For more information about TXT records, read [RFC 1464 at IANA](http://tools.ietf.org/html/rfc1464).' mx: allOf: - properties: exchange: description: The server's location's canonical name (CNAME). example: mail.example.com type: string preference: description: 'The record''s preference. An integer that represents the record''s priority order. **Note:** Lower values have a higher priority order.' example: 10 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `MX` — MX records point a domain name to its MTAs.' example: MX type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing MX record data. **Note:** For more information about MX records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' cname: allOf: - properties: cname: description: The canonical name (CNAME) alias. example: sydneybristow.example.com type: string flatten: description: 'Whether the specified CNAME value resolves with the record''s IP address. * `1` - Resolves. * `0` - Does **not** resolve.' example: 1 type: integer flatten_to: description: The IP address to which the specified CNAME resolves. example: 192.168.0.20 type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `CNAME` — CNAME records create an alias to another hostname.' example: CNAME type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing CNAME record data. **Note:** For more information about CNAME records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' DnsAddZoneParameterTypeAAAA: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: address: description: 'The zone record''s IPv6 address. **Note:** * You **must** uuencode the colons (`:`) in IPv6 addresses in your function calls. * For more information about AAAA records, read [RFC 3596 at IANA](http://tools.ietf.org/html/rfc3596).' example: 2001:1:42:1::2a format: ipv6 type: string type: object DnsAddZoneParameterTypeSRV: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: port: description: The target host's port. example: 389 type: integer priority: description: 'The target host''s priority preference. **Note:** * Lower numbers have a higher priority order. * For more information about SRV records, read [RFC 2782 at IANA](http://tools.ietf.org/html/rfc2782).' example: 0 type: integer target: description: The service's target host. example: service.example.com format: domain type: string weight: description: A relative weight. The system uses this value to rank entries with the same `priority` value. example: 2 type: integer type: object DnsAddZoneParameterTypeLOC: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: altitude: description: 'The location''s altitude above sea level, in meters. **Note:** Make certain that you append `m` to the altitude value.' example: 178m type: string horiz_pre: description: The location's horizontal precision distance, in meters. example: 10 minimum: 1 type: integer latitude: description: The location's latitude. example: 41 51 54.305 N type: string longitude: description: The location's longitude. example: 87 36 47.95 W type: string size: description: The diameter of a sphere that encloses the entire location, in meters. example: 10 minimum: 1 type: integer version: description: 'The record''s version number. **Note:** * You **must** set this value to `0`. * For more information about LOC records, read [RFC 1876 at IANA](http://tools.ietf.org/html/rfc1876).' enum: - 0 example: 0 type: integer vert_pre: description: The location's vertical precision distance, in meters. example: 10 minimum: 1 type: integer type: object DnsAddZoneParameterTypeCAA: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: flag: description: 'Whether the Certificate Authority (CA) will issue an SSL certificate if the CAA resource record contains unknown property tags. * `0` - The CA will issue an SSL certificate. * `1` - The CA will **not** issue an SSL certificate. For more information about CAA record flags and property tags, read the [RFC 6844 documentation](https://tools.ietf.org/html/rfc6844#section-3).' enum: - 0 - 1 example: 0 type: integer tag: description: 'The CAA record''s property type. * `issue` - Authorize a CA to issue a certificate for the domain. * `issuewild` - Authorize a CA to issue a wildcard certificate for the domain. * `iodef` - Specify a URL to which a CA may report policy violations.' enum: - issue - issuewild - iodef example: issue type: string value: description: 'The CA''s domain or URL. This is a valid [SSL provider](https://sslmate.com/labs/caa/), `mailto` URL, or a standard URL. **Note:** If you use `iodef` as the `tag` parameter''s value, enter a URL that a CA can use to report issues as this parameter''s value.' example: exampleca.com type: string type: object DnsEditZoneParameterTypeDNAME: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: dname: description: 'The delegation name (DNAME) alias. **Note:** For more information about DNAME records, read [RFC 2672 at IANA](http://tools.ietf.org/html/rfc2672).' example: hostname.example.com format: domain type: string required: - dname type: object DnsEditZoneParameterTypeAFSDB: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: hostname: description: The database servers' hostname. example: hostname.example.com format: domain type: string subtype: description: 'The 16-bit integer of an AFS cell type. For example, specify `1` to signify an AFS version 3.0 Volume Location Server. **Note:** * You **must** uuencode the colons (`:`) in IPv6 addresses in your function calls. * For more information about AFSDB records, read [RFC 1183 at IANA](http://tools.ietf.org/html/rfc1183).' example: 1 type: integer required: - subtype - hostname type: object ptr: allOf: - properties: ptrdname: description: A pointer to a canonical name (CNAME). example: hostname.example.com. type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `PTR` — PTR records point to a CNAME.' example: PTR type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing PTR record data. **Note:** For more information about PTR records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' ds: allOf: - properties: algorithm: description: 'The record''s algorithm number. * `1` — RSAMD5 * `2` — Diffie-Hellman * `3` — DSA/SHA-1 * `4` — Elliptic Curve * `5` — RSA/SHA-1 * `7` - RSASHA1-NSEC3-SHA1 * `8` - RSA/SHA-256 * `10` - RSA/SHA-512 * `13` - ECDSA Curve P-256 with SHA-256 * `14` - ECDSA Curve P-384 with SHA-384 * `252` — Indirect * `253` — Private DNS * `254` — Private OID' example: 5 type: integer digtype: description: 'The record''s digest type. * `1` — SHA-1 * `2` — SHA-256 * `4` — SHA-384' example: 1 type: integer keyname: description: The record's KeyTag value. example: 2642 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `DS` — DS records specify a record''s delegation signer.' example: DS type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing DS record data. **Note:** For more information about DS records, read [RFC 4034 at IANA](http://tools.ietf.org/html/rfc4034).' DnsEditZoneParameterTypeHINFO: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: cpu: description: 'The host''s CPU type. **Note:** For more information about HINFO records, read [RFC 1700 at IANA](http://tools.ietf.org/html/rfc1700.txt).' example: INTEL-386 type: string os: description: The host's operating system. example: UNIX type: string type: object DnsEditZoneParameterTypeDS: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: algorithm: description: 'The record''s algorithm number. * `1` - RSAMD5 * `2` - Diffie-Hellman * `3` - DSA/SHA-1 * `4` - Elliptic Curve * `5` - RSA/SHA-1 * `7` - RSASHA1-NSEC3-SHA1 * `8` - RSA/SHA-256 * `10` - RSA/SHA-512 * `13` - ECDSA Curve P-256 with SHA-256 * `14` - ECDSA Curve P-384 with SHA-384 * `252` - Indirect * `253` - Private DNS * `254` - Private OID' enum: - 1 - 2 - 3 - 4 - 5 - 7 - 8 - 10 - 13 - 14 - 252 - 253 - 254 example: 5 type: integer digtype: description: 'The record''s digest type. * `1` — SHA-1 * `2` — SHA-256 * `4` — SHA-384' enum: - 1 - 2 - 4 example: 1 type: integer keyname: description: 'The record''s KeyTag value. **Note:** For more information about DS records, read [RFC 4034 at IANA](http://tools.ietf.org/html/rfc4034).' example: 2642 type: integer type: object DnsEditZoneParameterTypeTXT: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: txtdata: description: 'The TXT record''s data. **Note:** * This value **must** include beginning and ending quotes (`""`). * Do **not** URI-encode the quotes. * For more information about TXT records, read [RFC 1464 at IANA](http://tools.ietf.org/html/rfc1464).' example: '"v=spf1 a -all"' type: string type: object DnsEditZoneParameterTypeCNAME: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: cname: description: 'The canonical name (CNAME) alias. **Note:** For more information about CNAME records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: hostname.example.com format: domain type: string flatten: description: 'Whether to resolve the specified CNAME value with the record''s IP address. If you do **not** also set the `flatten_to` parameter, the system will attempt to resolve the CNAME automatically. * `1` - Flattened. * `0` - Not flattened (the function will **fail**). **Note:** Only use this parameter when you alter the zone''s `root` record.' enum: - 0 - 1 example: 1 type: integer flatten_to: description: 'The IP address that the specified CNAME will resolve to. **Note:** You **must** use the `flatten` parameter with this parameter.' oneOf: - description: A valid IPv4 address. example: 192.0.2.27 format: ipv4 type: string - description: A valid IPv6 address. example: 2001:0db8:85a3:0042:1000:8a2e:0370:7334 format: ipv6 type: string required: - cname type: object soa: allOf: - properties: Lines: description: The number of lines in the SOA section. example: 4 minimum: 0 type: integer expire: description: The amount of time to wait before the secondary server attempts to complete a zone transfer, in seconds. example: 3600000 minimum: 0 type: integer mname: description: The domain's authoritative nameserver. example: ns1.example.com type: string refresh: description: The amount of time to wait before the secondary DNS server queries the primary DNS server's SOA records for changes, in seconds. example: 1440 minimum: 0 type: integer retry: description: The amount of time to wait before the secondary server retries a failed zone transfer, in seconds. example: 1440 minimum: 0 type: integer rname: description: The Responsible Person's (RP's) email address. example: user.example.com. type: string serial: description: The zone file's revision number. example: 2013122501 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `SOA` — SOA records designate the beginning of a zone of authority.' example: SOA type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing SOA record data. **Note:** For more information about SOA records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' dname: allOf: - properties: dname: description: The delegation name (DNAME) alias. example: hostname.dev.example.com type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `DNAME` — DNAME records create an alias for a hostname and its subnames.' example: DNAME type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing DNAME record data. **Note:** For more information about DNAME records, read [RFC 2672 at IANA](http://tools.ietf.org/html/rfc2672).' hinfo: allOf: - properties: cpu: description: The host's CPU type. example: INTEL-386 type: string os: description: The host's operating system. example: UNIX type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `HINFO` — HINFO records specify a host''s CPU and OS types.' example: HINFO type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing HINFO record data. **Note:** For more information about HINFO records, read [RFC 1700 at IANA](http://tools.ietf.org/html/rfc1700.txt).' DnsAddZoneParameterTypeALIAS: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: alias: description: 'The hostname you want to point to. **Note:** We strongly recommend that you do not use this function. Using the ALIAS DNS record may result in unexpected behavior, including website downtimes outside of your control, inconsistency in the handling of the record, and security vulnerabilities. This record is only available if you enable access to it and use PowerDNS.' example: hostname.example.com format: domain type: string type: object sshfp: allOf: - properties: algorithm: description: 'The public key''s algorithm number. * `1` — RSA * `2` — DSS' example: 1 type: integer fptype: description: 'The public key''s fingerprint type. * `1` — SHA-1' example: 1 type: integer type: description: "The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types).\n* `SSHFP` — SSHFP records store a domain's SSH public host key's fingerprint.\n\n**Warning:**\n\n We do **not** currently support the SSHFP DNS record type." example: SSHFP type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing SSHFP record data. **Warning:** We do **not** currently support this DNS record type. **Note:** For more information about SSHFP records, read [RFC 4255 at IANA](http://tools.ietf.org/html/rfc4255).' DnsAddZoneParameterTypeNS: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: nsdname: description: 'The domain''s authoritative nameserver. **Note:** For more information about NS records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: ns1.example.com format: domain type: string type: object DnsAddZoneParameterTypeAFSDB: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: hostname: description: The database servers' hostname. example: hostname.example.com format: domain type: string subtype: description: 'The 16-bit integer of an AFS cell type. For example, specify `1` to signify an AFS version 3.0 Volume Location Server. **Note:** For more information about AFSDB records, read [RFC 1183 at IANA](http://tools.ietf.org/html/rfc1183).' example: 1 type: integer type: object DnsAddZoneParameterTypeDS: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: algorithm: description: 'The record''s algorithm number. * `1` - RSAMD5 * `2` - Diffie-Hellman * `3` - DSA/SHA-1 * `4` - Elliptic Curve * `5` - RSA/SHA-1 * `7` - RSASHA1-NSEC3-SHA1 * `8` - RSA/SHA-256 * `10` - RSA/SHA-512 * `13` - ECDSA Curve P-256 with SHA-256 * `14` - ECDSA Curve P-384 with SHA-384 * `252` - Indirect * `253` - Private DNS * `254` - Private OID' enum: - 1 - 2 - 3 - 4 - 5 - 7 - 8 - 10 - 13 - 14 - 252 - 253 - 254 example: 5 type: integer digtype: description: 'The record''s digest type. * `1` — SHA-1 * `2` — SHA-256 * `4` — SHA-384' enum: - 1 - 2 - 4 example: 1 type: integer keyname: description: 'The record''s KeyTag value. **Note:** For more information about DS records, read [RFC 4034 at IANA](http://tools.ietf.org/html/rfc4034).' example: 2642 type: integer type: object DnsAddZoneParameterTypeCNAME: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: cname: description: 'The canonical name (CNAME) alias. **Note:** For more information about CNAME records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: hostname.example.com format: domain type: string flatten: description: 'Whether to resolve the specified CNAME value with the record''s IP address. If you do **not** also set the `flatten_to` parameter, the system will attempt to resolve the CNAME automatically. * `1` - Flattened. * `0` - Not flattened (the function will **fail**). **Note:** Only use this parameter when you alter the zone''s `root` record.' enum: - 0 - 1 example: 1 type: integer flatten_to: description: 'The IP address that the specified CNAME will resolve to. **Note:** You **must** use the `flatten` parameter with this parameter.' oneOf: - description: A valid IPv4 address. example: 192.0.2.27 format: ipv4 type: string - description: A valid IPv6 address. example: 2001:0db8:85a3:0042:1000:8a2e:0370:7334 format: ipv6 type: string type: object ns: allOf: - properties: nsdname: description: The domain's authoritative nameserver. example: ns1.example.com type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `NS` — NS records store a domain''s authoritative nameservers.' example: NS type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing NS record data. **Note:** For more information about NS records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' DnsEditZoneParameterBase: properties: class: description: 'The record''s class. If you do not use this parameter, the system retains the current setting.' example: IN oneOf: - enum: - IN type: string - description: A valid DNS record class. type: string domain: description: The zone record's domain. example: example.com format: domain type: string line: description: The zone record's file line number. example: 24 minimum: 1 type: integer name: description: 'The record''s name. If you do not use this parameter, the system retains the current setting. **Note:** Do **not** omit any necessary trailing periods. You **cannot** use this function to modify temporary domains.' example: hostname.example.com. format: domain type: string ttl: description: The record's Time To Live (TTL), in seconds. example: 86400 minimum: 1 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types): * `A` - A records store IPv4 addresses. Use them to map a hostname to an IPv4 address. * `A6` - A6 records store IPv6 addresses. * `AAAA` - AAAA records store IPv6 addresses. * `AFSDB` - AFSDB records store the location of an AFS cell''s database servers. * `ALIAS` - ALIAS records create an alias to another hostname, but can coexist with other records on that name. We strongly discourage using this record type. * `CAA` - CAA records control which certificate authorities can issue SSL certificates for a domain. * `CNAME` - CNAME records create an alias to another hostname. * `DNAME` - DNAME records create an alias for a hostname and its subnames. * `DS` - DS records specify a record''s delegation signer. * `HINFO` - HINFO records specify a host''s CPU and OS types. * `LOC` - LOC records store a hostname''s geographical location. * `MX` - MX records point a domain name to its MTAs. * `NS` - NS records store a domain''s authoritative nameservers. * `PTR` - PTR records point to a CNAME. * `RP` - RP records store a domain''s Responsible Person''s information. * `SOA` - SOA records designate the beginning of a zone of authority. * `SRV` - SRV records store the service location records for newer protocols (for example, Autodiscover). * `TXT` - TXT records store descriptive text or useful records (for example, SPF or DKIM records). If you do not use this parameter, the system retains the current setting. **Warning:** Additional properties may be required based on the `type`. When you call this function, you **must** include the additional parameters for the desired zone record type if you use this parameter. Select a zone record from the menu to view the required additional parameters:' enum: - A - AAAA - AFSDB - ALIAS - CAA - CNAME - DNAME - DS - HINFO - LOC - MX - NS - PTR - RP - SOA - SRV - TXT example: A type: string required: - domain - line - ttl type: object rp: allOf: - properties: mbox: description: The Responsible Person's (RP's) email address. example: user.example.com. type: string txtdname: description: The RP's domain name. example: mx1.host.example.com. type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `RP` — RP records store a domain''s Responsible Person''s information.' example: RP type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing RP record data. **Note:** For more information about RP records, read [RFC 1183 at IANA](https://tools.ietf.org/html/rfc1183).' DnsEditZoneParameterType: anyOf: - $ref: '#/components/schemas/DnsEditZoneParameterTypeA' - $ref: '#/components/schemas/DnsEditZoneParameterTypeA6' - $ref: '#/components/schemas/DnsEditZoneParameterTypeAAAA' - $ref: '#/components/schemas/DnsEditZoneParameterTypeAFSDB' - $ref: '#/components/schemas/DnsEditZoneParameterTypeALIAS' - $ref: '#/components/schemas/DnsEditZoneParameterTypeCAA' - $ref: '#/components/schemas/DnsEditZoneParameterTypeCNAME' - $ref: '#/components/schemas/DnsEditZoneParameterTypeDNAME' - $ref: '#/components/schemas/DnsEditZoneParameterTypeDS' - $ref: '#/components/schemas/DnsEditZoneParameterTypeHINFO' - $ref: '#/components/schemas/DnsEditZoneParameterTypeLOC' - $ref: '#/components/schemas/DnsEditZoneParameterTypeMX' - $ref: '#/components/schemas/DnsEditZoneParameterTypeNS' - $ref: '#/components/schemas/DnsEditZoneParameterTypePTR' - $ref: '#/components/schemas/DnsEditZoneParameterTypeRP' - $ref: '#/components/schemas/DnsEditZoneParameterTypeSOA' - $ref: '#/components/schemas/DnsEditZoneParameterTypeSRV' - $ref: '#/components/schemas/DnsEditZoneParameterTypeTXT' discriminator: mapping: A: '#/components/schemas/DnsEditZoneParameterTypeA' A6: '#/components/schemas/DnsEditZoneParameterTypeA6' AAAA: '#/components/schemas/DnsEditZoneParameterTypeAAAA' AFSDB: '#/components/schemas/DnsEditZoneParameterTypeAFSDB' ALIAS: '#/components/schemas/DnsEditZoneParameterTypeALIAS' CAA: '#/components/schemas/DnsEditZoneParameterTypeCAA' CNAME: '#/components/schemas/DnsEditZoneParameterTypeCNAME' DNAME: '#/components/schemas/DnsEditZoneParameterTypeDNAME' DS: '#/components/schemas/DnsEditZoneParameterTypeDS' HINFO: '#/components/schemas/DnsEditZoneParameterTypeHINFO' LOC: '#/components/schemas/DnsEditZoneParameterTypeLOC' MX: '#/components/schemas/DnsEditZoneParameterTypeMX' NS: '#/components/schemas/DnsEditZoneParameterTypeNS' PTR: '#/components/schemas/DnsEditZoneParameterTypePTR' RP: '#/components/schemas/DnsEditZoneParameterTypeRP' SOA: '#/components/schemas/DnsEditZoneParameterTypeSOA' SRV: '#/components/schemas/DnsEditZoneParameterTypeSRV' TXT: '#/components/schemas/DnsEditZoneParameterTypeTXT' propertyName: type DnsAddZoneParameterTypeA: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: address: description: 'The zone record''s IPv4 address. **Note:** For more information about A records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: 192.168.0.20 format: ipv4 type: string type: object caa: allOf: - properties: flag: description: 'Whether the CA will issue an SSL certificate if the CAA resource record contains unknown property tags. * `0` - Non-critical. The CAA Resource Record contains unknown property tags, and the CA issued an SSL certificate. * `1` - Critical. The CAA Resource Record contains unknown property tags, and the CA did **not** issue an SSL certificate.' example: 0 type: integer tag: description: 'The CAA record''s property type. * `issue` - A CA issued a certificate for the domain. * `issuewild` - A CA issued a wildcard certificate for the domain. * `iodef` - The user specified a URL to which a CA may report policy violations.' example: issue type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `CAA` — CAA records control which certificate authorities can issue SSL certificates for a domain.' example: CAA type: string value: description: 'The CA''s domain or URL. * A valid [SSL provider](https://sslmate.com/labs/caa/). * A mailto URL or a standard URL.' example: totallyrealca.tld type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing CAA record data. **Note:** For more information about CAA record flags and property tags, read the [RFC 6844](https://tools.ietf.org/html/rfc6844#section-3) documentation.' DnsAddZoneParameterTypeHINFO: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: cpu: description: 'The host''s CPU type. **Note:** For more information about HINFO records, read [RFC 1700 at IANA](http://tools.ietf.org/html/rfc1700.txt).' example: INTEL-386 type: string os: description: The host's operating system. example: UNIX type: string type: object DnsEditZoneParameterTypeA6: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - description: ' A6 records are **deprecated**. We **strongly** recommend that you use AAAA records to store IPv6 addresses.' properties: prefix: deprecated: true description: The record's prefix length. example: 48 minimum: 1 type: integer refer: deprecated: true description: 'The record''s address suffix. **Note:** You **must** uuencode the colons (`:`) in IPv6 addresses in your function calls.' example: 0::0 type: string required: - prefix - refer type: object getzonerecordResponseBase: discriminator: mapping: A: '#/components/schemas/getzonerecordResponseTypeA' A6: '#/components/schemas/getzonerecordResponseTypeA6' AAAA: '#/components/schemas/getzonerecordResponseTypeAAAA' AFSDB: '#/components/schemas/getzonerecordResponseTypeAFSDB' ALIAS: '#/components/schemas/getzonerecordResponseTypeALIAS' CAA: '#/components/schemas/getzonerecordResponseTypeCAA' CNAME: '#/components/schemas/getzonerecordResponseTypeCNAME' DNAME: '#/components/schemas/getzonerecordResponseTypeDNAME' DS: '#/components/schemas/getzonerecordResponseTypeDS' HINFO: '#/components/schemas/getzonerecordResponseTypeHINFO' LOC: '#/components/schemas/getzonerecordResponseTypeLOC' MX: '#/components/schemas/getzonerecordResponseTypeMX' NS: '#/components/schemas/getzonerecordResponseTypeNS' PTR: '#/components/schemas/getzonerecordResponseTypePTR' RP: '#/components/schemas/getzonerecordResponseTypeRP' SOA: '#/components/schemas/getzonerecordResponseTypeSOA' SRV: '#/components/schemas/getzonerecordResponseTypeSRV' SSHFP: '#/components/schemas/getzonerecordResponseTypeSSHFP' TXT: '#/components/schemas/getzonerecordResponseTypeTXT' propertyName: type properties: Line: description: The zone record's file line number. example: 24 minimum: 1 type: integer class: description: The record's class. example: IN oneOf: - enum: - IN type: string - description: A valid DNS record class. type: string name: description: The record's name. example: hostname.example.com. format: domain type: string ttl: description: The record's Time To Live (TTL), in seconds. example: 86400 minimum: 1 type: integer type: description: "The DNS record type.\n* `A` - A records store IPv4 addresses. Use them to map a hostname to an IPv4 address.\n* `A6`- A6 records store IPv6 addresses.\n* `AAAA` - AAAA records store IPv6 addresses.\n* `AFSDB` - AFSDB records store the location of an AFS cell's database servers.\n* `ALIAS` - ALIAS records create an alias to another hostname, but can coexist with other records on that name. We strongly discourage using this record type.\n* `CAA` - CAA records control which certificate authorities can issue SSL certificates for a domain.\n* `CNAME` - CNAME records create an alias to another hostname.\n* `DNAME` - DNAME records create an alias for a hostname and its subnames.\n* `DS` - DS records specify a record's delegation signer.\n* `HINFO` - HINFO records specify a host's CPU and OS types.\n* `LOC` - LOC records store a hostname's geographical location.\n* `MX` - MX records point a domain name to its MTAs.\n* `NS` - NS records store a domain's authoritative nameservers.\n* `PTR` - PTR records point to a CNAME.\n* `RP` - RP records store a domain's Responsible Person's information.\n* `SOA` - SOA records designate the beginning of a zone of authority.\n* `SRV` - SRV records store the service location records for newer protocols (for example, Autodiscover).\n* `SSHFP` - SSHFP records store a domain's SSH public host key's fingerprint.\n* `TXT` - TXT records store descriptive text or useful records (for example, SPF or DKIM records).\n\n **Warning:**\n\n We do not currently support the SSHFP DNS record type.\n\nThis function will return a differently depending on which record type you query. Select a zone\nrecord type from the menu to view each set of return data:" enum: - A - AAAA - AFSDB - ALIAS - CAA - CNAME - DNAME - DS - HINFO - LOC - MX - NS - PTR - RP - SOA - SRV - SSHFP - TXT example: A type: string type: object DnsAddZoneParameterBase: properties: class: description: The record's class. example: IN oneOf: - enum: - IN type: string - description: A valid DNS record class. type: string domain: description: The new zone record's domain. example: example.com format: domain type: string name: description: 'The record''s name. **Note:** Do **not** omit any necessary trailing periods. You **cannot** use this function to add temporary domains.' example: hostname.example.com. format: domain type: string ttl: default: 86400 description: The record's Time To Live (TTL), in seconds. example: 86400 minimum: 1 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types): * `A` - A records store IPv4 addresses. Use them to map a hostname to an IPv4 address. * `A6` - A6 records store IPv6 addresses. * `AAAA` - AAAA records store IPv6 addresses. * `AFSDB` - AFSDB records store the location of an AFS cell''s database servers. * `ALIAS` - ALIAS records create an alias to another hostname, but can coexist with other records on that name. We strongly discourage using this record type. * `CAA` - CAA records control which certificate authorities can issue SSL certificates for a domain. * `CNAME` - CNAME records create an alias to another hostname. * `DNAME` - DNAME records create an alias for a hostname and its subnames. * `DS` - DS records specify a record''s delegation signer. * `HINFO` - HINFO records specify a host''s CPU and OS types. * `LOC` - LOC records store a hostname''s geographical location. * `MX` - MX records point a domain name to its MTAs. * `NS` - NS records store a domain''s authoritative nameservers. * `PTR` - PTR records point to a CNAME. * `RP` - RP records store a domain''s Responsible Person''s information. * `SOA` - SOA records designate the beginning of a zone of authority. * `SRV` - SRV records store the service location records for newer protocols (for example, Autodiscover). * `TXT` - TXT records store descriptive text or useful records (for example, SPF or DKIM records). When you call this function, you **must** include the additional parameters for the desired zone record type. Select a zone record from the menu to view the required additional parameters:' enum: - A - A6 - AAAA - AFSDB - ALIAS - CAA - CNAME - DNAME - DS - HINFO - LOC - MX - NS - PTR - RP - SOA - SRV - TXT example: A type: string required: - domain - type - line - name - class type: object DnsAddZoneParameterType: anyOf: - $ref: '#/components/schemas/DnsAddZoneParameterTypeA' - $ref: '#/components/schemas/DnsAddZoneParameterTypeA6' - $ref: '#/components/schemas/DnsAddZoneParameterTypeAAAA' - $ref: '#/components/schemas/DnsAddZoneParameterTypeAFSDB' - $ref: '#/components/schemas/DnsAddZoneParameterTypeALIAS' - $ref: '#/components/schemas/DnsAddZoneParameterTypeCAA' - $ref: '#/components/schemas/DnsAddZoneParameterTypeCNAME' - $ref: '#/components/schemas/DnsAddZoneParameterTypeDNAME' - $ref: '#/components/schemas/DnsAddZoneParameterTypeDS' - $ref: '#/components/schemas/DnsAddZoneParameterTypeHINFO' - $ref: '#/components/schemas/DnsAddZoneParameterTypeLOC' - $ref: '#/components/schemas/DnsAddZoneParameterTypeMX' - $ref: '#/components/schemas/DnsAddZoneParameterTypeNS' - $ref: '#/components/schemas/DnsAddZoneParameterTypePTR' - $ref: '#/components/schemas/DnsAddZoneParameterTypeRP' - $ref: '#/components/schemas/DnsAddZoneParameterTypeSOA' - $ref: '#/components/schemas/DnsAddZoneParameterTypeSRV' - $ref: '#/components/schemas/DnsAddZoneParameterTypeTXT' discriminator: mapping: A: '#/components/schemas/DnsAddZoneParameterTypeA' A6: '#/components/schemas/DnsAddZoneParameterTypeA6' AAAA: '#/components/schemas/DnsAddZoneParameterTypeAAAA' AFSDB: '#/components/schemas/DnsAddZoneParameterTypeAFSDB' ALIAS: '#/components/schemas/DnsAddZoneParameterTypeALIAS' CAA: '#/components/schemas/DnsAddZoneParameterTypeCAA' CNAME: '#/components/schemas/DnsAddZoneParameterTypeCNAME' DNAME: '#/components/schemas/DnsAddZoneParameterTypeDNAME' DS: '#/components/schemas/DnsAddZoneParameterTypeDS' HINFO: '#/components/schemas/DnsAddZoneParameterTypeHINFO' LOC: '#/components/schemas/DnsAddZoneParameterTypeLOC' MX: '#/components/schemas/DnsAddZoneParameterTypeMX' NS: '#/components/schemas/DnsAddZoneParameterTypeNS' PTR (Reverse DNS): '#/components/schemas/DnsAddZoneParameterTypePTR' RP: '#/components/schemas/DnsAddZoneParameterTypeRP' SOA: '#/components/schemas/DnsAddZoneParameterTypeSOA' SRV: '#/components/schemas/DnsAddZoneParameterTypeSRV' TXT: '#/components/schemas/DnsAddZoneParameterTypeTXT' propertyName: type loc: allOf: - properties: altitude: description: The location's altitude. The location's altitude above sea level, in meters, and the m character. example: 178m type: string horiz_pre: description: The location's horizontal precision, in meters. example: 10 minimum: 0 type: integer latitude: description: The location's latitude. example: 41 51 54.305 N type: string longitude: description: The location's longitude. example: 87 36 47.95 W type: string size: description: The diameter of a sphere that encloses the entire location, in meters. example: 10 minimum: 0 type: integer type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `LOC` — LOC records store a hostname''s geographical location.' example: LOC type: string version: description: The record's version number. You **must** set this value to `0`. example: 0 type: integer vert_pre: description: The location's vertical precision, in meters. example: 10 minimum: 0 type: integer type: object - $ref: '#/components/schemas/record' description: 'An object representing LOC record data. **Note:** For more information about LOC records, read [RFC 1876 at IANA](http://tools.ietf.org/html/rfc1876).' DnsAddZoneParameterTypeDNAME: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: dname: description: 'The delegation name (DNAME) alias. **Note:** For more information about DNAME records, read [RFC 2672 at IANA](http://tools.ietf.org/html/rfc2672).' example: hostname.example.com format: domain type: string type: object DnsAddZoneParameterTypeA6: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: prefix: deprecated: true description: 'The record''s prefix length. **Important:** A6 records are **deprecated**. We **strongly** recommend that you use AAAA records to store IPv6 addresses.' example: 48 minimum: 1 type: integer refer: deprecated: true description: 'The record''s IPv6 address suffix. **Note:** You **must** uuencode the colons (`:`) in IPv6 addresses in your function calls.' example: 0::0 type: string type: object DnsAddZoneParameterTypeSOA: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: Lines: description: The number of lines in the SOA section. example: 4 minimum: 1 type: integer expire: description: The amount of time, in seconds, to wait before the secondary server attempts to complete a zone transfer. example: 3600000 minimum: 1 type: integer mname: description: The domain's authoritative nameserver. example: ns1.host.example.com format: domain type: string refresh: description: The amount of time, in seconds, to wait before the secondary DNS server queries the primary DNS server's SOA records for changes. example: 1440 minimum: 1 type: integer retry: description: The amount of time, in seconds, to wait before the secondary server retries a failed zone transfer. example: 14400 minimum: 1 type: integer rname: description: 'The Responsible Person''s (RP) email address. **Note:** * Replace the `@` symbol with a period (`.`). * Do **not** omit any necessary trailing periods.' example: email.host.example.com type: string serial: description: 'The zone file''s revision number. **Note:** For more information about SOA records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: 2013122501 type: integer type: object record: properties: Line: description: The zone record's line number. example: 1 type: integer class: description: 'The record''s class. - IN - Very rarely, another valid DNS record class.' example: IN type: string name: description: The record's name. example: hostname.example.com type: string ttl: description: The record's Time To Live (TTL). example: 86400 type: integer type: object DnsEditZoneParameterTypeA: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: address: description: 'The zone record''s IPv4 address. **Note:** For more information about A records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: 192.168.0.20 format: ipv4 type: string required: - address type: object DnsEditZoneParameterTypeSOA: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: expire: description: The amount of time, in seconds, to wait before the secondary server attempts to complete a zone transfer. example: 3600000 minimum: 1 type: integer lines: description: The number of lines in the SOA section. example: 4 minimum: 1 type: integer mname: description: The domain's authoritative nameserver. example: ns1.host.example.com format: domain type: string refresh: description: The amount of time, in seconds, to wait before the secondary DNS server queries the primary DNS server's SOA records for changes. example: 1440 minimum: 1 type: integer retry: description: The amount of time, in seconds, to wait before the secondary server retries a failed zone transfer. example: 14400 minimum: 1 type: integer rname: description: 'The Responsible Person''s (RP) email address. **Note:** * Replace the `@` symbol with a period (`.`). * Do **not** omit any necessary trailing periods.' example: email.host.example.com type: string serial: description: 'The zone file''s revision number. **Note:** For more information about SOA records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: 2013122501 type: integer type: object DnsEditZoneParameterTypeSRV: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: port: description: The target host's port. example: 389 type: integer priority: description: 'The target host''s priority preference. **Note:** * Lower numbers have a higher priority order. * For more information about SRV records, read [RFC 2782 at IANA](http://tools.ietf.org/html/rfc2782).' example: 0 type: integer target: description: The service's target host. example: service.example.com format: domain type: string weight: description: A relative weight. The system uses this value to rank entries with the same `priority` value. example: 2 type: integer type: object DnsEditZoneParameterTypeAAAA: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: address: description: 'The zone record''s IPv6 address. **Note:** * You **must** uuencode the colons (`:`) in IPv6 addresses in your function calls. * For more information about AAAA records, read [RFC 3596 at IANA](http://tools.ietf.org/html/rfc3596).' example: 2001:1:42:1::2a format: ipv6 type: string required: - address type: object DnsAddZoneParameterTypeTXT: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: txtdata: description: 'The TXT record''s data. **Note:** * This value **must** include beginning and ending quotes (`""`). * Do **not** URI-encode the quotes. * For more information about TXT records, read [RFC 1464 at IANA](http://tools.ietf.org/html/rfc1464).' example: '"v=spf1 a -all"' type: string type: object DnsEditZoneParameterTypeLOC: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: altitude: description: 'The location''s altitude above sea level, in meters. **Note:** Make certain that you append `m` to the altitude value.' example: 178m type: string horiz_pre: description: The location's horizontal precision distance, in meters. example: 10 minimum: 1 type: integer latitude: description: The location's latitude. example: 54.305 N type: string longitude: description: The location's longitude. example: 47.95 W type: string size: description: The diameter of a sphere that encloses the entire location, in meters. example: 10 minimum: 1 type: integer version: description: 'The record''s version number. **Note:** * You **must** set this value to `0`. * For more information about LOC records, read [RFC 1876 at IANA](http://tools.ietf.org/html/rfc1876).' enum: - 0 example: 0 type: integer vert_pre: description: The location's vertical precision distance, in meters. example: 10 minimum: 1 type: integer type: object DnsEditZoneParameterTypeRP: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: mbox: description: 'The Responsible Person''s (RP) email address. **Note:** * Replace the `@` symbol with a period (`.`). * Do **not** omit any necessary trailing periods. * For more information about RP records, read [RFC 1183 at IANA](http://tools.ietf.org/html/rfc1183).' example: user.example.com. type: string txtdname: description: 'The RP''s domain name. **Note:** Do **not** omit any necessary trailing periods.' example: mx1.host.example.com. format: domain type: string type: object DnsEditZoneParameterTypeMX: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: exchange: description: The server's location's canonical name (CNAME). example: mail.example.com format: domain type: string preference: description: 'The record''s priority order. **Note:** * Lower values have a higher priority order. * For more information about MX records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: 10 type: integer type: object DnsAddZoneParameterTypePTR: allOf: - $ref: '#/components/schemas/DnsAddZoneParameterBase' - properties: ptrdname: description: 'A pointer to a canonical name (CNAME). **Note:** * Do **not** omit any necessary trailing periods. * For more information about NS records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: hostname.example.com format: domain type: string zone: description: The new reverse DNS zone's name. example: 0.168.192.in-addr.arpa type: string type: object DnsEditZoneParameterTypeNS: allOf: - $ref: '#/components/schemas/DnsEditZoneParameterBase' - properties: nsdname: description: 'The domain''s authoritative nameserver. **Note:** For more information about NS records, read [RFC 1035 at IANA](http://tools.ietf.org/html/rfc1035).' example: ns1.example.com format: domain type: string type: object aaaa: allOf: - properties: address: description: The zone record's IPv6 address. example: 2001:1:42:1::2a type: string type: description: 'The [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types). * `AAAA` — AAAA records store IPv6 addresses. **Important:** A6 records are **deprecated**. We strongly **recommend** that you use [AAAA](http://tools.ietf.org/html/rfc3596) records to store IPv6 addresses.' example: AAAA type: string type: object - $ref: '#/components/schemas/record' description: 'An object representing AAAA record data. **Note:** For more information about AAAA records, read [RFC 3596 at IANA](http://tools.ietf.org/html/rfc3596).' securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ x-refined-from: - cpanel-uapi-openapi.yml - cpanel-whm-api-openapi.yml x-tagGroups: - name: API Development Tools tags: - API Token Management - Batch - SSE Task Management - URL Parsing - name: Authentication tags: - External Authentication - Two-Factor Settings - name: Backup Information tags: - BackupInfo - BackupInfo Status - name: Block Ip Addresses tags: - Block IP - name: Commerce Integration tags: - Market Integration - SSL Certificates - name: Contact Information tags: - Contact Information - name: cPanel Account tags: - Account Enhancements - Account Information - Account Management - AuditLog - Contact Information - cPanel Features - Disk Quotas - DomainRecommendations - Personalization - Resource Usage and Statistics - Subaccount Management - Team Roles - Team Users - name: cPanel Account Backups tags: - Backup - File Restoration - name: cPanel Plugin Framework tags: - Formbricks - Plugins - name: cPanel Theme Management tags: - Application Information - Brand Management - Branding Files - Browser Cache Management - Language - Theme Settings - name: Directory Management tags: - Directory Indexes - Directory Privacy - Directory Protection - name: DNS tags: - DNS - DNS Information - DNS Security - Dynamic DNS - Email DNS Settings - ZoneEdit - name: Domain tags: - Domain - name: Domain Management tags: - AddonDomain - Direct Link Protection (Hotlink) - Domain - Domain Information - Domain Redirection - DomainLookup - Park - SubDomain - Virtual Host Information - name: Domains tags: - Subdomains - name: Email tags: - Email Accounts - Email Filtering - Email Forwarding - Email Server Information - Email Suspensions - Mail Server Information - Mailbox Management - Mailing Lists - Signing and Encryption (GnuPG Keys) - Spam Filtering (Greylisting) - Spam Management - Spam Prevention (BoxTrapper) - Webmail Applications - Webmail Sessions - name: Extract Information tags: - ExtractInfo - ExtractInfo Status - name: File Manager tags: - Trash - name: Files tags: - FTP Accounts - FTP Server Settings - Image Tools - Jodit - Manage Files - Manage Files - WebDisk Settings - name: GIT Management tags: - Deployment Settings - Repository Management - name: InProductSurvey tags: - InProductSurvey - name: MySQL and MariaDB tags: - Database Information - Database Management - Remote Databases - User Management - name: Notifications tags: - Pushbullet - name: Optional Applications tags: - Antivirus Protection (ClamAV) - Calendar and Contacts (DAV) - Calendar and Contacts Server - WordPress Manager Backups - name: PostgreSQL tags: - PostgreSQL Database Management - PostgreSQL User Management - name: Retrieve bandwidth information tags: - Bandwidth - name: Security tags: - Known SSH Hosts Management - Login Information - name: Server Information tags: - cPanel Server Information - Notifications - Password Strength - SSH - WebPros MCP - WebProsMCP - name: ServiceProxy tags: - ServiceProxy - name: Site Quality Monitoring tags: - SiteQuality - name: SSL Certificates tags: - Auto-generated SSL Certificates - cPanel Account SSL Management - SNI Email Settings - SSL Certificate Management - Verify Domain Ownership - name: Statistics tags: - Domain Statistics - Weblog Settings - name: UserData tags: - UserData - name: Web Server Configuration tags: - EA4 - EasyApache Settings - PHP - name: Web Server Management tags: - Application Manager - ModSecurity - NginxCaching - PHP Settings - Web Apps - name: Website Configuration tags: - Handler Management - Logs - Mime Type Management - Nova - Site Information - Site Installation - Sitejet - WPX