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.
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:
Report incorrect code
Copy
Ask AI
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:
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.
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:
Report incorrect code
Copy
Ask AI
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.