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.
Example response
{
"apiversion": 3,
"func": "primary_domain",
"module": "DomainInfo",
"result": {
"data": {
"primary_domain": "example.com"
},
"metadata": {
"transformed": 1
},
"status": 1
}
}