v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
DomainInfo
Domain Information

Return the cPanel account's primary domain

This function returns the cPanel account's main domain.

get/DomainInfo/primary_domain

Query parameters

hide_temporary_domains1 | 0
Example:1

Whether to hide temporary domains from the response.

  • 1 — Return null if the main domain is a temporary domain.
  • 0 — Return the main domain if it's a temporary domain.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "primary_domain",
  "module": "DomainInfo",
  "result": {
    "data": {
      "primary_domain": "example.com"
    },
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}