How to Manage Company in HubSpot API?
HubSpot CRM manage sales processes of organizations. We can create contacts, company, leads, tasks using direct HubSpot CRM UI or using APIs provided by HubSpot. Here we are going to look at the APIs to create, update and delete companies.
Create a Company
This API is useful when we are integrating HubSpot with other site.
https://api.hubapi.com/companies/v2/companies?hapikey=demo&portalId=62515
Required Parameters to send Request
- HubSpot OAuth Access Token or API Key
- Company JSON : It represents the company that you are creating. This should be in the proper JSON format.
If request is successful, you will get a 200 with an object of created company, which contains the company Id that is important for further process.
Update a Company
We can update a company using company Id. Example URL:
https://api.hubapi.com/companies/v2/companies/10444744?hapikey=demo&portalId=62515
- HubSpot OAuth Access Token or API Key
- Company : Send along with the URL.
- Company JSON : This JSON represents the changes that you are making to the specified company.
Delete a Company
Deletes the existing company using its company id. The response shows whether the company is deleted or not. Deletes the existing deal using dealId. Return JSON deal which shows, it is deleted or not. Example URL:
https://api.hubapi.com/companies/v2/companies/10444744?hapikey=demo&portalId=62515
For any further assistance, do reach out us. If you want any Drupal solutions or Drupal assistance, do checkout our services.