# Python API: unable to update properties with spaces in them

**URL:** <https://community.hubspot.com/t/python-api-unable-to-update-properties-with-spaces-in-them/36572>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [May 1, 2021, 12:25am UTC](https://community.hubspot.com/t/python-api-unable-to-update-properties-with-spaces-in-them/36572 "2021-05-01T00:25:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RSmithson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rsmithson/32/25270_2.png) [@RSmithson](https://community.hubspot.com/u/RSmithson)\
**Post date:** [May 1, 2021, 12:25am UTC](https://community.hubspot.com/t/python-api-unable-to-update-properties-with-spaces-in-them/36572/1 "2021-05-01T00:25:58Z")

</div>

Hi,

I’m using the Hubspot Python API with an API key (as I don’t intend on publishing anything, just using our own data).

Whenever I try and create a contact using property names that have spaces in them, I get errors.

See:

HTTP response body: {“status”:“error”,“message”:“Property values were not valid: [{\“isValid\”:false,\“message\”:\“Property \\\“postal code\\\” does not exist\”,\“error\”:\“PROPERTY\_DOESNT\_EXIST\”,\“name\”:\“postal code\”},{\“isValid\”:false,\“message\”:\“Property \\\“phone number\\\” does not exist\”,\“error\”:\“PROPERTY\_DOESNT\_EXIST\”,\“name\”:\“phone number\”},{\“isValid\”:false,\“message\”:\“Property \\\“last name\\\” does not exist\”,\“error\”:\“PROPERTY\_DOESNT\_EXIST\”,\“name\”:\“last name\”},{\“isValid\”:false,\“message\”:\“Property \\\“first name\\\” does not exist\”,\“error\”:\“PROPERTY\_DOESNT\_EXIST\”,\“name\”:\“first name\”},{\“isValid\”:false,\“message\”:\“Property \\\“street address\\\” does not exist\”,\“error\”:\“PROPERTY\_DOESNT\_EXIST\”,\“name\”:\“street address\”},{\“isValid\”:false,\“message\”:\“Property \\\“date of birth\\\” does not exist\”,\“error\”:\“PROPERTY\_DOESNT\_EXIST\”,\“name\”:\“date of birth\”}]”,“correlationId”:“55d36eae-0552-4dc8-bf4b-c25d476160f3”,“category”:“VALIDATION\_ERROR”}

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 3, 2021, 5:40pm UTC](https://community.hubspot.com/t/python-api-unable-to-update-properties-with-spaces-in-them/36572/2 "2021-05-03T17:40:06Z")

</div>

Hey @RSmithson

The property name cannot have spaces. The property label can. Looks like you are trying to use the label rather than the name

2 ways to get the property name

1: Do a GET request to this endpoint where objectType would be contacts in this case -- **[https://api.hubapi.com/crm/v3/properties/objectType?archived=false&hapikey=YOUR\_HUBSPOT\_API\_KEY](https://api.hubapi.com/crm/v3/properties/objectType?archived=false&hapikey=YOUR_HUBSPOT_API_KEY)**. This will print out all propertis for your object. Search for your specific property and locate the **name**

2: You can log into your portal and look at all of the properties in the settings. [Here](https://knowledge.hubspot.com/crm-setup/manage-your-properties) is a kb on getting there. See screengrab for location of the property name once you are there

 ![41940i715AB3ACC93D382B.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/9/e90cd580a03e578463463106f5f01d14fbc8ab4a.png)

Hope this helps!
