# Programmatically creating a currency-formatted custom property

**URL:** <https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [March 20, 2019, 11:45am UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592 "2019-03-20T11:45:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![metamatik](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/metamatik/32/15670_2.png) [@metamatik](https://community.hubspot.com/u/metamatik)\
**Post date:** [March 20, 2019, 11:45am UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592/1 "2019-03-20T11:45:52Z")

</div>

Hi folks,

I am currently in the process of migrating my current client from another CRM product to HubSpot. This implies migrating some source data into custom properties, which I would like to be able to create programmatically for a fully automatic and repeatable process.

I have been able to develop a working solution using the [Company Properties API](https://developers.hubspot.com/docs/methods/companies/create_company_property), but one detail remains: is it possible to programmatically set a property to be displayed as currency, just like when one checks the relevant checkbox in the UI?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 20, 2019, 6:57pm UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592/2 "2019-03-20T18:57:17Z")

</div>

Hi, @metamatik.

This is certainly possible!

I just [created a new custom contact property](https://developers.hubspot.com/docs/methods/contacts/v2/create_contacts_property) with the _Currency_ box checked with the following payload:

```auto
{
 "name": "test_currency_property",
 "label": "Test Currency Property",
 "description": "A test currency property created via the Contact Properties API.",
 "groupName": "contactinformation",
 "type": "number",
 "fieldType": "number",
 "formField": true,
 "displayOrder": 6,
 "displayMode":"current_value",
 "showCurrencySymbol":true
}

```

Note the parameters `"displayMode":"current_value"` and `"showCurrencySymbol":true`.

---

<div class="post-metadata">

**Author:** ![metamatik](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/metamatik/32/15670_2.png) [@metamatik](https://community.hubspot.com/u/metamatik)\
**Post date:** [March 21, 2019, 9:43am UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592/3 "2019-03-21T09:43:29Z")

</div>

Thank you very much Isaac!

As I was unable to find guidance in the documentation, I had fiddled around a bit and tried to add

showCurrencySymbol

to the payload, but it hadn’t worked. Also adding

displayMode

was the trick 🙂

As an aside, is my assessment correct that these parameters are not documented at the moment? Not looking to blame anyone here, but if they are I’d be interested in the relevant URL since I might need to use more in the near future ^^

(also, meta-annoyance: the rich text editor here is preventing me from using

\<code\>

tags in my reply to you :p)

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 26, 2019, 1:03pm UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592/4 "2019-03-26T13:03:08Z")

</div>

Apologies for the delayed response, @metamatik.

Glad I could help!

You are absolutely correct that this isn’t currently documented; thanks for bringing this to our attention. I’ve shared feedback with the team which manages the docs.

I actually found the solution by creating a currency property in the UI and then retreiving its meta data with the [_Get a contact property_](https://developers.hubspot.com/docs/methods/companies/get_contact_property) endpoint. I then created a new currency property with [this endpoint](https://developers.hubspot.com/docs/methods/contacts/v2/create_contacts_property)  
 ![16x16_smiley-very-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a83ec960612094a57cfb392e21c202c8e77b967c.png)  
.

---

<div class="post-metadata">

**Author:** ![abdurrakib136](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/abdurrakib136/32/30191_2.png) [@abdurrakib136](https://community.hubspot.com/u/abdurrakib136)\
**Post date:** [December 27, 2019, 1:06pm UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592/5 "2019-12-27T13:06:45Z")

</div>

Hi, I have created a custom contact property but I can not understand where I need to put it and how can I call them or what process I need to do to add created JSON property on Hubspot contact property. Thanks

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [December 31, 2019, 3:41pm UTC](https://community.hubspot.com/t/programmatically-creating-a-currency-formatted-custom-property/13592/6 "2019-12-31T15:41:54Z")

</div>

Hi, @abdurrakib136.

Are you also trying to create a custom contact property which reflects currency?

It sounds like you’ve already created a custom contact property, perhaps in the UI, but are having trouble updating it via the Contact Properties API. Is that accurate?  
If so, could you share a few details of what you have done so far and where you are getting stuck? Please share your Hub ID and the custom property’s internal name to start.
