Listing Domain Names

Retrieve a list of your domain names by making a GET request to the domain list endpoint.

Sample Request

Replace API_KEY with your unique API key. You can find your API key on the settings page of your dashboard. Optionally, you can include a page parameter to paginate through the list of domain names.

curl -XGET -H "Content-type: application/json" \
'https://www.brandssl.io/api/{API_KEY}/domain/list?page=1'

Parameters

page (optional): The page number of the domain list you wish to retrieve. Defaults to the first page if not specified.


Successful Response

If the request is successful, you will receive an HTTP status 200 response, along with a JSON payload containing the list of domains, the current page, total pages, and total domain count.


Sample response

{
  "domains": [
    {
      "id": 1,
      "name": "www.example.com",
      "dns_status": "CONNECTED",
      "status": "ENABLED"
    },
    {
      "id": 2,
      "name": "www.example.net",
      "dns_status": "DISCONNECTED",
      "status": "DISABLED"
    }
  ],
  "page": 1,
  "total_pages": 5,
  "total_domains": 2500
}

Ensure your requests are correctly formatted and include a valid API key to successfully retrieve your domains list.


Filtering Domain Lists

The domain list endpoint supports filtering by DNS status and the operational status (enabled or disabled) of the domains. You can apply these filters by including dns_status and/or status parameters in your query string.

Parameters

  • dns_status (optional): Allows filtering the domains based on their DNS status. Acceptable values are (CONNECTED, DISCONNECTED, PENDING).
  • status (optional): Filters the domains based on their operational status. Acceptable values are ENABLED for active domains and DISABLED for domains that have been disabled.

curl -XGET -H "Content-type: application/json" \
'https://www.brandssl.io/api/{API_KEY}/domain/list?dns_status=CONNECTED'

To filter domains by operational status:

curl -XGET -H "Content-type: application/json" \
'https://www.brandssl.io/api/{API_KEY}/domain/list?status=ENABLED'

To combine both filters:

curl -XGET -H "Content-type: application/json" \
'https://www.brandssl.io/api/{API_KEY}/domain/list?dns_status=CONNECTED&status=ENABLED'