# Delete Subaccount 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. * 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 match any service accounts or hypothetical Subaccounts. Endpoint: GET /UserManager/delete_user Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domain` (string, required) The Subaccount's associated domain. The domain be one that the cPanel account owns. Example: "example.com" - `username` (string, required) The Subaccount's username. * Characters — , , , dot (), hyphen (), underscore () This value does include the domain name. Example: "example" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "delete_user" - `module` (string) The name of the module called. Example: "UserManager" - `result` (object) - `result.data` (object) - `result.data.alternate_email` (string) An alternate email address for the account's user. Example: "user@example.com" - `result.data.avatar_url` (string) The user's account profile photo. The URL must point to an image file. Example: "https://img.example.com/avatars/example.jpg" - `result.data.can_delete` (integer) Whether the cPanel account user can delete the account. * - Can delete. * - delete. Enum: 0, 1 - `result.data.can_set_password` (integer) Whether the cPanel account user can change the account's password. * - Can change password. * - change password. The function returns for accounts that inherit their password from the cPanel account. Enum: 0, 1 - `result.data.can_set_quota` (integer) Whether the cPanel account user can change the account's disk usage quota. * - Can change quota. * - change quota. Enum: 0, 1 - `result.data.dismissed` (integer) Whether the cPanel account user dismissed the merge prompt for the service account. * - Dismissed prompt. * - Did dismiss prompt. service accounts return this value. Enum: 0, 1 - `result.data.dismissed_merge_candidates` (array) An array of objects that represent the service accounts that the user dismissed the merge prompt for. This array will always return empty. We reserved this return for future use. - `result.data.domain` (string) The account user's associated domain. Example: "example.com" - `result.data.full_username` (string) The account's username and domain name, separated by the character. Example: "user@example.com" - `result.data.guid` (string) The account unique identifier. Example: "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4" - `result.data.has_expired_invite` (integer) Whether the Subaccount owns an expired invitation. * - Owns an expired invitation. * - Does own an expired invitation. Enum: 0, 1 - `result.data.has_invite` (integer) Whether the Subaccount owns an active invitation. * - Owns an invitation. * - Does own an invitation. Enum: 0, 1 - `result.data.has_siblings` (integer) Whether the service account shares a value with another service account. * - Shares. * - Does not share. Enum: 0, 1 - `result.data.invite_expiration` (integer,null) 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 . Example: 1466258282 - `result.data.issues` (array) Information about any issues or problems with the account. - `result.data.issues.area` (string) The affected section of cPanel & WHM. Example: "quota" - `result.data.issues.limit` (integer) The set quota megabyte (MB) limit for the affected account. Example: 1500 - `result.data.issues.message` (string) The description of the issue. Example: "Your account is over quota." - `result.data.issues.service` (string) The affected service. * * * Enum: "email", "ftp", "webdisk" - `result.data.issues.type` (string) The type of issue. * * * Enum: "error", "warning", "info" - `result.data.issues.used` (integer) The number of megabytes (MB) that the account currently uses. Example: 2000 - `result.data.merge_candidates` (array) The service accounts that the system could merge for this account. You can find descriptions for this array's returns within this table. - `result.data.merge_candidates.alternate_email` (string) - `result.data.merge_candidates.avatar_url` (string) - `result.data.merge_candidates.can_delete` (integer) - `result.data.merge_candidates.can_set_password` (integer) - `result.data.merge_candidates.can_set_quota` (integer) - `result.data.merge_candidates.dismissed` (integer) - `result.data.merge_candidates.dismissed_merge_candidates` (array) - `result.data.merge_candidates.domain` (string) - `result.data.merge_candidates.full_username` (string) - `result.data.merge_candidates.guid` (string) - `result.data.merge_candidates.has_expired_invite` (integer) - `result.data.merge_candidates.has_invite` (integer) - `result.data.merge_candidates.has_siblings` (integer) - `result.data.merge_candidates.invite_expiration` (integer) - `result.data.merge_candidates.issues` (array) - `result.data.merge_candidates.merge_candidates` (array) - `result.data.merge_candidates.parent_type` (string) - `result.data.merge_candidates.phone_number` (string) - `result.data.merge_candidates.real_name` (string) - `result.data.merge_candidates.services` (object) - `result.data.merge_candidates.special` (integer) - `result.data.merge_candidates.sub_account_exists` (integer) - `result.data.merge_candidates.synced_password` (integer) - `result.data.merge_candidates.type` (string) - `result.data.merge_candidates.username` (string) - `result.data.parent_type` (string,null) The type of account that could own the service account. * - An account. * - A hypothetical account does yet exist, but that the user could create as part of a merge. * - a merge candidate. Enum: "sub", "hypothetical" - `result.data.phone_number` (string) 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" - `result.data.real_name` (string) 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" - `result.data.services` (object) Information about the account's access to email, FTP, and Web Disk. - `result.data.services.email` (object) Information that indicates the account's email status. - `result.data.services.email.enabled` (integer) Whether the account can access Webmail, POP, and IMAP services. * - Can access. * - access. Enum: 1, 0 - `result.data.services.email.quota` (integer) The account's email disk space quota. * The set quota megabyte (MB) limit for the account's email disk space. * - Unlimited. Example: 100 - `result.data.services.ftp` (object) Information about the account's FTP status. - `result.data.services.ftp.enabled` (integer) Whether the account can access FTP. * - Can access. * - access. Enum: 1, 0 - `result.data.services.ftp.homedir` (string) The account's FTP home directory. * A valid path, relative to the cPanel account's home directory. Example: "/account" - `result.data.services.ftp.quota` (integer) The account's FTP disk space quota. * An integer that represents the account's maximum FTP disk usage, in megabytes (MB). * - Unlimited. Example: 100 - `result.data.services.webdisk` (object) Information about the account's Web Disk status. - `result.data.services.webdisk.enabled` (integer) Whether the account can access Web Disk. * - Can access. * - access. Enum: 1, 0 - `result.data.services.webdisk.homedir` (string) The account's Web Disk directory. * A valid path, relative to the cPanel account's home directory. Example: "/bob" - `result.data.services.webdisk.perms` (string) Whether to grant write permissions to the account. * - Read-only permissions. * - Read and write permissions. Example: "rw" - `result.data.services.webdisk.private` (integer) Whether to set the Web Disk directory's permissions to public or private. * - Private (0700). * - Public (0755). Enum: 1, 0 - `result.data.special` (integer) Whether the account is a system-created special account that the user remove. * - A special account. * - a special account. Enum: 1, 0 - `result.data.sub_account_exists` (integer,null) Whether an account exists with the same username. * - Exists. * - Does not exist. * - The account is a service account. Enum: 1, 0 - `result.data.synced_password` (integer,null) Whether the user has synchronized the passwords for each of the account's service accounts. * - Synchronized. * - synchronized. * - The account is a Subaccount Enum: 1, 0 - `result.data.type` (string) The type of account. * - A hypothetical account that does not exist, but that the user could create as part of a merge. * - A service account. Enum: "hypothetical", "service" - `result.data.username` (string) The account username. The username must meet the account name limitations. * Characters - , , , dot (), hyphen (), underscore () This value does include the domain name. - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * - Success * - Failed: Check the errors field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.