APIs & Integrations

YTamam
Member

how to get company by company name or email

SOLVE

i need API to get company by name and/or email.

not with ID

0 Upvotes
1 Accepted solution
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

how to get company by company name or email

SOLVE

Hi @YTamam 

 

You should be able to use the companies search API endpoint to find a company record based on company name, something like this:

https://api.hubapi.com/companies/v2/domains/{{COMPANY_DOMAIN}}/companies/search?name={{COMPANY_NAME}}&hapikey={{API_KEY}} 

Companies dont have an email address as a norm, so to find a company based on a contact's email address would probably require a multi-step approach:

  • Search contact based on email address
  • Get name of primary associated company
  • Search company based on name

Hope this helps?

Phil Vallender | HubSpot Website Agency

View solution in original post

1 Reply 1
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

how to get company by company name or email

SOLVE

Hi @YTamam 

 

You should be able to use the companies search API endpoint to find a company record based on company name, something like this:

https://api.hubapi.com/companies/v2/domains/{{COMPANY_DOMAIN}}/companies/search?name={{COMPANY_NAME}}&hapikey={{API_KEY}} 

Companies dont have an email address as a norm, so to find a company based on a contact's email address would probably require a multi-step approach:

  • Search contact based on email address
  • Get name of primary associated company
  • Search company based on name

Hope this helps?

Phil Vallender | HubSpot Website Agency