There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Get a company by ID

Last updated May 12, 2023

GET /companies/v2/companies/:companyId

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

crm.objects.companies.read

This endpoint is used to get data about a company in HubSpot, specified by its companyId.

Use cases for this endpoint: You can also use this API for syncing any changes made to a particular company in HubSpot to the corresponding record in an Account-Based Marketing (ABM) system. It can also be used to look up specific attributes of a company.

Response details

  • If the request is successful, returns a 200 response with an object representing the specified company.
  • Returns a 404 error if there is no company record for the specified ID.
Required parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
Company Id Used in the request URL (see above) Unique identifier for a particular company.

Optional parameters How to use Description
Include Merge Audits &includeMergeAudits=true
Used in the request URL
Returns any merge history if the company has been previously merged with another company record. Defaults to false.
Include Property Versions &includePropertyVersions=true
Used in the request URL
Returns the previous versions for all properties of the requested company. Defaults to false.