Skip to main content

Run in Postman

Use the domains API to retrieve information about the domains connected to a HubSpot account. You can return data for a list of domains or specify a domain by ID. Learn more about setting up domains for your site.

Retrieve domains

To retrieve all domains, make a GET request to /cms/v3/domains. You can filter and sort the returned domains using query parameters. For example, the following request would retrieve the first 10 domains created after January 1, 2024:
curl https://api.hubapi.com/cms/v3/domains?createdAfter=2024-01-01T00:00:00Z&limit=10 \
  --request GET \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN"
The following query parameters are available:
ParameterTypeDescription
afterStringCursor token to get the next set of results. Available from paging.next.after in paginated responses.
archivedBooleanFilter by whether the domain is archived.
createdAfterStringFilter for domains created after a given date (ISO 8601 format).
createdAtStringFilter for domains created at a given date (ISO 8601 format).
createdBeforeStringFilter for domains created before a given date (ISO 8601 format).
limitIntegerMaximum number of domains to return.
sortArrayList of fields to sort by.
updatedAfterStringFilter for domains updated after a given date (ISO 8601 format).
updatedAtStringFilter for domains updated at a given date (ISO 8601 format).
updatedBeforeStringFilter for domains updated before a given date (ISO 8601 format).
A 200 response will return a JSON object with details for each connected domain.
{
  "total": 1,
  "results": [
    {
      "id": "1234",
      "createdAt": "2017-07-24T17:24:09.141Z",
      "updatedAt": "2017-07-25T18:20:00.000Z",
      "domain": "234.hs-sites.com",
      "isPrimaryBlogPost": true,
      "isPrimarySitePage": false,
      "isPrimaryLandingPage": false,
      "isPrimaryEmail": false,
      "isPrimaryKnowledge": false,
      "isResolving": true,
      "isManuallyMarkedAsResolving": false,
      "isHttpsEnabled": true,
      "isHttpsOnly": false,
      "isUsedForBlogPost": true,
      "isUsedForSitePage": false,
      "isUsedForLandingPage": false,
      "isUsedForEmail": false,
      "isUsedForKnowledge": false,
      "expectedCname": "234.group34.sites.hubspot.net",
      "redirectTo": ""
    }
  ]
}

Retrieve a single domain

To retrieve details for a specific domain, make a GET request to /cms/v3/domains/{domainId}. For example, the request below would retrieve the details for the domain with ID 3210329704:
curl https://api.hubapi.com/cms/v3/domains/3210329704 \
  --request GET \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN"
A 200 response will return a JSON object with details for the specified domain.
{
  "id": "3210329704",
  "createdAt": "2017-07-11T13:00:52.928Z",
  "updatedAt": "2019-10-08T16:54:57.165Z",
  "domain": "8675309.hubspot.com",
  "isPrimaryBlogPost": true,
  "isPrimarySitePage": false,
  "isPrimaryLandingPage": false,
  "isPrimaryEmail": false,
  "isPrimaryKnowledge": false,
  "isResolving": true,
  "isManuallyMarkedAsResolving": false,
  "isHttpsEnabled": true,
  "isHttpsOnly": false,
  "isUsedForBlogPost": true,
  "isUsedForSitePage": false,
  "isUsedForLandingPage": false,
  "isUsedForEmail": false,
  "isUsedForKnowledge": false,
  "expectedCname": "8675309.group39.sites.hubspot.net",
  "redirectTo": ""
}
Last modified on December 12, 2025