> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: ffc5e1a2-3332-43d6-9714-9d270595e356
---

# CMS API | Domain management

> Retrieve domains and their associated details from a HubSpot account.

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList
    scopes={[
  'cms.domains.read',
  'cms.domains.write',
  'cms.knowledge_base.settings.read',
  'cms.knowledge_base.settings.write',
  'content'
]}
  />
</Accordion>

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](https://knowledge.hubspot.com/reports/set-up-sources-tracking).

## Retrieve domains

To retrieve all domains, make a `GET` request to `/cms/domains/2026-03`.

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:

```shell wrap theme={null}
curl https://api.hubapi.com/cms/domains/2026-03?createdAfter=2024-01-01T00:00:00Z&limit=10 \
  --request GET \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

The following query parameters are available:

| Parameter       | Type    | Description                                                                                             |
| --------------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `after`         | String  | Cursor token to get the next set of results. Available from `paging.next.after` in paginated responses. |
| `archived`      | Boolean | Filter by whether the domain is archived.                                                               |
| `createdAfter`  | String  | Filter for domains created after a given date (ISO 8601 format).                                        |
| `createdAt`     | String  | Filter for domains created at a given date (ISO 8601 format).                                           |
| `createdBefore` | String  | Filter for domains created before a given date (ISO 8601 format).                                       |
| `limit`         | Integer | Maximum number of domains to return.                                                                    |
| `sort`          | Array   | List of fields to sort by.                                                                              |
| `updatedAfter`  | String  | Filter for domains updated after a given date (ISO 8601 format).                                        |
| `updatedAt`     | String  | Filter for domains updated at a given date (ISO 8601 format).                                           |
| `updatedBefore` | String  | Filter for domains updated before a given date (ISO 8601 format).                                       |

A `200` response will return a JSON object with details for each connected domain.

```json theme={null}
{
  "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/domains/2026-03/{domainId}`.

For example, the request below would retrieve the details for the domain with ID `3210329704`:

```shell wrap theme={null}
curl https://api.hubapi.com/cms/domains/2026-03/3210329704 \
  --request GET \
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

A `200` response will return a JSON object with details for the specified domain.

```json theme={null}
{
  "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": ""
}
```
