{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-apis.sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Introduction to UAPI","description":"With its world-class support and rich feature set, cPanel &amp; WHM has been the industry-leading web hosting platform for over 20 years. Trusted worldwide by our technology partners WordPress, CloudLinux, LiteSpeed, and more.","siteUrl":"https://api.docs.cpanel.net/","image":"/assets/cpanel-whm.ccd85fdccb18de0645f8a6ebf38e36a0489b92fc9d4ca92776f06aa5a160b167.db81178d.svg","keywords":"documentation, api, portal, cpanel","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"introduction-to-uapi","__idx":0},"children":["Introduction to UAPI"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If you encounter problems with a local access method (LiveAPI PHP or LiveAPI Perl), attempt a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cpanel/introduction/#cpanel-or-webmail-session-url-1"},"children":["browser-based call"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You cannot call this API's functions via another API's call methods."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When you enable a non-Standard Node ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://go.cpanel.net/serverroles"},"children":["server profile"]},", the system disables API calls associated with that profile's disabled roles."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"basic-usage","__idx":2},"children":["Basic Usage"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cpanel-or-webmail-session-url","__idx":3},"children":["cPanel or Webmail Session URL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"/execute/Module/function?parameter=value&parameter=value&parameter=value\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about browser-based UAPI calls, read the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cpanel/introduction/#cpanel-or-webmail-session-url-1"},"children":["cPanel or Webmail Session URL calls"]}," section below."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example uses the following variables:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Possible values"},"children":["Possible values"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["function"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The UAPI function."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any UAPI function in the specified module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addpop"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Module"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The function's module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any UAPI module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Email"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The function's input parameters."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any parameter from the specified function."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domain"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The value to assign to the input parameter."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Parameters accept a variety of values."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["example.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"liveapi-php-class","__idx":4},"children":["LiveAPI PHP Class"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"$cpanel = new CPANEL(); // Connect to cPanel - only do this once.\n\n// Call a UAPI function.\n$function_result = $cpanel->uapi(\n    'Module', 'function',\n    array(\n        'parameter'     => 'value',\n        'parameter'     => 'value',\n        'parameter'     => 'value',\n         )\n);\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For more information, read our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/guide-to-the-liveapi-system/guide-to-the-liveapi-system-php-class"},"children":["Guide to the LiveAPI System - PHP Class"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For more information about browser-based UAPI calls, read the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cpanel/introduction/#cpanel-or-webmail-session-url-1"},"children":["cPanel or Webmail Session URL calls"]}," below."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example uses the following variables:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Possible values"},"children":["Possible values"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["function"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The UAPI function."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any UAPI function in the specified module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addpop"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Module"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The function's module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any UAPI module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Email"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The function's input parameters."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any parameter from the specified function."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domain"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The value to assign to the input parameter."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Parameters accept a variety of values."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["example.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"liveapi-perl-class","__idx":5},"children":["LiveAPI Perl Class"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"perl","header":{"controls":{"copy":{}}},"source":"#!/usr/bin/perl\n\n# Instantiate the Cpanel::LiveAPI object.\nuse Cpanel::LiveAPI ();\n\n# Connect to cPanel - only do this once.\nmy $cpliveapi = Cpanel::LiveAPI->new();\n\n# Call a UAPI function.\nmy $function_result = $cpliveapi->uapi(\n    'Module', 'function',\n    {\n        'parameter'     => 'value',\n        'parameter'     => 'value',\n        'parameter'     => 'value',\n    }\n);\n\n# Perform the desired actions.\n\n# Disconnect from cPanel - only do this once.\n$cpliveapi->end();\n","lang":"perl"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For more information, read our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/guide-to-the-liveapi-system/guide-to-the-liveapi-system-perl-module/"},"children":["Guide to the LiveAPI System - Perl Module"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For more information about browser-based UAPI calls, read the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cpanel/introduction/#cpanel-or-webmail-session-url-1"},"children":["cPanel or Webmail Session URL calls"]}," below."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example uses the following variables:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Possible values"},"children":["Possible values"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["function"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The UAPI function."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any UAPI function in the specified module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addpop"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Module"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The function's module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any UAPI module."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Email"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The function's input parameters."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any parameter from the specified function."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domain"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The value to assign to the input parameter."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Parameters accept a variety of values."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["example.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"command-line","__idx":6},"children":["Command Line"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"uapi  --user=username --output=type Module function parameter=value parameter=value\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["UAPI calls via the command line do not return the metadata that other methods return if they experience errors that prevent a successful function run. For more information, read our Guide to UAPI - Return Data documentation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["cPanel & WHM introduced the command line feature in version 56."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["UAPI calls through the command line consist of the following basic parts:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/uapi-command.be3f98b9253d7531d23bfde756aed1a34bcee06695dd5126020dc076d21ab120.e19a1923.png","alt":"Command API Example"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"command","__idx":7},"children":["Command"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This value is always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uapi"]}," for calls to UAPI. If you run CloudLinux™, you ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must"]}," use the full path of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uapi"]}," command:",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/usr/local/cpanel/bin/uapi"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"user","__idx":8},"children":["User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The account-level username."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"output-type","__idx":9},"children":["Output Type"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API output type that you wish to receive."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output=json"]}," to return JSON-formatted output."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output=jsonpretty"]}," to return indented JSON-formatted output."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output=yaml"]}," to return YAML-formatted output."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This parameter defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output=yaml"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"module","__idx":10},"children":["Module"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UAPI module name."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"function","__idx":11},"children":["Function"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UAPI function."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"user-1","__idx":12},"children":["User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The cPanel account username."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"input-parameters-and-values","__idx":13},"children":["Input parameters and values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The function's input parameters and their values."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Space-separate multiple parameter=value pairs."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Special characters within a key's value may cause an error."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You must either escape any special characters within values or surround the value with appropriate quotes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For more information, read Wikipedia's ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Escape_character"},"children":["Escape Characters"]}," article."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For example, a bash shell command with a JSON-encoded value may appear similar to one of the following examples:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"uapi --user username Module function key=[\\\"sslinstall\\\",\\\"videotut\\\"]\"\nuapi --user username Module function key='{\"videotut\",\"sslinstall\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The term \"Boolean\" in our documentation refers to parameters that accept values of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". cPanel & WHM's APIs do not support the literal values of true and false."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information about this feature, run the following command:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"uapi --help\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cpanel-or-webmail-session-url-1","__idx":14},"children":["cPanel or Webmail Session URL"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can access UAPI functions directly from any web browser when you make the call from a cPanel or Webmail session."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Browser-based calls consist of the following basic parts:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/uapi.e39acceef3a34d84c5f02546f9ed5f14761646239324702f3ebd446a5b1bd449.e19a1923.jpg","alt":"JSON API Example"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"server-and-port","__idx":15},"children":["Server and port"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The web server's HTTP address and the port number to use. Generally, this value begins with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://"]}," and the domain name."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you call this API, use the following ports:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2082"]}," - Unsecure calls as a specific cPanel account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2083"]}," - Secure calls as a specific cPanel account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2095"]}," - Unsecure calls via a Webmail session."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2096"]}," - Secure calls via a Webmail session."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Warning"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Unless you call this API via the WHM API 1, you ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["cannot"]}," call this API via WHM's ports (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2086"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2087"]},")."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"security-token","__idx":16},"children":["Security token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The current session's ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://go.cpanel.net/basic-security-concepts"},"children":["security token"]},"."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cookie-based calls (for example, calls from a web browser) require a security token. For other authentication methods, read our Guide to API Authentication documentation."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"action","__idx":17},"children":["Action"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This portion of the URL will always be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["execute"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"module-1","__idx":18},"children":["Module"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UAPI module name."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"function-1","__idx":19},"children":["Function"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UAPI function."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"input-parameters-and-values-1","__idx":20},"children":["Input parameters and values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UAPI function's input parameters and their values."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Separate multiple ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameter=value"]}," pairs with the ampersand character (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You must ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Percent-encoding"},"children":["URI-encode"]}," these values."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The term \"Boolean\" in our documentation refers to parameters that accept values of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". cPanel & WHM's APIs do ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," support the literal values of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Do not attempt to use cPanel or WHM interface URLs to perform actions in custom code. You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must"]}," call the appropriate API functions in order to perform the actions of cPanel & WHM's interfaces."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, do ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," pass values to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".html"]}," pages, as in the following example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://example.com:2083/cpsess###########/frontend/jupiter/email_accounts/index.html/create#email=test&domain=example.com\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["While this ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["unsupported"]}," method sometimes worked in previous versions of cPanel & WHM, we ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["strongly"]}," discourage its use and do ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," guarantee that it will work in the future. Instead, the correct method to perform this action is to call the appropriate API function."]}]},"headings":[{"value":"Introduction to UAPI","id":"introduction-to-uapi","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Basic Usage","id":"basic-usage","depth":2},{"value":"cPanel or Webmail Session URL","id":"cpanel-or-webmail-session-url","depth":3},{"value":"LiveAPI PHP Class","id":"liveapi-php-class","depth":3},{"value":"LiveAPI Perl Class","id":"liveapi-perl-class","depth":3},{"value":"Command Line","id":"command-line","depth":3},{"value":"Command","id":"command","depth":4},{"value":"User","id":"user","depth":4},{"value":"Output Type","id":"output-type","depth":4},{"value":"Module","id":"module","depth":4},{"value":"Function","id":"function","depth":4},{"value":"User","id":"user-1","depth":4},{"value":"Input parameters and values","id":"input-parameters-and-values","depth":4},{"value":"cPanel or Webmail Session URL","id":"cpanel-or-webmail-session-url-1","depth":2},{"value":"Server and port","id":"server-and-port","depth":4},{"value":"Security token","id":"security-token","depth":4},{"value":"Action","id":"action","depth":4},{"value":"Module","id":"module-1","depth":4},{"value":"Function","id":"function-1","depth":4},{"value":"Input parameters and values","id":"input-parameters-and-values-1","depth":4}],"frontmatter":{"seo":{"title":"Introduction to UAPI"}},"lastModified":"2026-05-19T00:16:18.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/cpanel/introduction","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}