Is it possible to get company phone from GET /contacts/v1/lists/all/contacts/all


#1

Hi hubspot,

I tried property=companyphone with GET /contacts/v1/lists/all/contacts/all with no luck, just want to confirm if it is available for the GET /contacts/v1/lists/all/contacts/all api.

Thank you.


#3

Hi @zxdong262,

There isn't a default contact property with the internal name companyphone, but if you have a custom contact property with that name, you should be able to pull it. Can you share a link to the property in your property settings?


#4

Thank you, Isaac,

I mentioned this because in contact call page, I can select company phone even I did not set company phone. I noticed there is a api to get all phone numbers (/twilio/v1/phonenumberinfo/contactPhoneNumbersByProperty), if the conacts api can provide company phone like this, it would be consistant in some cases.


#5

Hi @zxdong262,

Thank you for clarifying. While the company phone can be called from a contact record, the data does not live on the contact object by default unless you have created a custom companyphone property. If this is your situation, please send me a link to the companyphone property in your HubSpot account.

If you are not referring to a custom contact property, the company phone number must be pulled through the Companies API. For example:

https://api.hubapi.com/companies/v2/companies/paged?properties=companyphone

(Please note that you have to use properties for the Companies API, unlike using property for the Contacts API.)