openapi: 3.2.0 info: contact: email: cs@cpanel.net name: WebPros International, LLC url: https://cpanel.net/support/ description: UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings. license: name: cPanel License url: https://cpanel.net/legal-notices/ termsOfService: https://cpanel.net/legal-notices/ title: cPanel U User Manager API version: 11.137.9999.106 x-api-evangelist-provenance: 'Harvested verbatim from cPanel''s developer portal on 2026-09-05 via the MCP tool get-full-api-description at https://api.docs.cpanel.net/mcp. ONE mechanical change was made before storage: example values containing PEM private-key or certificate blocks, and AWS-access-key-shaped example strings, were replaced with REDACTED_* placeholders so the file can be stored in a public git repository without tripping secret scanning. No path, operation, parameter, schema or description was altered, added or removed.' servers: - description: A server running 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. security: - BasicAuth: [] tags: - description: The UserManager module for UAPI. name: UserManager paths: /UserManager/change_password: get: x-readonly: false x-rollback: none description: This function updates the password of the main cPanel account, from the User Manager interface. It applies to the account owner only. operationId: UserManager-change_password parameters: - description: The new password. in: query name: newpass required: true schema: example: MyNewPassw0rd! format: password type: string - description: The current password. in: query name: oldpass required: true schema: example: ThisWasMyPassword! format: password type: string - description: 'Whether to update the cPanel account''s MySQL password. * `1` - Update MySQL password. * `0` - Do not update MySQL passowrd.' in: query name: enablemysql required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer 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: change_password type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: default: null type: - object - '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: {} 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 description: HTTP Request was successful. summary: Update cPanel account password (User Manager) tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n change_password \\\n oldpass='MyPreviousPassword' \\\n newpass='MyUpdatedPassword'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/change_password?oldpass=12346=newpass=ThisIs4It! - 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 UserManager_change_password.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/UserManager_change_password.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/UserManager/,\n q/change_password/,\n {\n 'oldpass' => 'PreviousPassword',\n 'newpass' => 'B3tt3rP4ssw0rd!',\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 UserManager_change_password.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/UserManager_change_password.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 'UserManager',\n 'change_password',\n array (\n 'oldpass' => 'PreviousPassword',\n 'newpass' => 'B3tt3rP4ssw0rd!',\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 116 /UserManager/check_account_conflicts: get: x-readonly: true description: 'This function lists the other Subaccounts or services accounts that conflict with the specified username. **Note:** If the function returns more than one account, it will return some values multiple times within the return arrays.' operationId: UserManager-check_account_conflicts parameters: - description: The Subaccount's username and domain name. in: query name: full_username required: true schema: example: username@example.com format: email 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: check_account_conflicts type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: properties: accounts: description: An object containing the service accounts that match the queried `full_username` parameter. properties: alternate_email: description: An alternate email address for the Subaccount's user. example: user@example.com format: email type: - string - 'null' avatar_url: description: The URL to the user's Subaccount profile image file. example: https://img.example.com/avatars/example.jpg format: url type: - string - 'null' can_delete: description: 'Whether the cPanel account user can delete the Subaccount. * `1` — Can delete. * `0` — **Cannot** delete.' enum: - 1 - 0 example: 0 type: integer can_set_password: description: 'Whether the cPanel account user can change the Subaccount''s password. * `1` — Can change the password. * `0` — **Cannot** change the password. **Note:** the function returns `0` for Subaccounts that inherit their password from the cPanel account.' enum: - 1 - 0 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the Subaccount''s disk usage quota. * `1` — Can change the Subaccount''s disk usage quota. * `0` — **Cannot** change the Subaccount''s disk useage quota.' enum: - 1 - 0 example: 0 type: integer dismissed: description: 'Whether the cPanel account user dismissed the merge prompt for the service account. * `1` — Dismissed. * `0` — Did **not** dismiss. **Note:** **Only** service accounts return this value.' enum: - 1 - 0 example: 1 type: integer dismissed_merge_candidates: description: 'A list of the service accounts that the user dismissed the merge prompt for. **Note:** * This array **always** returns empty. * We reserved this return for future use.' items: type: string type: array domain: description: The Subaccount user's associated domain. example: example.com format: domain type: string full_username: description: The Subaccount's username. example: username@example.com format: email type: string guid: description: The Subaccount's system-assigned unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_expired_invite: description: 'Whether the Subaccount owns an expired invitation. * `1` — Owns an expired invitation. * `0` — Does **not** own an expired invitation.' enum: - 1 - 0 example: 0 type: integer has_invite: description: 'Whether the Subaccount owns an active invitation. * `1` — Own an active invitation. * `0` — Does **not** own an active invitation.' enum: - 1 - 0 example: 0 type: integer has_siblings: description: 'Whether the service account shares the queried `full_username` value with another service account. * `1` — Shares the service account. * `0` — Does **not** share the service account.' enum: - 1 - 0 example: 0 type: integer invite_expiration: description: 'The time at which the new Subaccount invitation will expire. * `null` — The account does **not** own an active invitation.' example: 1600162200 format: unix_timestamp type: - integer - 'null' issues: description: An array of objects containing information about any issues or problems with the Subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: info type: string limit: description: The set megabyte (MB) quota limit for the affected Subaccount. example: 1500 minimum: 1 type: integer message: description: A description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) the account currently uses. example: 2000 minimum: 1 type: integer type: object type: array merge_candidates: description: An array of objects containing the service accounts that the system could merge for this Subaccount. items: properties: parent_type: description: 'The type of account that could own the service account. * `sub` — A Subaccount. * `hypothetical` — A hypothetical Subaccount that does **not** yet exist, but that the user could create as part of a merge. * `null` — **Not** a merge candidate.' enum: - sub - hypothetical type: - string - 'null' phone_number: description: 'The Subaccount user''s phone number, in [ITU-T-recommended E.164](https://en.wikipedia.org/wiki/E.164) format.' example: '+15551234567' type: string real_name: description: The name of the Subaccount user, if provided. example: John Doe type: string services: description: Information about the Subaccount's access to email, FTP, and Web Disk. properties: email: description: Information that indicates the Subaccount's email status. properties: enabled: description: 'Whether the Subaccount can access Webmail, POP, and IMAP services. * `1` — Has service access. * `0` — Does **not** have service access.' enum: - 1 - 0 example: 1 type: integer quota: description: 'The Subaccount''s email disk space quota, in megabytes (MB). * `0` — The account has an unlimited email disk space quota.' example: 100 maximum: 999999 minimum: 0 type: integer type: object ftp: description: Information about the Subaccount's FTP status. properties: enabled: description: 'Whether the Subaccount can access FTP. * `1` — Has FTP service access. * `0` — Does **not** have FTP service access.' enum: - 1 - 0 example: 0 type: integer homedir: description: The Subaccount's FTP directory, relative to the cPanel account's home directory. example: /Subaccount type: string quota: description: 'The Subaccount''s FTP maximum disk space quota, in megabytes (MB). * `0` — The account has an unlimited disk space quota.' example: 100 minimum: 0 type: integer type: object webdisk: description: Information about the Subaccount's Web Disk status. properties: enabled: description: 'Whether the Subaccount can access Web Disk. * `1` — Has Web Disk service access. * `0` — Does **not** have Web Disk service access.' enum: - 1 - 0 example: 0 type: integer homedir: description: The Subaccount's Web Disk directory, relative to the cPanel account's home directory. example: /username type: string perms: description: 'Whether the Web Disk has read or read and write permissions. * `ro` — Read-only permissions. * `rw` — Read and write permissions.' enum: - ro - rw example: rw type: string private: description: 'Whether the Web Disk directory permissions are public or private. * `1` — Private (`0700`). * `0` — Public (`0755`).' enum: - 1 - 0 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` — The user can remove the account. * `0` — The user **cannot** remove the account.' enum: - 1 - 0 example: 1 type: integer sub_account_exists: description: 'Whether a Subaccount exists with the same username. * `1` — Exists. * `0` — Does **not** exist. * `null` — The account is **not** a Subaccount.' enum: - 1 - 0 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the Subaccount''s service accounts. * `1` — Synchronized. * `0` — **Not** synchronized. * `null` — The account is **not** a Subaccount.' enum: - 1 - 0 example: 0 type: - integer - 'null' type: description: 'The type of account. * `sub` — A Subaccount. * `hypothetical` — A hypothetical Subaccount that does **not** yet exist, but that the user could create as part of a merge. * `service` — A service account. * `cpanel` — A cPanel account.' enum: - sub - hypothetical - service - cpanel example: sub type: string username: description: 'The username for the Subaccount. **Note:** This value does **not** include the domain name.' example: username format: username type: string type: object type: array type: object conflict: description: 'Whether the system detected an account conflict. * `1` — Conflict. * `0` — **No** conflict.' enum: - 1 - 0 example: 1 type: integer 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: {} 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: Return Subaccounts and service accounts conflicts tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n check_account_conflicts \\\n full_username='username@example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/check_account_conflicts?full_username=username%40example.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 UserManager_check_account_conflicts.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/UserManager_check_account_conflicts.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/UserManager/,\n q/check_account_conflicts/,\n {\n 'full_username' => 'username@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 UserManager_check_account_conflicts.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/UserManager_check_account_conflicts.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 'UserManager',\n 'check_account_conflicts',\n array (\n 'full_username' => 'username@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: cPanel 56 /UserManager/create_user: get: x-readonly: false x-rollback: none description: This function creates a Subaccount. operationId: UserManager-create_user parameters: - description: The Subaccount user's associated domain that the cPanel account owns. in: query name: domain required: true schema: example: example.com format: domain type: string - description: "The Subaccount's password.\n\n**Note:**\n\n Email, FTP, and Web Disk services use this password." in: query name: password required: true schema: example: 123456luggage format: password type: string - description: 'The username for the Subaccount. The username can only contain alphanumeric characters, dots (`.`), hyphens (`-`), and underscores (`_`). **Note:** This value does **not** include the domain name.' in: query name: username required: true schema: example: example format: username maxLength: 64 type: string - description: "An alternate email address for the Subaccount's user.\n\n**Note:**\n\n You **must** use this parameter if you set the `send_invite` value to `1`." in: query name: alternate_email required: false schema: example: user@example.com format: email type: string - description: 'The URL path to the user''s Subaccount profile photo. **Note:** You **must** use the HTTPS protocol to prevent mixed content warnings when users view the image from another HTTPS URL. **Warning:** We reserved this parameter for future use. Do **not** use this parameter.' in: query name: avatar_url required: false schema: example: https://img.example.com/avatars/example.jpg format: url type: string - description: 'A phone number for the Subaccount user that conforms to [ITU-T](https://en.wikipedia.org/wiki/ITU-T)''s [E.164](https://en.wikipedia.org/wiki/E.164) standards. **Warning:** We reserved this parameter for future use. Do **not** use this parameter.' in: query name: phone_number required: false schema: example: '+15551234567' type: string - description: The Subaccount user's first and/or last name. in: query name: real_name required: false schema: example: John Doe type: string - description: 'Whether to send a reset password email to the Subaccount''s alternate email address. * `1` - Send. * `0` - Do not send.' in: query name: send_invite required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'Whether to grant the Subaccount email access. * `1` - Can access. * `0` - **Cannot** access.' in: query name: services.email.enabled required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'The maximum amount of disk space, in megabytes (MB), allocated to Subaccount''s email account. * `0` or `unlimited` - The subaccount has unlimited disk space. This value defaults to the defined system value. **Note:** This value **cannot** be larger than the system''s maximum email quota.' in: query name: services.email.quota required: false schema: example: '500' type: string - description: 'Whether to send client configuration instructions to the account. * `1` - Send the instructions. * `0` - Do **not** send the instructions.' in: query name: services.email.send_welcome_email required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'Whether to grant the Subaccount FTP access. * `1` - Can access. * `0` - **Cannot** access.' in: query name: services.ftp.enabled required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'The Subaccount''s FTP home directory, relative to the cPanel account''s home directory. **Note:** * This parameter is **required** if you enabled the `services.ftp.homedir` parameter. * The directory **must** exist.' in: query name: services.ftp.homedir required: false schema: example: /Subaccount format: path type: string - description: 'Whether to grant the Subaccount Web Disk access. * `1` _ Can access. * `0` - **Cannot** access.' in: query name: services.webdisk.enabled required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: "Whether to enable the Web Disk Digest Authentication.\n\n* `1` - Enabled.\n* `0` - Disabled.\n\n**Note:**\n\n* **Only** enable Digest Authentication for clients that require additional compatibility support on\n certain versions of Windows® operating systems. This compatibility support is **only** required on servers\n that use a self-signed certificate for the `cpsrvd` and `cpdavd` daemons.\n* We recommend that you do **not** use Digest Authentication." in: query name: services.webdisk.enabledigest required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'The Subaccount''s Web Disk home directory, relative to the cPanel account''s home directory. **Note:** This parameter is **required** if you enable the `services.webdisk.enabled` parameter.' in: query name: services.webdisk.homedir required: false schema: example: /Subaccount format: path type: string - description: "The Subaccount's file permissions for its Web Disk home directory.\n\n* `ro` - Read-only permissions.\n* `rw` - Read and write permissions.\n\n**Note:**\n\n The `services.webdisk.homedir` parameter determines the Subaccount's Web Disk home directory." in: query name: services.webdisk.perms required: false schema: default: rw example: rw type: string - description: 'Whether to set the directory''s permissions to public or private. * `1` - Private (`0700`). * `0` - Public (`0755`).' in: query name: services.webdisk.private required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'The type of account. * `sub` - A Subaccount.' in: query name: type required: false schema: default: sub enum: - sub example: sub 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: create_user type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: $ref: '#/components/schemas/CreateUserResponse' 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: Create Subaccount tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n create_user \\\n domain='example.com' \\\n password='123456luggage' \\\n username='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/create_user?domain=example.com&password=123456luggage&username=example - 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 UserManager_create_user.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/UserManager_create_user.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/UserManager/,\n q/create_user/,\n {\n 'domain' => 'example.com',\n 'password' => '123456luggage',\n 'username' => 'example',\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 UserManager_create_user.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/UserManager_create_user.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 'UserManager',\n 'create_user',\n array (\n 'domain' => 'example.com',\n 'password' => '123456luggage',\n 'username' => 'example',\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 54 /UserManager/delete_user: get: x-readonly: false x-rollback: none description: 'This function deletes a Subaccount. This function returns only metadata if no other service accounts exist with the same username and domain. * If one service account uses the same username and domain, the function returns the service account''s information. * If two or more service accounts use the same username and domain, the function returns a hypothetical Subaccount. **Note:** * A hypothetical Subaccount consists of two or more service accounts that use the same username and domain. * This function returns only metadata if the specified username and domain do **not** match any service accounts or hypothetical Subaccounts.' operationId: UserManager-delete_user parameters: - description: The Subaccount's associated domain. The domain **must** be one that the cPanel account owns. in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The Subaccount''s username. * Characters — `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`) **Note:** This value does **not** include the domain name.' in: query name: username required: true schema: example: example maxLength: 64 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: delete_user type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: properties: alternate_email: description: An alternate email address for the account's user. example: user@example.com format: email type: string avatar_url: description: The user's account profile photo. The URL must point to an image file. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the account. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: 'Whether the cPanel account user can change the account''s password. * `1` - Can change password. * `0` - **Cannot** change password. **Note:** The function returns `0` for accounts that inherit their password from the cPanel account.' enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the account''s disk usage quota. * `1` - Can change quota. * `0` - **Cannot** change quota.' enum: - 0 - 1 example: 0 type: integer dismissed: description: 'Whether the cPanel account user dismissed the merge prompt for the service account. * `1` - Dismissed prompt. * `0` - Did **not** dismiss prompt. **Note:** **Only** service accounts return this value.' enum: - 0 - 1 example: 1 type: integer dismissed_merge_candidates: description: 'An array of objects that represent the service accounts that the user dismissed the merge prompt for. This array will always return empty. **Note:** We reserved this return for future use.' items: type: object type: array domain: description: The account user's associated domain. example: example.com format: domain type: string full_username: description: The account's username and domain name, separated by the `@` character. example: user@example.com type: string guid: description: The account unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_expired_invite: description: 'Whether the Subaccount owns an expired invitation. * `1` - Owns an expired invitation. * `0` - Does **not** own an expired invitation.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether the Subaccount owns an active invitation. * `1` - Owns an invitation. * `0` - Does **not** own an invitation.' enum: - 0 - 1 example: 0 type: integer has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does not share.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: 'The time at which the new Subaccount invitation will expire, given as a valid Unix epoch time or null. If the account does not own an active invitation, this value returns `null`.' example: 1466258282 format: unix_timestamp type: - integer - 'null' issues: description: Information about any issues or problems with the account. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected account. example: 1500 minimum: 0 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 minimum: 0 type: integer type: array merge_candidates: description: 'The service accounts that the system could merge for this account. **Note:** You can find descriptions for this array''s returns within this table.' items: properties: alternate_email: type: string avatar_url: type: string can_delete: type: integer can_set_password: type: integer can_set_quota: type: integer dismissed: type: integer dismissed_merge_candidates: items: type: string type: array domain: format: domain type: string full_username: type: string guid: type: string has_expired_invite: type: integer has_invite: type: integer has_siblings: type: integer invite_expiration: type: integer issues: items: type: string type: array merge_candidates: items: type: string type: array parent_type: type: string phone_number: type: string real_name: type: string services: type: object special: type: integer sub_account_exists: type: integer synced_password: type: integer type: type: string username: format: username type: string type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - An account. * `hypothetical` - A hypothetical account does **not** yet exist, but that the user could create as part of a merge. * `null` - **Not** a merge candidate.' enum: - sub - hypothetical example: hypothetical type: - string - 'null' phone_number: description: 'The account user''s phone number. * A valid phone number that conforms to [ITU-T](https://en.wikipedia.org/wiki/ITU-T)''s [E.164-recommended standard](https://en.wikipedia.org/wiki/E.164) for the representation of telephone numbers.' example: '+15551234567' type: string real_name: description: 'The name of the account''s user. * A first name, a last name, or a first name and last name. * An empty string.' example: John Doe type: string services: description: Information about the account's access to email, FTP, and Web Disk. properties: email: description: Information that indicates the account's email status. properties: enabled: description: 'Whether the account can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 1 - 0 example: 1 type: integer quota: description: 'The account''s email disk space quota. * The set quota megabyte (MB) limit for the account''s email disk space. * `0` - Unlimited.' example: 100 maximum: 999999 minimum: 0 type: integer type: object ftp: description: Information about the account's FTP status. properties: enabled: description: 'Whether the account can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 1 - 0 example: 0 type: integer homedir: description: 'The account''s FTP home directory. * A valid path, relative to the cPanel account''s home directory.' example: /account format: path type: string quota: description: 'The account''s FTP disk space quota. * An integer that represents the account''s maximum FTP disk usage, in megabytes (MB). * `0` - Unlimited.' example: 100 minimum: 0 type: integer type: object webdisk: description: Information about the account's Web Disk status. properties: enabled: description: 'Whether the account can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 1 - 0 example: 0 type: integer homedir: description: 'The account''s Web Disk directory. * A valid path, relative to the cPanel account''s home directory.' example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the account. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).' enum: - 1 - 0 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 1 - 0 example: 1 type: integer sub_account_exists: description: 'Whether an account exists with the same username. * `1` - Exists. * `0` - Does not exist. * `null` - The account is **not** a service account.' enum: - 1 - 0 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the account''s service accounts. * `1` - Synchronized. * `0` - **Not** synchronized. * `null` - The account is **not** a Subaccount' enum: - 1 - 0 example: 0 type: - integer - 'null' type: description: 'The type of account. * `hypothetical` - A hypothetical account that does not exist, but that the user could create as part of a merge. * `service` - A service account.' enum: - hypothetical - service example: service type: string username: description: 'The account username. The username must meet the account name limitations. * Characters - `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`) **Note::** This value does **not** include the domain name.' format: username maxLength: 64 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: {} 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: Delete Subaccount tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n delete_user \\\n username='example' \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/delete_user?username=example&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 UserManager_delete_user.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/UserManager_delete_user.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/UserManager/,\n q/delete_user/,\n {\n 'username' => 'example',\n 'domain' => '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 UserManager_delete_user.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/UserManager_delete_user.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 'UserManager',\n 'delete_user',\n array (\n 'username' => 'example',\n 'domain' => '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: cPanel 54 /UserManager/dismiss_merge: get: x-readonly: false x-rollback: none description: 'This function removes a service account as a link candidate to create a subaccount or link to a subaccount. When you use this function, the system removes the *Link* option in cPanel''s *User Manager* interface (_cPanel >> Home >> Preferences >> User Manager_). **Note:** You **must** use at least one of the following parameters: * `services.email.dismiss` * `services.ftp.dismiss` * `services.webdisk.dismiss`' operationId: UserManager-dismiss_merge parameters: - description: The service account's associated domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The username for the service account. **Note:** This parameter does **not** include the domain name.' in: query name: username required: true schema: example: example1 format: username maxLength: 64 type: string - description: 'Whether to dismiss the merge of the email service account. * `1` - Dismiss. * `0` - Do **not** dismiss.' in: query name: services.email.dismiss required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'Whether to dismiss the merge of the FTP service account. * `1` - Dismiss. * `0` - Do **not** dismiss.' in: query name: services.ftp.dismiss required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'Whether to dismiss the merge of the Web Disk service account. * `1` - Dismiss. * `0` - Do **not** dismiss.' in: query name: services.webdisk.dismiss required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer 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: dismiss_merge type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: {} 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: Remove service account link request tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n dismiss_merge \\\n username='example1' \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/dismiss_merge?username=example1&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 UserManager_dismiss_merge.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/UserManager_dismiss_merge.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/UserManager/,\n q/dismiss_merge/,\n {\n 'username' => 'example1',\n 'domain' => '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 UserManager_dismiss_merge.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/UserManager_dismiss_merge.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 'UserManager',\n 'dismiss_merge',\n array (\n 'username' => 'example1',\n 'domain' => '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: cPanel 54 /UserManager/edit_user: get: x-readonly: false x-rollback: none description: This function edits a Subaccount. operationId: UserManager-edit_user parameters: - description: 'The Subaccount user''s associated domain. A domain that the cPanel account owns.' in: query name: domain required: true schema: example: example.com format: domain type: string - description: "The Subaccount's username.\n\n* Length - 64 characters.\n* Characters - `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`).\n\n**Note:**\n\n This value does **not** include the domain name." in: query name: username required: true schema: example: example type: string - description: "An alternate email address for the Subaccount's user.\n\n**Note:**\n\n The cPanel account user could use this email address to contact the Subaccount user if their primary email address's domain is unavailable." in: query name: alternate_email required: false schema: default: null example: user@example.com format: email type: - string - 'null' - description: "**Warning:**\n\n We reserved this parameter for future use. Do **not** use this parameter.\n\nThe user's Subaccount profile photo.\n\n**Note:**\n\n You **must** use the HTTPS protocol to prevent mixed content warnings when users view the photo from another HTTPS URL." in: query name: avatar_url required: false schema: default: null example: https://img.example.com/avatars/example.jpg format: url type: - string - 'null' - description: "The Subaccount's new password.\n\n**Note:**\n\n The Subaccount uses this password for email, FTP, and Web Disk services." in: query name: password required: false schema: example: 12345luggage type: string - description: "The Subaccount user's phone number.\n\n**Warning:**\n\n We reserved this parameter for future use. Do **not** use this parameter.\n\nThe number conforms to the [ITU-T](https://en.wikipedia.org/wiki/ITU-T)'s [E.164](https://en.wikipedia.org/wiki/E.164)-recommended standard for the representation of telephone numbers." in: query name: phone_number required: false schema: default: null example: '+15551234567' type: - string - 'null' - description: 'The Subaccount user''s name. * A first name. * A last name. * A first name and last name. * An empty string.' in: query name: real_name required: false schema: default: null example: John Doe type: - string - 'null' - description: 'Whether to grant the Subaccount email access. * `1` - Can access. * `0` - **Cannot** access.' in: query name: services.email.enabled required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: "The maximum amount of disk space, in megabytes (MB), that the subaccount's email account may use.\n\nIf you do not declare a value, the system defaults to the defined system value.\n\n**Note:**\n\n This value **cannot** be greater than the maximum email quota.\n\n* `0` or `unlimited` - The subaccount possesses unlimited disk space." in: query name: services.email.quota required: false schema: example: 500 type: integer - description: 'Whether to grant the Subaccount FTP access. * `1` - Can access. * `0` - **Cannot** access.' in: query name: services.ftp.enabled required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: "The Subaccount's FTP home directory.\n\n**Note:**\n\n This parameter is **required** if you enable FTP access.\n\nA relative path from the cPanel account's home directory.\n\n**Note:**\n\n The specified directory **must** exist." in: query name: services.ftp.homedir required: false schema: example: /Subaccount format: path type: string - description: 'Whether to grant the Subaccount Web Disk access. * `1` - Can access. * `0` - **Cannot** access.' in: query name: services.webdisk.enabled required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: "Whether to enable Web Disk digest authentication.\n\n**Notes:**\n\n * **Only** enable Digest Authentication for clients that require additional compatibility support on certain versions of Windows® operating systems. This compatibility support is **only** required on servers that use a self-signed certificate for the `cpsrvd` and `cpdavd` daemons.\n * We recommend that you do **not** use Digest Authentication.\n\n\n* `1` - Enabled\n* `0` - Disabled." in: query name: services.webdisk.enabledigest required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: "The Subaccount's Web Disk home directory.\n\n**Note:**\n\n This parameter is **required** if you enable Web Disk access.\n\nA relative path from the cPanel account's home directory." in: query name: services.webdisk.homedir required: false schema: example: /Subaccount format: path type: string - description: "Whether to grant write permissions to the Subaccount.\n\n**Note:**\n\n The `services.webdisk.homedir` parameter determines the Subaccount's Web Disk home directory.\n\n* `ro` - Read-only permissions.\n* `rw` - Read and write permissions." in: query name: services.webdisk.perms required: false schema: default: rw enum: - ro - rw example: rw type: string - description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (`0700`). * `0` - Public (`0755`).' in: query name: services.webdisk.private required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'The type of account. * `sub` - A Subaccount.' in: query name: type required: false schema: default: sub enum: - sub example: sub 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: edit_user type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: allOf: - $ref: '#/components/schemas/EditUserSubaccountBase' - $ref: '#/components/schemas/SubaccountMergeCandidates' properties: dismissed_merge_candidates: description: An array of objects of service candidates that the system dismissed from merges. items: $ref: '#/components/schemas/SubaccountMergeCandidates' type: array 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: {} 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 Subaccount settings tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n edit_user \\\n domain='example.com' \\\n password='12345luggage' \\\n username='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/edit_user?domain=example.com&password=12345luggage&username=example - 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 UserManager_edit_user.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/UserManager_edit_user.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/UserManager/,\n q/edit_user/,\n {\n 'domain' => 'example.com',\n 'password' => '12345luggage',\n 'username' => 'example',\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 UserManager_edit_user.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/UserManager_edit_user.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 'UserManager',\n 'edit_user',\n array (\n 'domain' => 'example.com',\n 'password' => '12345luggage',\n 'username' => 'example',\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 54 /UserManager/list_users: get: x-readonly: true description: This function lists the cPanel account's Subaccounts. operationId: UserManager-list_users parameters: - description: 'Whether to return Subaccounts with the same name under the merge_candidates array. * `1` - Do **not** return. * `0` - Return.' in: query name: flat required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer 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: list_users type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: items: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: "Whether the cPanel account user can change the subaccount's password.\n* `1` - Can change.\n* `0` - **Cannot** change.\n\n**Note:**\n\n The function returns a `0` value for subaccounts that inherit their password from the cPanel account." enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer dismissed: description: "Whether the cPanel account user dismissed the merge prompt for the service account.\n* `1` - Dismissed.\n* `0` - Did **not** dismiss.\n\n**Note:**\n\n **Only** service accounts return this value." enum: - 0 - 1 example: 1 type: integer dismissed_merge_candidates: description: An array of objects containing information about service candidates that the system dismissed from merges. example: [] items: type: string type: array domain: description: The subaccount user's associated domain. example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com type: string guid: description: The subaccount unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_expired_invite: description: 'Whether an expired account login invitation exists. * `1` - Expired account invitation exists. * `0` - Expired account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether an account login invitation exists. * `1` - Account invitation exists. * `0` - Account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_siblings: description: 'Whether the service account shares a full_username value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: When the invitation expires. example: 1591718154 format: unix_timestamp type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 format: megabytes minimum: 1 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: The affected service. enum: - email - ftp - webdisk example: email type: string type: description: The type of issue. enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 format: megabytes type: integer type: object type: array merge_candidates: description: An array of objects that represents the service accounts that the system could merge for this subaccount. example: [] items: type: string type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** yet exist, but the user could create as part of a merge. * `null` - **Not** a merge candidate.' enum: - sub - hypothetical example: hypothetical type: - string - 'null' phone_number: description: The subaccount user's phone number. A valid phone number that conforms to [ITU-T](https://en.wikipedia.org/wiki/ITU-T)'s [E.164](https://en.wikipedia.org/wiki/E.164) -recommended standard for the representation of telephone numbers. example: '+15551234567' type: string real_name: description: The name of the subaccount's user. example: John Doe type: string services: description: An object containing information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: An object containing the information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: The maximum amount of disk space allocated to subaccount's email account. example: 100 format: megabytes minimum: 1 type: integer type: object ftp: description: An object containing the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory relative to the cPanel account's home. example: /subaccount format: path type: string quota: description: 'The subaccount''s FTP disk space quota. * `0` - Unlimited.' example: 100 format: megabytes maximum: 999999 minimum: 0 type: integer type: object special: description: 'Whether the account is a system-created special account that the user cannot remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer webdisk: description: An object containing information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory relative to the cPanel account's home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' enum: - ro - rw example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` — A special account. * `0` — **Not** a special account.' enum: - 0 - 1 example: 0 type: integer sub_account_exists: description: 'Whether a subaccount exists with the same username. * `1` - Exists. * `0` - Does **not** exist. **Note:** The function returns a `null` value if the account is **not** a service account.' enum: - 0 - 1 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the subaccount''s service accounts. * `1` - Synchronized. * `0` - Not synchronized. **Note:** The function returns a `null` value if the account is **not** a subaccount.' enum: - 0 - 1 example: 0 type: - integer - 'null' type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does not exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' enum: - sub - hypothetical - service - cpanel example: sub type: string username: description: 'The username for the subaccount. A username that meets the subaccount name limitations. - Length 64 characters. - Characters a-z, A-Z, 0-9, dot (.), hyphen (-), underscore (_). **Note:** This value does **not** include the domain name.' example: example maxLength: 64 minLength: 1 pattern: ^[\w\.]{1,64}$ type: string type: object properties: {} 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: - 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 an API. example: null items: type: string type: - array - 'null' type: object type: object description: HTTP Request was successful. summary: Return cPanel account's Subaccounts tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n list_users\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/list_users - 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 UserManager_list_users.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/UserManager_list_users.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/UserManager/,\n q/list_users/\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 UserManager_list_users.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/UserManager_list_users.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 'UserManager',\n 'list_users'\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 54 /UserManager/lookup_service_account: get: x-readonly: true description: This function lists a service account's information. operationId: UserManager-lookup_service_account parameters: - description: The full username for the system account. in: query name: full_username required: true schema: example: username@example.com type: string - description: 'The type of system account. * `email` * `ftp` * `webdisk`' in: query name: type required: true schema: enum: - email - ftp - webdisk example: email 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_service_account type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: allOf: - $ref: '#/components/schemas/LookupServiceAccountSubaccountBase' - $ref: '#/components/schemas/LookupServiceAccountSubaccountMergeCandidates' properties: dismissed_merge_candidates: description: An array of objects of service candidates that the system dismissed from merges. items: $ref: '#/components/schemas/LookupServiceAccountSubaccountMergeCandidates' type: array 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: {} 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 service account's information tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n lookup_service_account \\\n type='email' \\\n full_username='username@example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/lookup_service_account?type=email&full_username=username%40example.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 UserManager_lookup_service_account.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/UserManager_lookup_service_account.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/UserManager/,\n q/lookup_service_account/,\n {\n 'type' => 'email',\n 'full_username' => 'username@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 UserManager_lookup_service_account.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/UserManager_lookup_service_account.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 'UserManager',\n 'lookup_service_account',\n array (\n 'type' => 'email',\n 'full_username' => 'username@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: cPanel 54 /UserManager/lookup_user: get: x-readonly: true description: This function lists a single Subaccount's information. operationId: UserManager-lookup_user parameters: - description: The Subaccount's unique identifier. in: query name: guid required: true schema: example: EXAMPLE1:EXAMPLE.COM:564CD663%3AFE50072F2620B50988EA4E5F46022546FBE6BDDE3C36C2F2534F4967C661EC37 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_user type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: allOf: - $ref: '#/components/schemas/ServiceAccount' - properties: dismissed_merge_candidates: description: An array of service account objects that the system dismissed from merges. items: $ref: '#/components/schemas/ServiceAccount' type: array has_expired_invite: description: 'Whether an expired account login invitation exists. * `1` - Expired account invitation exists. * `0` - Expired account invitation does not exist.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether an account login invitation exists. * `1` - Account invitation exists. * `0` - Account invitation does not exist.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: When the invitation expires. example: 1591718154 format: unix_timestamp type: - integer - 'null' - 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: {} 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 Subaccount's information tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n lookup_user \\\n guid='EXAMPLE1:EXAMPLE.COM:564CD663%3AFE50072F2620B50988EA4E5F46022546FBE6BDDE3C36C2F2534F4967C661EC37'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/lookup_user?guid=EXAMPLE1%3aEXAMPLE.COM%3a564CD663%253AFE50072F2620B50988EA4E5F46022546FBE6BDDE3C36C2F2534F4967C661EC37 - 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 UserManager_lookup_user.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/UserManager_lookup_user.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/UserManager/,\n q/lookup_user/,\n {\n 'guid' => 'EXAMPLE1:EXAMPLE.COM:564CD663%3AFE50072F2620B50988EA4E5F46022546FBE6BDDE3C36C2F2534F4967C661EC37',\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 UserManager_lookup_user.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/UserManager_lookup_user.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 'UserManager',\n 'lookup_user',\n array (\n 'guid' => 'EXAMPLE1:EXAMPLE.COM:564CD663%3AFE50072F2620B50988EA4E5F46022546FBE6BDDE3C36C2F2534F4967C661EC37',\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 54 /UserManager/merge_service_account: get: x-readonly: false x-rollback: none description: 'This function links service accounts to subaccounts and creates a subaccount if one does not exist. **Note:** You can only link email, FTP, or Web Disk accounts. **Important** You must use at least **one** of the following parameters: * services.email.merge * services.ftp.merge * services.webdisk.merge To link multiple service accounts, the service accounts **must** share the same username and domain.' operationId: UserManager-merge_service_account parameters: - description: The service account's associated domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The username for the service account that meets the account name limitations. * Length - 64 characters * Characters — `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`). **Note:** This value does **not** include the domain name.' in: query name: username required: true schema: example: example format: username type: string - description: 'Whether to link the email account to the subaccount. * `1` - Merge. * `0` - Do **not** merge.' in: query name: services.email.merge required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'Whether to link the FTP account to the subaccount. * `1` - Merge. * `0` - Do **not** merge.' in: query name: services.ftp.merge required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer - description: 'Whether to link the Web Disk account to the subaccount. * `1` - Merge. * `0` - Do **not** merge.' in: query name: services.webdisk.merge required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer 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: merge_service_account type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: 'Whether the cPanel account user can change the subaccount''s password. * `1` - Can change. * `0` - **Cannot** change. **Note:** The function returns a `0` value for subaccounts that inherit their password from the cPanel account.' enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer dismissed: description: 'Whether the cPanel account user dismissed the merge prompt for the service account. **Note:** Only service accounts return this value. * `1` - Dismissed. * `0` - Did **not** dismiss.' enum: - 0 - 1 example: 1 type: integer dismissed_merge_candidates: description: An array of objects of service candidates that the system dismissed from merges. items: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: 'Whether the cPanel account user can change the subaccount''s password. * `1` - Can change. * `0` - **Cannot** change. **Note:** The function returns a `0` value for subaccounts that inherit their password from the cPanel account.' enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer domain: description: The subaccount user's associated domain that the cPanel account owns. example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com format: email type: string guid: description: The subaccount unique identifier. The system assigned unique value. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 minimum: 1 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 minimum: 1 type: integer type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does not yet exist, but the user could create as part of a merge. * `null` - **Not** a merge candidate.' enum: - sub - hypothetical example: hypothetical type: - string - 'null' phone_number: description: The subaccount user's phone number. example: '+15551234567' type: string real_name: description: 'The name of the subaccount''s user. * A first name. * Last name. * First name and last name. * An empty string.' example: John Doe type: string services: description: This object contains information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: This object contains the information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: 'The maximum amount of disk space allocated to subaccount''s email account. A positive integer that represents the maximum disk space that the subaccount may use, in megabytes (MB). **Note:** This function will **not** return `0` as a value.' example: 100 type: integer type: object ftp: description: This object contains the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory. example: /subaccount format: path type: string quota: description: 'The subaccount''s FTP disk space quota. * >= `1` - Represents the maximum disk space that the subaccount may use, in megabytes (MB). * `0` - Unlimited.' example: 100 maximum: 999999 minimum: 0 type: integer type: object webdisk: description: This object contains information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' enum: - ro - rw example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer sub_account_exists: description: 'Whether a subaccount exists with the same username. * `1` - Exists. * `0` - Does **not** exist. **Note:** The function returns a `null` value if the account is not a service account.' enum: - 0 - 1 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the subaccount''s service accounts. * `1` - Synchronized. * `0` - **Not** synchronized. **Note:** The function returns a `null` value if the account is **not** a subaccount.' enum: - 0 - 1 example: 0 type: - integer - 'null' type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' enum: - sub - hypothetical - service - cpanel example: sub type: string username: description: The username for the subaccount. example: example format: username type: string type: object type: array domain: description: The subaccount user's associated domain. A domain that the cPanel account owns. example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com format: email type: string guid: description: The subaccount unique identifier. The system assigned unique value. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_expired_invite: description: 'Whether an expired account login invitation exists. * `1` - Expired account invitation exists. * `0` - Expired account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether an account login invitation exists. * `1` - Account invitation exists. * `0` - Account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: When the invitation expires. example: 1591718154 format: unix_timestamp type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 minimum: 1 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 minimum: 1 type: integer type: object type: array merge_candidates: description: An array of objects that represents the service accounts that the system could merge for this subaccount. items: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: 'Whether the cPanel account user can change the subaccount''s password. * `1` - Can change. * `0` - **Cannot** change. **Note:** The function returns a `0` value for subaccounts that inherit their password from the cPanel account.' enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer domain: description: The subaccount user's associated domain. A domain that the cPanel account owns. example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com format: email type: string guid: description: The subaccount unique identifier. The system assigned unique value. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 minimum: 1 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 minimum: 1 type: integer type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** yet exist, but the user could create as part of a merge. * `null` - Not a merge candidate.' enum: - sub - hypothetical example: hypothetical type: - string - 'null' phone_number: description: The subaccount user's phone number. example: '+15551234567' type: string real_name: description: 'The name of the subaccount''s user. * A first name. * Last name. * First name and last name. * An empty string.' example: John Doe type: string services: description: This object contains information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: This object contains the information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: 'The maximum amount of disk space allocated to subaccount''s email account. A positive integer that represents the maximum disk space that the subaccount may use, in megabytes (MB). **Note:** This function will **not** return `0` as a value.' example: 100 type: integer type: object ftp: description: This object contains the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory. example: /subaccount format: path type: string quota: description: 'The subaccount''s FTP disk space quota. * >= `1` - Represents the maximum disk space that the subaccount may use, in megabytes (MB). * `0` - Unlimited.' example: 100 maximum: 999999 minimum: 0 type: integer type: object webdisk: description: This object contains information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer sub_account_exists: description: 'Whether a subaccount exists with the same username. * `1` - Exists. * `0` - Does **not** exist. **Note:** The function returns a `null` value if the account is **not** a service account.' enum: - 0 - 1 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the subaccount''s service accounts. * `1` - Synchronized. * `0` - **Not** synchronized. **Note:** The function returns a `null` value if the account is **not** a subaccount.' enum: - 0 - 1 example: 0 type: - integer - 'null' type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' enum: - sub - hypothetical - service - cpanel example: sub type: string username: description: 'The username for the service account that meets the account name limitations. * Length - 64 characters * Characters — `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`). **Note:** This value does **not** include the domain name.' example: example format: username type: string type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** yet exist, but the user could create as part of a merge. * `null` - Not a merge candidate.' enum: - sub - hypothetical example: hypothetical type: - string - 'null' phone_number: description: The subaccount user's phone number. example: '+15551234567' type: string real_name: description: 'The name of the subaccount''s user. * A first name. * Last name. * First name and last name. * An empty string.' example: John Doe type: string services: description: This object contains information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: This object contains the information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: 'The maximum amount of disk space allocated to subaccount''s email account. A positive integer that represents the maximum disk space that the subaccount may use, in megabytes (MB). **Note:** This function will **not** return `0` as a value.' example: 100 type: integer type: object ftp: description: This object contains the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory. example: /subaccount format: path type: string quota: description: 'The subaccount''s FTP disk space quota. * >= `1` - Represents the maximum disk space that the subaccount may use, in megabytes (MB). * `0` - Unlimited.' example: 100 maximum: 999999 minimum: 0 type: integer type: object webdisk: description: This object contains information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer sub_account_exists: description: 'Whether a subaccount exists with the same username. * `1` - Exists. * `0` - Does **not** exist. **Note:** The function returns a `null` value if the account is **not** a service account.' enum: - 0 - 1 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the subaccount''s service accounts. * `1` - Synchronized. * `0` - **Not** synchronized. **Note:** The function returns a `null` value if the account is **not** a subaccount.' enum: - 0 - 1 example: 0 type: - integer - 'null' type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' example: sub type: string username: description: 'The username for the subaccount. The username for the service account that meets the account name limitations. * Length - 64 characters * Characters — `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`). **Note:** This value does **not** include the domain name.' example: example format: username 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: {} 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: Register service account to Subaccount tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n merge_service_account \\\n username='example' \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/merge_service_account?username=example&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 UserManager_merge_service_account.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/UserManager_merge_service_account.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/UserManager/,\n q/merge_service_account/,\n {\n 'username' => 'example',\n 'domain' => '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 UserManager_merge_service_account.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/UserManager_merge_service_account.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 'UserManager',\n 'merge_service_account',\n array (\n 'username' => 'example',\n 'domain' => '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: cPanel 54 /UserManager/unlink_service_account: get: x-readonly: false x-rollback: none description: This function unlinks a service account from a subaccount. operationId: UserManager-unlink_service_account parameters: - description: The subaccount's associated domain. in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'The service to unlink. * `email` * `ftp` * `webdisk`' in: query name: service required: true schema: enum: - email - ftp - webdisk example: ftp type: string - description: 'The subaccount''s username. **Note:** This value does **not** include the domain name.' in: query name: username required: true schema: example: example format: username type: string - description: "Whether to dismiss the service account as a merge candidate.\n* `1` - Dismiss as merge candidate.\n* `0` - Display as merge candidate.\n\n**Note:**\n\n If any email, FTP, or Web Disk accounts use the same username, cPanel's [*User Manager*](https://go.cpanel.net/cpaneldocsUserManager) interface (*cPanel >> Home >> Preferences >> User Manager*) allows you to merge those accounts into a subaccount." in: query name: dismiss required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer 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: unlink_service_account type: string module: description: The name of the module called. example: UserManager type: string result: properties: data: default: null type: - object - '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: {} 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 description: HTTP Request was successful. summary: Unregister service account from Subaccount tags: - UserManager x-codeSamples: - label: CLI lang: Shell source: "uapi --output=jsonpretty \\\n --user=username \\\n UserManager \\\n unlink_service_account \\\n username='example' \\\n domain='example.com' \\\n service='ftp'\n" - label: URL lang: HTTP source: https://hostname.example.com:2083/cpsess##########/execute/UserManager/unlink_service_account?username=example&domain=example.com&service=ftp - 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 UserManager_unlink_service_account.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/UserManager_unlink_service_account.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/UserManager/,\n q/unlink_service_account/,\n {\n 'username' => 'example',\n 'domain' => 'example.com',\n 'service' => 'ftp',\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 UserManager_unlink_service_account.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/UserManager_unlink_service_account.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 'UserManager',\n 'unlink_service_account',\n array (\n 'username' => 'example',\n 'domain' => 'example.com',\n 'service' => 'ftp',\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 56 components: schemas: SubaccountMergeCandidatesEmpty: properties: merge_candidates: description: An array of objects that represents the service accounts that the system could merge for this subaccount. items: type: object type: array type: object SubaccountMergeCandidates: properties: merge_candidates: description: An array of objects that represents the service accounts that the system could merge for this subaccount. items: allOf: - $ref: '#/components/schemas/EditUserSubaccountBase' - $ref: '#/components/schemas/SubaccountMergeCandidatesEmpty' type: array type: object SubaccountBase: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The HTTPS URL to the user's subaccount profile photo image file. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: "Whether the cPanel account user can change the subaccount's password.\n* `1` - Can change.\n* `0` - **Cannot** change.\n\n**Note:**\n\n The function returns a `0` value for subaccounts that inherit their password from the cPanel account." enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer dismissed: description: 'Whether the cPanel account user dismissed the merge prompt for the service account. * `1` - Dismissed. * `0` - Did **not** dismiss. **Note:** **Only** service accounts return this value.' enum: - 0 - 1 example: 1 type: integer domain: description: The subaccount user's associated domain. example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com format: email type: string guid: description: The subaccount unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 minimum: 1 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 minimum: 1 type: integer type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** yet exist, but the user could create as part of a merge. * `null` - **Not** a merge candidate.' example: hypothetical type: - string - 'null' phone_number: description: 'The subaccount user''s phone number. A valid phone number that conforms to [ITU-T](https://en.wikipedia.org/wiki/ITU-T)''s [E.164](https://en.wikipedia.org/wiki/E.164)-recommended standard for the representation of telephone numbers.' example: '+15551234567' type: string real_name: description: The name of the subaccount's user, if provided. example: John Doe type: string services: description: Information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: Information about the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: The maximum amount of disk space, in megabytes (MB), allocated to subaccount's email account. example: 1500 minimum: 1 type: integer type: object ftp: description: Information about the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory, relative to the cPanel account's home directory. example: /subaccount format: path type: string quota: description: 'The subaccount''s maximum FTP disk space quota, in megabytes (MB). * A string containing a non-negative float. * `0.00` - Unlimited.' example: '0.00' type: string type: object webdisk: description: Information about the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory, relative to the cPanel account's home directory. example: /bob format: path type: string perms: description: 'Whether the subaccount has read-only or read and write permissions. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' example: rw type: string private: description: 'Whether the subaccount''s Web Disk directory permissions are public or private. * `1` - Private (`0700`). * `0` - Public (`0755`).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer sub_account_exists: description: 'Whether a subaccount exists with the same username. * `1` - Exists. * `0` - Does not exist. **Note:** The function returns a null value if the account is **not** a service account.' enum: - 0 - 1 example: 0 type: - integer - 'null' synced_password: description: 'Whether the user has synchronized the passwords for each of the subaccount''s service accounts. * `1` - Synchronized. * `0` - **Not** synchronized. **Note:** The function returns a null value if the account is **not** a subaccount.' enum: - 0 - 1 example: 0 type: - integer - 'null' type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does not exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' enum: - sub - hypothetical - service - cpanel example: sub type: string username: description: The subaccount's username. example: example type: string type: object LookupServiceAccountSubaccountMergeCandidatesEmpty: properties: merge_candidates: description: An array of objects that represents the service accounts that the system could merge for this subaccount. items: type: object type: array type: object EditUserSubaccountBase: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: "Whether the cPanel account user can change the subaccount's password.\n\n* `1` - Can change.\n* `0` - **Cannot** change.\n\n**Note:**\n\n The function returns a `0` value for subaccounts that inherit their password from the cPanel account." enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer dismissed: description: "Whether the cPanel account user dismissed the merge prompt for the service account.\n\n**Note:**\n\n **Only** service accounts return this value.\n\n* `1` - Dismissed.\n* `0` - Did **not** dismiss." enum: - 0 - 1 example: 1 type: integer domain: description: 'The Subaccount user''s associated domain. A domain that the cPanel account owns.' example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com type: string guid: description: The subaccount unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_expired_invite: description: 'Whether an expired account login invitation exists. * `1` - Expired account invitation exists. * `0` - Expired account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether an account login invitation exists. * `1` - Account invitation exists. * `0` - Account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: When the invitation expires. example: 1591718154 format: unix_timestamp type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 type: integer type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** yet exist, but the user could create as part of a merge. * `null`- **Not** a merge candidate.' example: hypothetical type: string phone_number: description: 'The subaccount user''s phone number. The number conforms to the [ITU-T](https://en.wikipedia.org/wiki/ITU-T)''s [E.164](https://en.wikipedia.org/wiki/E.164)-recommended standard for the representation of telephone numbers.' example: '+15551234567' type: string real_name: description: 'The name of the subaccount''s user. * A first name, a last name, or a first name and last name. * An empty string.' example: John Doe type: string services: description: This object contains information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: This object contains the information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: "The maximum amount of disk space, in megabytes (MB), allocated to the subaccount's email account.\n\n**Note:**\n\n This function will not return `0` as a value." example: 100 type: integer type: object ftp: description: This object contains the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory. example: /subaccount format: path type: string quota: description: 'The maximum amount disk space, in megabytes (MB), that the subaccount may use. * A positive integer between `1` and `999999` * `0` - Unlimited.' example: 100 type: integer type: object webdisk: description: This object contains information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' enum: - ro - rw example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (`0700`). * `0` - Public (`0755`).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer sub_account_exists: description: "Whether a subaccount exists with the same username.\n\n* `1` - Exists.\n* `0` - Does **not** exist.\n\n**Note:**\n\n The function returns a `null` value if the account is **not** a service account." enum: - 0 - 1 example: 0 type: integer synced_password: description: "Whether the user has synchronized the passwords for each of the subaccount's service accounts.\n\n* `1` - Synchronized.\n* `0` - **Not** synchronized.\n\n**Note:**\n\n The function returns a `null` value if the account is **not** a subaccount." enum: - 0 - 1 example: 0 type: integer type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' example: sub type: string username: description: "The username for the subaccount.\n\n* Length - 64 characters.\n* Characters - `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`).\n\n**Note:**\n\n This value does **not** include the domain name." example: example type: string type: object LookupServiceAccountSubaccountBase: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: string avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: string can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - **Cannot** delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: "Whether the cPanel account user can change the subaccount's password.\n\n* `1` - Can change.\n* `0` - **Cannot** change.\n\n**Note:**\n\n The function returns a `0` value for subaccounts that inherit their password from the cPanel account." enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - **Cannot** change.' enum: - 0 - 1 example: 0 type: integer dismissed: description: "Whether the cPanel account user dismissed the merge prompt for the service account.\n\n**Note:**\n\n **Only** service accounts return this value.\n\n* `1` - Dismissed.\n* `0` - Did **not** dismiss." enum: - 0 - 1 example: 1 type: integer domain: description: 'The Subaccount user''s associated domain. A domain that the cPanel account owns.' example: example.com format: domain type: string full_username: description: The subaccount's username and domain name. example: user@example.com type: string guid: description: The subaccount unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_expired_invite: description: 'Whether an expired account login invitation exists. * `1` - Expired account invitation exists. * `0` - Expired account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether an account login invitation exists. * `1` - Account invitation exists. * `0` - Account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does **not** share.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: When the invitation expires. example: 1591718154 format: unix_timestamp type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: 'The affected service. * `email` * `ftp` * `webdisk`' enum: - email - ftp - webdisk example: email type: string type: description: 'The type of issue. * `error` * `warning` * `info`' enum: - error - warning - info example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 type: integer type: object type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** yet exist, but the user could create as part of a merge. * `null`- **Not** a merge candidate.' example: hypothetical type: string phone_number: description: 'The subaccount user''s phone number. The number conforms to the [ITU-T](https://en.wikipedia.org/wiki/ITU-T)''s [E.164](https://en.wikipedia.org/wiki/E.164)-recommended standard for the representation of telephone numbers.' example: '+15551234567' type: string real_name: description: 'The name of the subaccount''s user. * A first name, a last name, or a first name and last name. * An empty string.' example: John Doe type: string services: description: This object contains information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: This object contains the information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 1 type: integer quota: description: "The maximum amount of disk space, in megabytes (MB), allocated to the subaccount's email account.\n\n**Note:**\n\n This function will not return `0` as a value." example: 100 type: integer type: object ftp: description: This object contains the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory. example: /subaccount format: path type: string quota: description: 'The maximum amount disk space, in megabytes (MB), that the subaccount may use. * A positive integer between `1` and `999999` * `0` - Unlimited.' example: 100 type: integer type: object webdisk: description: This object contains information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' enum: - ro - rw example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (`0700`). * `0` - Public (`0755`).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.' enum: - 0 - 1 example: 1 type: integer sub_account_exists: description: "Whether a subaccount exists with the same username.\n\n* `1` - Exists.\n* `0` - Does **not** exist.\n\n**Note:**\n\n The function returns a `null` value if the account is **not** a service account." enum: - 0 - 1 example: 0 type: integer synced_password: description: "Whether the user has synchronized the passwords for each of the subaccount's service accounts.\n\n* `1` - Synchronized.\n* `0` - **Not** synchronized.\n\n**Note:**\n\n The function returns a `null` value if the account is **not** a subaccount." enum: - 0 - 1 example: 0 type: integer type: description: 'The type of account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does **not** exist, but that the user could create as part of a merge. * `service` - A service account. * `cpanel` - The cPanel account.' example: sub type: string username: description: "The username for the subaccount.\n\n* Length - 64 characters.\n* Characters - `a-z`, `A-Z`, `0-9`, dot (`.`), hyphen (`-`), underscore (`_`).\n\n**Note:**\n\n This value does **not** include the domain name." example: example type: string type: object LookupServiceAccountSubaccountMergeCandidates: properties: merge_candidates: description: An array of objects that represents the service accounts that the system could merge for this subaccount. items: allOf: - $ref: '#/components/schemas/LookupServiceAccountSubaccountBase' - $ref: '#/components/schemas/LookupServiceAccountSubaccountMergeCandidatesEmpty' type: array type: object ServiceAccount: properties: alternate_email: description: An alternate email address for the subaccount's user. example: user@example.com format: email type: - string - 'null' avatar_url: description: The user's subaccount profile photo. example: https://img.example.com/avatars/example.jpg format: url type: - string - 'null' can_delete: description: 'Whether the cPanel account user can delete the subaccount. * `1` - Can delete. * `0` - Cannot delete.' enum: - 0 - 1 example: 0 type: integer can_set_password: description: "Whether the cPanel account user can change the subaccount's password.\n* `1` - Can change.\n* `0` - Cannot change.\n\n**Note:**\n\n The function returns a `0` value for subaccounts that inherit their password from the cPanel account." enum: - 0 - 1 example: 1 type: integer can_set_quota: description: 'Whether the cPanel account user can change the subaccount''s disk usage quota. * `1` - Can change. * `0` - Cannot change.' enum: - 0 - 1 example: 0 type: integer dismissed: description: "Whether the cPanel account user dismissed the merge prompt for the service account.\n* `1` - Dismissed.\n* `0` - Did not dismiss.\n\n**Note:**\n\n Only service accounts return this value." enum: - 0 - 1 example: 1 type: integer domain: description: The subaccount user's associated domain. example: example.com format: domain type: - string - 'null' full_username: description: The subaccount's username and domain name. A valid username, the `@` character, and the associated domain. example: user@example.com type: string guid: description: The subaccount unique identifier. example: N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4 type: string has_siblings: description: 'Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does not share.' enum: - 0 - 1 example: 0 type: integer issues: description: Information about any issues or problems with the subaccount. items: properties: area: description: The affected section of cPanel & WHM. example: quota type: string limit: description: The set quota megabyte (MB) limit for the affected subaccount. example: 1500 minimum: 0 type: integer message: description: The description of the issue. example: Your account is over quota. type: string service: description: The affected service. enum: - email - ftp - webdisk example: email type: string type: description: The type of issue. enum: - error - info - warning example: info type: string used: description: The number of megabytes (MB) that the account currently uses. example: 2000 minimum: 0 type: integer type: object type: array merge_candidates: description: An array of service account objects that the system could merge for this subaccount. items: $ref: '#/components/schemas/ServiceAccount' type: array parent_type: description: 'The type of account that could own the service account. * `sub` - A subaccount. * `hypothetical` - A hypothetical subaccount that does not yet exist, but the user could create as part of a merge. * `null` - Not a merge candidate.' enum: - sub - hypothetical example: hypothetical type: - string - 'null' phone_number: description: The subaccount user's phone number. A valid phone number that conforms to [ITU-T's E.164-recommended standard](https://en.wikipedia.org/wiki/ITU-T) for the representation of telephone numbers. example: '+15551234567' type: - string - 'null' real_name: description: 'The name of the subaccount''s user. * A first name, a last name, or a first name and last name. * An empty or null string.' example: John Doe type: - string - 'null' services: description: Information about the subaccount's access to email, FTP, and Web Disk. properties: email: description: Information that indicates the subaccount's email status. properties: enabled: description: 'Whether the subaccount can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - Cannot access.' enum: - 0 - 1 example: 1 type: integer quota: description: The maximum amount of disk space allocated to subaccount's email account, in megabytes (MB). example: 100 minimum: 0 type: integer type: object ftp: description: This object contains the information that indicates the subaccount's FTP status. properties: enabled: description: 'Whether the subaccount can access FTP. * `1` - Can access. * `0` - Cannot access.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's FTP home directory, relative to the cPanel account's home directory. example: /subaccount format: path type: string quota: description: 'The subaccount''s FTP disk space quota. * `1` to `999999` - The maximum disk space that the subaccount may use, in megabytes (MB). * `0` - Unlimited.' example: 100 maximum: 999999 minimum: 0 type: integer type: object special: description: 'Whether the account is a system-created special account that the user cannot remove. * `1` - A special account. * `0` - Not a special account.' enum: - 0 - 1 example: 1 type: integer webdisk: description: This object contains information that indicates the subaccount's Web Disk status. properties: enabled: description: 'Whether the subaccount can access Web Disk. * `1` - Can access. * `0` - Cannot access.' enum: - 0 - 1 example: 0 type: integer enabledigest: description: 'Whether the subaccount''s Web Disk service has enabled Digest Authentication. * `1` - Digest Authentication is enabled. * `0` - Digest Authentication is not enabled.' enum: - 0 - 1 example: 0 type: integer homedir: description: The subaccount's Web Disk home directory, relative to the cPanel account's home directory. example: /bob format: path type: string perms: description: 'Whether to grant write permissions to the subaccount. * `ro` - Read-only permissions. * `rw` - Read and write permissions.' enum: - ro - rw example: rw type: string private: description: 'Whether to set the Web Disk directory''s permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).' enum: - 0 - 1 example: 0 type: integer type: object type: object special: description: 'Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - Not a special account.' enum: - 0 - 1 example: 0 type: integer sub_account_exists: description: "Whether a subaccount exists with the same username.\n* `1` - Exists.\n* `0` - Does not exist.\n\n**Note:**\n\n The function returns a null value if the account is not a service account." enum: - 0 - 1 example: 0 type: integer synced_password: description: "Whether the user has synchronized the passwords for each of the subaccount's service accounts.\n* `1` - Synchronized.\n* `0` - Not synchronized.\n\n**Note:**\n\n The function returns a null value if the account is not a subaccount." enum: - 0 - 1 example: 0 type: integer type: description: 'The type of account. * `cpanel` - The cPanel account. * `hypothetical` - A hypothetical subaccount that does not exist, but that the user could create as part of a merge. * `service` - A service account. * `sub` - A subaccount.' enum: - cpanel - hypothetical - service - sub example: sub type: string username: description: The username for the subaccount. example: example format: username type: string type: object CreateUserResponse: allOf: - $ref: '#/components/schemas/SubaccountBase' - properties: dismissed_merge_candidates: description: An array of objects containing service candidates that the system dismissed from merges. items: $ref: '#/components/schemas/SubaccountBase' type: array has_expired_invite: description: 'Whether an expired account login invitation exists. * `1` - Expired account invitation exists. * `0` - Expired account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer has_invite: description: 'Whether an account login invitation exists. * `1` - Account invitation exists. * `0` - Account invitation does **not** exist.' enum: - 0 - 1 example: 0 type: integer invite_expiration: description: When the invitation expires. A date in Unix time format. example: 1591718154 format: unix_timestamp type: integer merge_candidates: description: 'An array of objects that represents the service accounts that the system could merge for this subaccount.' items: $ref: '#/components/schemas/SubaccountBase' type: array type: object securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ 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