# Create subdomain This function creates a subdomain. When you disable the Web Server role, the system this function. Endpoint: GET /SubDomain/addsubdomain Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domain` (string, required) The subdomain name to create. Example: "subdomain" - `rootdomain` (string, required) The domain on which to create the new subdomain. The domain already exist on the cPanel account. Example: "example.com" - `canoff` (integer) Whether to use a canonical name (CNAME) in the ApacheĀ® configuration for self-referential URLs. * - Use the CNAME. * - Do use the CNAME. Enum: 0, 1 - `dir` (string) The subdomain's document within the home directory, given as a valid directory path relative to the user's home directory. This value defaults to the user's home directory path. If the value is set to in WHM's interface (), this parameter defaults to the path. For example, the user's subdomain would default to the path. Example: "/public_html/directory_name" - `disallowdot` (integer) Whether to remove the dot () characters from the value. * - Remove dots from the domain. * - Do remove dots from the domain. Enum: 0, 1 ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "addsubdomain" - `module` (string) The name of the module called. Example: "SubDomain" - `result` (object) - `result.data` (object,null) - `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.