# Update companies V3

**URL:** <https://community.hubspot.com/t/update-companies-v3/42971>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [August 26, 2021, 7:26pm UTC](https://community.hubspot.com/t/update-companies-v3/42971 "2021-08-26T19:26:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CRedmon](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/credmon/32/44934_2.png) [@CRedmon](https://community.hubspot.com/u/CRedmon)\
**Post date:** [August 26, 2021, 7:26pm UTC](https://community.hubspot.com/t/update-companies-v3/42971/1 "2021-08-26T19:26:39Z")

</div>

Hello,

I have recently noticed that when you try to update a “single line text” property with “null”, it will not clear the property. Is this intended? Currently the way to reset the property would be doing the following:

```lia-code-sample
{
 "properties": {
 "subscription": ""
 }
}

```

Example:

Url: [https://api.hubapi.com/crm/v3/objects/companies/xxx?hapikey=xxx](https://api.hubapi.com/crm/v3/objects/companies/xxx?hapikey=xxx)

Payload:

```lia-code-sample
{
 "properties": {
 "subscription": null
 }
}

```

Expected: The property “subscription” is set to an empty property

---

<div class="post-metadata">

**Author:** ![FelipeFelix](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/felipefelix/32/57767_2.png) [@FelipeFelix](https://community.hubspot.com/u/FelipeFelix)\
**Post date:** [August 27, 2021, 5:46am UTC](https://community.hubspot.com/t/update-companies-v3/42971/2 "2021-08-27T05:46:48Z")

</div>

Hi @CRedmon!  
Yes, that is exactly how HubSpot’s API works. When you want to clear some property you should define as a blank value, like this: “”

Best,  
[Felipe Felix](https://www.linkedin.com/in/felipefelixbraga/)

---

<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:** [August 27, 2021, 8:28am UTC](https://community.hubspot.com/t/update-companies-v3/42971/3 "2021-08-27T08:28:19Z")

</div>

Hi @CRedmon ,  
You can use below code for update empty property :  
$data = ‘{  
“properties”: {  
“subscription”: “”  
}  
}’;  
$ch = curl\_init();  
curl\_setopt($ch, CURLOPT\_URL, ‘[https://api.hubapi.com/crm/v3/objects/companies/?hapikey=YOUR\_HUBSPOT\_API\_KEY](https://api.hubapi.com/crm/v3/objects/companies/?hapikey=YOUR_HUBSPOT_API_KEY)’);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, 1);  
curl\_setopt($ch, CURLOPT\_CUSTOMREQUEST, ‘PATCH’);  
curl\_setopt($ch, CURLOPT\_POSTFIELDS, $data);  
$headers = array();  
$headers[] = ‘Content-Type: application/json’;  
curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers);  
$result = curl\_exec($ch);  
if (curl\_errno($ch)) {  
echo ‘Error:’ . curl\_error($ch);  
}  
curl\_close($ch);

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.
