# Return a domain's document root

This function retrieves the document root for a single domain on the
cPanel account.

Note:

If the domain does not exist on the account, the system returns the
account's public_html directory rather than an error.

Endpoint: GET /DomainLookup/getdocroot
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `domain` (string)
    The domain to look up. The system converts this value to lowercase.

Omit this parameter to retrieve the document root for the account's primary domain.
    Example: "example.com"

## Response 200 fields (application/json):

  - `data` (array)
    A single entry for the requested domain.

  - `data.docroot` (string)
    The absolute path to the domain's document root.
    Example: "/home/username/public_html"

  - `data.reldocroot` (string)
    The domain's document root, relative to the account's home directory.
    Example: "public_html"

  - `errors` (array,null)

  - `messages` (array,null)

  - `metadata` (object)

  - `metadata.transformed` (integer)

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

  - `warnings` (array,null)


