APIs & Integrations

hkampen
Contributor

Where is the country code of phone numbers in the API?

SOLVE

Hi,

the API privides me an incomplete phone number when the usage of country code as additional dropdown is activated.

 

hkampen_0-1722591819312.png

 

The response of phone ist 1769999999 without country code and the whitespace between area code and dialling is also missing.

 

When I update this number, the country code get lost.

 

Regards
Harald

 

 

0 Upvotes
1 Accepted solution
hkampen
Solution
Contributor

Where is the country code of phone numbers in the API?

SOLVE

Hello @KhushbooRevOps,

thank you for your fast reply. Inbetween I found out that I can read the full number from hs_calculated_phone_number / hs_calculated_mobile_number.

 

When I update or create a phone number, I have it then with country code, but as part of the string and not as dropdown. A separated country code select whon't solve it. In addition, it would not be part of the hs_calculated numbers and the click for a phone call wouldn't work.

 

As current state, I accept the solution. I hope my collueges also do 🙂

View solution in original post

0 Upvotes
2 Replies 2
KhushbooRevOps
Member

Where is the country code of phone numbers in the API?

SOLVE

Hi @hkampen, (Harald),

I understand your concern. Here's how you can resolve this issue:

1. First, ensure that the country code is connected with the phone number before submitting it through your forms.

2. Check your form settings and API request payload to confirm they include the full phone number with the country code and correct formatting.

3. If needed, create a custom field in HubSpot to store phone numbers with the country code.

I hope this helps, if you need some help, let's talk!

0 Upvotes
hkampen
Solution
Contributor

Where is the country code of phone numbers in the API?

SOLVE

Hello @KhushbooRevOps,

thank you for your fast reply. Inbetween I found out that I can read the full number from hs_calculated_phone_number / hs_calculated_mobile_number.

 

When I update or create a phone number, I have it then with country code, but as part of the string and not as dropdown. A separated country code select whon't solve it. In addition, it would not be part of the hs_calculated numbers and the click for a phone call wouldn't work.

 

As current state, I accept the solution. I hope my collueges also do 🙂

0 Upvotes