# UpdateCompany does not recognize token 'properties'

**URL:** <https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [May 25, 2018, 5:53pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025 "2018-05-25T17:53:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [May 25, 2018, 5:53pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/1 "2018-05-25T17:53:40Z")

</div>

Making a request to the update company endpoint with the following payload  
`{'properties': [{'name': 'entity_id', 'value': '5b084b26d5ff2a48c901984f'}]}`  
Results in the following message returned

`{ "status":"error", "message":"Invalid input JSON on line 1, column 12: Unrecognized token \'properties\': was expecting (\'true\', \'false\' or \'null\')","correlationId":"redacted","requestId":"redacted" }`

Please respond promptly, this project is time sensitive.

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [May 31, 2018, 2:27pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/2 "2018-05-31T14:27:02Z")

</div>

Hi [@sbeller](https://community.hubspot.com/u/sbeller),

I’m wondering if the issue has to do with the use of single quotes? Is it possible they’re being escaped somehow, malforming the request? Can you try changing the request JSON to use double quotes? If that doesn’t solve the issue, can you give me the details of the request you’re making (full URL, headers, etc.) and your Hub ID so that I can dig in more?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 15, 2018, 6:36pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/3 "2018-09-15T18:36:37Z")

</div>

Hey [@Derek\_Gervais](https://community.hubspot.com/u/derek_gervais) I am having the same issue on updating contacts with vid: `https://api.hubapi.com/contacts/v1/contact/vid/:vid/profile`

here is my response: `{'message': "Invalid JSON input: Unrecognized token 'properties': was expecting ('true', 'false' or 'null') at line 1, column 12", 'status': 'error', 'requestId': '86139ed372f9a29085952360276681b3', 'correlationId': 'a7e39a50-2c42-4adf-a822-e787268329e0'}`

and here is my body: `{'properties': [{'value': 'some@email.com', 'property': 'email'}]}`

could you please help me navigate this? (the single quote is how python represents objects, the library takes care of jsonifying, and other requests work correctly with single quotes)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 17, 2018, 11:53am UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/4 "2018-09-17T11:53:09Z")

</div>

I happen to be coming back around to this after working around this originally. I’m now blocked on this endpoint.

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [September 21, 2018, 8:11pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/5 "2018-09-21T20:11:46Z")

</div>

Hi [@plumSemPy](https://community.hubspot.com/u/plumsempy) & [@sbeller](https://community.hubspot.com/u/sbeller),

It’s tough to say without knowing exactly how the JSON libraries you’re using are working, but it seems like it’s unsuccessfully parsing the object body into proper JSON. The JSON body must use double quotes, so if for whatever reason the library you’re using isn’t properly updating the request body that would explain it.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 10, 2018, 12:27pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/6 "2018-10-10T12:27:11Z")

</div>

[@Derek\_Gervais](https://community.hubspot.com/u/derek_gervais)

Here’s a more well-formatted example request

```auto
PUT /companies/v2/companies/966428687?hapikey=[redacted] HTTP/1.1

Host: api.hubapi.com

Connection: keep-alive

Accept-Encoding: gzip, deflate

Accept: */*

User-Agent: python-requests/2.19.1

Content-Type: application/json

Content-Length: 32

properties=name&properties=value

```

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 10, 2018, 1:00pm UTC](https://community.hubspot.com/t/updatecompany-does-not-recognize-token-properties/12025/7 "2018-10-10T13:00:20Z")

</div>

The problem is that the python requests library is not automatically json formatting data. A call to json.dumps(data) fixes this
