APIs & Integrations

Dadams
HubSpot Employee
HubSpot Employee

Sunset: The Companies API endpoint GET /companies/v2/companies/domain/:domain is being deprecated

Update: This sunset is now scheduled for June 12. See this post for details.

 

What's happening?

A previously deprecated endpoint for the Companies API that searches for company records by domain name is being sunset. The path of this endpoint is:

GET /companies/v2/companies/domain/:domain

 

This endpoint returns an unlimited number of company records that match the specified domain. For companies associated with email provider domains (such as gmail.com or outlook.com) this could result in a large number of matches, leading to large response sizes that can lead to request timeouts.

 

This endpoint has been deprecated and replaced with the newer endpoint documented here: https://developers.hubspot.com/docs/methods/companies/search_companies_by_domain

 

What's changing?

The newer endpoint returns much of the same data as the deprecated endpoint, but in a different format. The data for individual records is identical between the two endpoints, but the new endpoint wraps the records in a "results" field. The new endpoint also returns the additional "hasMore" and "offset" fields used to page through the results. Up to 100 records can be returned for a single request, so you will need to page through the results if there are more than 100 companies matching the specified domain.

 

The usage of the endpoint is also different, as it uses a POST request instead of a GET. The domain that is searched for is still included in the URL as a path parameter, while the request body is used to set the maximum number of results that will be returned (using the "limit" field) and the offset used to page through the results. The request body is also used to set which company properties will be included for the returned records, as only the specified properties will be included in the response.

 

Please see the documentation for the endpoint for more details.

 

When is this happening?

The GET /companies/v2/companies/domain/:domain endpoint will be sunset on June 12, 2020

 

Please let us know if you have any questions by replying below.

 

Note: This sunset was originally scheduled for April 30.

1 Reply 1
Dadams
HubSpot Employee
HubSpot Employee

Sunset: The Companies API endpoint GET /companies/v2/companies/domain/:domain is being deprecated

Update: This sunset is now scheduled for June 12. The original post has been updated to include the new date.

 

Please let us know if you have any questions by replying below.

0 Upvotes