I would like to get nice formatted phone numbers via HubSpot API.
My goal is to update the phone numbers in an external system. All phone numbers should look like the phone numbers in the HubSpot User Interface. I know the phone numers has different formats for the different countriers.
For example:
If the user enters '+41613456789' HubSpot shows '+41 61 345 67 89' (added some spaces).
If the user saves the number with spaces, HubSpot saves the spaces. If it is an US phone number, some other characters are added for the UI.
If I use the phone number validation in the property definition or as part of a workflow, the phone numer is stored without spaces or other special characters.
Is there a posibility to get the nice formatted phone numbers via API to show the phone numer in an external system?
there’s no API that returns the same “pretty” UI formatting. HubSpot stores the raw string you saved, and the UI applies presentation formatting on the fly. So the CRM API will give you what’s in the property, not the spaced version you see in-app.
Practical workaround inside HubSpot: use the new “Validate and format phone number” workflow action to normalize numbers, then write the formatted output back into a dedicated custom property like phone_formatted.
Your external system can read that property via API. HubSpot’s guide walks the steps and notes you must add a follow-up “Edit record” action to persist the parsed output
Pair this with property validation so future entries arrive consistent. Turn on phone number validation and set a default country code if needed. This reduces messy inputs and keeps the formatted output stable for export
If you prefer to keep storage in E.164 and only render “nice” strings downstream, format at the edge. Many teams read phone or mobilephone via the API, run libphonenumber in their service, and display locale-aware spacing in the external app. HubSpot’s property rules article explains where automatic formatting applies vs stored values, so you don’t rely on the UI’s spacing
Edge cases to mind: extensions, multiple numbers per record, and inconsistent country codes. Decide one canonical store (usually E.164) and keep a separate display property if your users must see local spacing. I’m inferring you’re on Enterprise with Workflows, correct me if not.
When teams sync CRMs and ops tools, they often keep both a canonical E.164 and a display-formatted field in the sync. A platform like Stacksync can keep those two properties in real time across systems so dialers get clean numbers while UIs stay human-friendly.
Hope this helps.
Did my answer help? Please mark it as a solution to help others find it too.
Ruben Burdin HubSpot Advisor Founder @ Stacksync Real-Time Data Sync between any CRM and Database
@baernhardj, I'd recommend that you share this feedback via the HubSpot Developer feedback form, so that it gets routed to the right Product Team and will get more visibility.
Thanks for your valuable feedback and have a lovely day!
Bérangère
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
there’s no API that returns the same “pretty” UI formatting. HubSpot stores the raw string you saved, and the UI applies presentation formatting on the fly. So the CRM API will give you what’s in the property, not the spaced version you see in-app.
Practical workaround inside HubSpot: use the new “Validate and format phone number” workflow action to normalize numbers, then write the formatted output back into a dedicated custom property like phone_formatted.
Your external system can read that property via API. HubSpot’s guide walks the steps and notes you must add a follow-up “Edit record” action to persist the parsed output
Pair this with property validation so future entries arrive consistent. Turn on phone number validation and set a default country code if needed. This reduces messy inputs and keeps the formatted output stable for export
If you prefer to keep storage in E.164 and only render “nice” strings downstream, format at the edge. Many teams read phone or mobilephone via the API, run libphonenumber in their service, and display locale-aware spacing in the external app. HubSpot’s property rules article explains where automatic formatting applies vs stored values, so you don’t rely on the UI’s spacing
Edge cases to mind: extensions, multiple numbers per record, and inconsistent country codes. Decide one canonical store (usually E.164) and keep a separate display property if your users must see local spacing. I’m inferring you’re on Enterprise with Workflows, correct me if not.
When teams sync CRMs and ops tools, they often keep both a canonical E.164 and a display-formatted field in the sync. A platform like Stacksync can keep those two properties in real time across systems so dialers get clean numbers while UIs stay human-friendly.
Hope this helps.
Did my answer help? Please mark it as a solution to help others find it too.
Ruben Burdin HubSpot Advisor Founder @ Stacksync Real-Time Data Sync between any CRM and Database
The validate on saving new phone numbers and the workflow to reformat the existing phone numbers: I tried both in a test environment. This works fine and the nubers are saved in standard format. That is excellent.
But I hoped, that there is a easier way to get a nice formatted number without coding it myself (also if most of the work is done by a library).
The idea of field duplication for a formatted phone number will work but if you have 3 to 4 numbers for contacts and companies, it will be al lot of overhead.
I think the best way will be, to apply the formatting in the export function / process with the library. The export process is our own routine, so we have total control over the code.
@baernhardj, I'd recommend that you share this feedback via the HubSpot Developer feedback form, so that it gets routed to the right Product Team and will get more visibility.
Thanks for your valuable feedback and have a lovely day!
Bérangère
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.