# Convert a temporary domain to a registered domain

This function converts a temporary domain into a registered domain and moves its document root files
to the new document root location.

Note:

* For more information about temporary domains, read our Temporary Domains documentation.
* You cannot use this function to convert a cPanel account's main domain.

Endpoint: POST /Domain/convert_temporary_to_registered
Version: 11.136.0.4
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    A valid temporary domain on the account.
    Example: "wonderful-fushsia-owl.10-20-30-40.cpanel.site"

  - `registered` (string, required)
    A valid domain name.
    Example: "example.com"

  - `docroot` (string)
    The path to the domain's document root directory. If you do not specify a
value, this parameter defaults to the domain's name.

Note:

The function will create a symlink in place of the previous temporary domain's
document root directory. The symlink will point to the registered domain's
document root.
    Example: "example.com"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "convert_temporary_to_registered"

  - `module` (string)
    The name of the module called.
    Example: "Domain"

  - `result` (object)

  - `result.data` (object)

  - `result.data.message` (string)
    A message describing the result of the conversion.
    Example: "Domain wonderful-fushsia-owl.10-20-30-40.cpanel.site successfully converted to example.com"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed: Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API.


