Last modified: September 3, 2025
Run in Postman
Create companies
To create new companies, make aPOST
request to /crm/v3/objects/companies
.
In your request, include your company data in a properties object. You can also add an associations object to associate your new company with existing records (e.g., contacts, deals), or activities (e.g., meetings, notes).
Properties
Company details are stored in company properties. There are default HubSpot company properties, but you can also create custom properties. When creating a new company, you should include at least one of the following properties in your request:name
or domain
. It is recommended to always include domain
, because domain names are the primary unique identifier to avoid duplicate companies in HubSpot. If a company has multiple domains, you can add them through the API by using the hs_additional_domains
field with semicolons separating each domain. For example: "hs_additional_domains" : "domain.com; domain2.com; domain3.com"
.
To view all available properties, you can retrieve a list of your account’s company properties by making a GET
request to /crm/v3/properties/companies
. Learn more about the the properties API.
Please note:If you’ve included
lifecyclestage
in your request, values must refer to the lifecycle stage’s internal name. The internal names of default stages are text values, and do not change even if you edit the stage’s label(e.g., subscriber
or marketingqualifiedlead
). The internal names of custom stages are numeric values. You can find a stage’s internal ID in your lifecycle stage settings, or by retrieving the lifecycle stage property via API.Associations
When creating a new company, you can also associate the company with existing records or activities in an associations object. For example, to associate a new company with an existing contact and email, your request would look like the following:Parameter | Description |
---|---|
to | The record or activity you want to associate with the company, specified by its unique id value. |
types | The type of the association between the company and the record/activity. Include the associationCategory and associationTypeId . Default association type IDs are listed here, or you can retrieve the value for custom association types (i.e. labels) via the associations API. |
Retrieve companies
You can retrieve companies individually or in batches.- To retrieve an individual company, make a
GET
request to/crm/v3/objects/companies/{companyId}
. - To request a list of all companies, make a
GET
request to/crm/v3/objects/companies
.
Parameter | Description |
---|---|
properties | A comma separated list of the properties to be returned in the response. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a company doesn’t have a value, it will be returned as null . |
propertiesWithHistory | A comma separated list of the current and historical properties to be returned in the response. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a company doesn’t have a value, it will be returned as null . |
associations | A comma separated list of objects to retrieve associated IDs for. Any specified associations that don’t exist will not be returned in the response. Learn more about the associations API. |
- To retrieve a batch of specific companies by record ID or a custom unique identifier property, make a
POST
request tocrm/v3/objects/companies/batch/read
. The batch endpoint cannot retrieve associations. Learn how to batch read associations with the associations API.
idProperty
parameter to retrieve companies by a custom unique identifier property. By default, the id
values in the request refer to the record ID (hs_object_id
), so the idProperty
parameter is not required when retrieving by record ID. To use a custom unique value property to retrieve companies, you must include the idProperty
parameter.
For example, to retrieve a batch of companies, your request could look like either of the following:
Update companies
You can update companies individually or in batches. For existing companies, the company’s record ID is a unique value that you can use to update the company via API. To update an individual company by its company ID, make aPATCH
request to /crm/v3/objects/companies/{companyId}
, and include the data you want to update.
Please note:If updating the
lifecyclestage
property, you can only set the value forward in the stage order. To set the lifecycle stage backward, you’ll first need to clear the record’s existing lifecycle stage value. The value can be cleared manually, or may be automatically cleared via a workflow or an integration that syncs contact data.Associate existing companies with records and activities
To associate a company with other CRM records or an activity, make aPUT
request to /crm/v3/objects/companies/{companyId}/associations/{toObjectType}/{toObjectId}/{associationTypeId}
.
To retrieve the
associationTypeId
value, refer to this list of default values, or make a GET
request to /crm/v4/associations/{fromObjectType}/{toObjectType}/labels
.Remove an association
To remove an association between a company and a record or activity, make aDELETE
request to the following URL: /crm/v3/objects/companies/{companyId}/associations/{toObjectType}/{toObjectId}/{associationTypeId}
.
Pin an activity on a company record
You can pin an activity on a company record via API by including thehs_pinned_engagement_id
field in your request. In the field, include the id
of the activity to pin, which can be retrieved via the engagements APIs. You can pin one activity per record, and the activity must already be associated with the company prior to pinning.
To set or update a company’s pinned activity, your request could look like:
Delete companies
You can delete companies individually or in batches, which will add the company to the recycling bin in HubSpot. You can later restore the company within HubSpot. To delete an individual company by its ID, make aDELETE
request to /crm/v3/objects/companies/{companyId}
.
Learn more about batch deleting companies in the reference documentation.