---
title: "Delete Subaccount"
method: GET
path: "/UserManager/delete_user"
tags: ["UserManager", "Subaccount Management"]
---

# Delete Subaccount

`GET /UserManager/delete_user`

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.

## Query parameters

- `domain` string, domain, required
- `username` string, required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `alternate_email` string, email — An alternate email address for the account's user.
      - `avatar_url` string, url — The user's account profile photo. The URL must point to an image file.
      - `can_delete` 0 | 1 — Whether the cPanel account user can delete the account. * `1` - Can delete. * `0` - **Cannot** delete.
      - `can_set_password` 0 | 1 — 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.
      - `can_set_quota` 0 | 1 — Whether the cPanel account user can change the account's disk usage quota. * `1` - Can change quota. * `0` - **Cannot** change quota.
      - `dismissed` 0 | 1 — 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.
      - `dismissed_merge_candidates` object[] — 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.
      - `domain` string, domain — The account user's associated domain.
      - `full_username` string — The account's username and domain name, separated by the `@` character.
      - `guid` string — The account unique identifier.
      - `has_expired_invite` 0 | 1 — Whether the Subaccount owns an expired invitation. * `1` - Owns an expired invitation. * `0` - Does **not** own an expired invitation.
      - `has_invite` 0 | 1 — Whether the Subaccount owns an active invitation. * `1` - Owns an invitation. * `0` - Does **not** own an invitation.
      - `has_siblings` 0 | 1 — Whether the service account shares a `full_username` value with another service account. * `1` - Shares. * `0` - Does not share.
      - `invite_expiration` integer, nullable — 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`.
      - `issues` object[] — Information about any issues or problems with the account.
        - `area` string — The affected section of cPanel & WHM.
        - `limit` integer — The set quota megabyte (MB) limit for the affected account.
        - `message` string — The description of the issue.
        - `service` 'email' | 'ftp' | 'webdisk' — The affected service. * `email` * `ftp` * `webdisk`
        - `type` 'error' | 'warning' | 'info' — The type of issue. * `error` * `warning` * `info`
        - `used` integer — The number of megabytes (MB) that the account currently uses.
      - `merge_candidates` object[] — The service accounts that the system could merge for this account. **Note:** You can find descriptions for this array's returns within this table.
        - `alternate_email` string
        - `avatar_url` string
        - `can_delete` integer
        - `can_set_password` integer
        - `can_set_quota` integer
        - `dismissed` integer
        - `dismissed_merge_candidates` string[]
        - `domain` string, domain
        - `full_username` string
        - `guid` string
        - `has_expired_invite` integer
        - `has_invite` integer
        - `has_siblings` integer
        - `invite_expiration` integer
        - `issues` string[]
        - `merge_candidates` string[]
        - `parent_type` string
        - `phone_number` string
        - `real_name` string
        - `services` object
        - `special` integer
        - `sub_account_exists` integer
        - `synced_password` integer
        - `type` string
        - `username` string, username
      - `parent_type` 'sub' | 'hypothetical', nullable — 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.
      - `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.
      - `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.
      - `services` object — Information about the account's access to email, FTP, and Web Disk.
        - `email` object — Information that indicates the account's email status.
          - `enabled` 1 | 0 — Whether the account can access Webmail, POP, and IMAP services. * `1` - Can access. * `0` - **Cannot** access.
          - `quota` integer — The account's email disk space quota. * The set quota megabyte (MB) limit for the account's email disk space. * `0` - Unlimited.
        - `ftp` object — Information about the account's FTP status.
          - `enabled` 1 | 0 — Whether the account can access FTP. * `1` - Can access. * `0` - **Cannot** access.
          - `homedir` string, path — The account's FTP home directory. * A valid path, relative to the cPanel account's home directory.
          - `quota` integer — The account's FTP disk space quota. * An integer that represents the account's maximum FTP disk usage, in megabytes (MB). * `0` - Unlimited.
        - `webdisk` object — Information about the account's Web Disk status.
          - `enabled` 1 | 0 — Whether the account can access Web Disk. * `1` - Can access. * `0` - **Cannot** access.
          - `homedir` string, path — The account's Web Disk directory. * A valid path, relative to the cPanel account's home directory.
          - `perms` string — Whether to grant write permissions to the account. * `ro` - Read-only permissions. * `rw` - Read and write permissions.
          - `private` 1 | 0 — Whether to set the Web Disk directory's permissions to public or private. * `1` - Private (0700). * `0` - Public (0755).
      - `special` 1 | 0 — Whether the account is a system-created special account that the user **cannot** remove. * `1` - A special account. * `0` - **Not** a special account.
      - `sub_account_exists` 1 | 0, nullable — Whether an account exists with the same username. * `1` - Exists. * `0` - Does not exist. * `null` - The account is **not** a service account.
      - `synced_password` 1 | 0, nullable — 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
      - `type` 'hypothetical' | 'service' — 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.
      - `username` string, username — 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.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` - Success * `0` - Failed: Check the errors field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
