# Cannot update properties with blank values on batch upsert request

**URL:** <https://community.hubspot.com/t/cannot-update-properties-with-blank-values-on-batch-upsert-request/114389>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [August 13, 2024, 1:58pm UTC](https://community.hubspot.com/t/cannot-update-properties-with-blank-values-on-batch-upsert-request/114389 "2024-08-13T13:58:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![almrdog](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@almrdog](https://community.hubspot.com/u/almrdog)\
**Post date:** [August 13, 2024, 1:58pm UTC](https://community.hubspot.com/t/cannot-update-properties-with-blank-values-on-batch-upsert-request/114389/1 "2024-08-13T13:58:43Z")

</div>

Hi everyone,  
I have been trying to nullify properties of custom objects via batch upsert request. I have tried this with a basic update request and this works as expected. However, when I have tried this with a batch upsert request the property is not successfully updated.  
Here is an example of a basic update request succesffully updating the property:  
**Request:**

curl --request PATCH \

--url [https://api.hubapi.com/crm/v3/objects/2-31908300/14507441252](https://api.hubapi.com/crm/v3/objects/2-31908300/14507441252) \

--header ‘authorization: Bearer YOUR\_ACCESS\_TOKEN’ \

--header ‘content-type: application/json’ \

--data '{

“properties”: {

```
"deleted\_at": ""

```

}

}’

**Response:**

HTTP 200

{

“id”: “14507441252”,

“properties”: {

```
"deleted\_at": "",

"hs\_createdate": "2024-08-13T09:47:36.607Z",

"hs\_lastmodifieddate": "2024-08-13T09:50:57.681Z",

"hs\_object\_id": "14507441252",

"hs\_object\_source": "INTEGRATION",

"hs\_object\_source\_id": "3559509",

"hs\_object\_source\_label": "INTEGRATION"

```

},

“createdAt”: “2024-08-13T09:47:36.607Z”,

“updatedAt”: “2024-08-13T09:50:57.681Z”,

“archived”: false

}

And here is an example of a batch update request unsuccessfully updating the property:  
**Request:**

curl --request POST \

--url [https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert](https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert) \

--header ‘authorization: Bearer YOUR\_ACCESS\_TOKEN’ \

--header ‘content-type: application/json’ \

--data '{

“inputs”: [

```
{

  "idProperty": "uuid",

  "id": "b755045b-ae0e-4ccb-a972-8cc5740f2bcc",

  "properties": {

    "delted\_at": ""

  }

}

```

]

}’

**Response:**

HTTP 200

{

“status”: “COMPLETE”,

“results”: [

```
{

  "id": "14507441243",

  "properties": {

    "hs\_createdate": "2024-08-13T09:47:36.607Z",

    "hs\_lastmodifieddate": "2024-08-13T09:47:37.347Z",

    "hs\_object\_id": "14507441243",

    "hs\_object\_source": "INTEGRATION",

    "hs\_object\_source\_id": "3559509",

    "hs\_object\_source\_label": "INTEGRATION"

  },

  "createdAt": "2024-08-13T09:47:36.607Z",

  "updatedAt": "2024-08-13T09:47:37.347Z",

  "archived": false

}

```

],

“startedAt”: “2024-08-13T09:52:49.284Z”,

“completedAt”: “2024-08-13T09:52:49.412Z”

}

As you can see, this fails to update the property, which I have checked on the website.  
How can I nullify blank properties via a batch upsert request?  
Thanks

---

<div class="post-metadata">

**Author:** ![HMir](https://avatars.discourse-cdn.com/v4/letter/h/dec6dc/32.png) [@HMir](https://community.hubspot.com/u/HMir)\
**Post date:** [August 13, 2024, 10:11pm UTC](https://community.hubspot.com/t/cannot-update-properties-with-blank-values-on-batch-upsert-request/114389/2 "2024-08-13T22:11:00Z")

</div>

> * * *
> 
> @almrdog wrote:
> 
> Hi everyone,  
> I have been trying to nullify properties of custom objects via batch upsert request. I have tried this with a basic update request and this works as expected. However, when I have tried this with a batch upsert request the property is not successfully updated.  
> Here is an example of a basic update request succesffully updating the property:  
> **Request:**
> 
> curl --request PATCH \
> 
> --url [https://api.hubapi.com/crm/v3/objects/2-31908300/14507441252](https://api.hubapi.com/crm/v3/objects/2-31908300/14507441252) \
> 
> --header ‘authorization: Bearer YOUR\_ACCESS\_TOKEN’ \
> 
> --header ‘content-type: application/json’ \
> 
> --data '{
> 
> “properties”: {
> 
> ```
> "deleted\_at": ""
> 
> ```
> 
> }
> 
> }’
> 
> **Response:**
> 
> HTTP 200
> 
> {
> 
> “id”: “14507441252”,
> 
> “properties”: {
> 
> ```
> "deleted\_at": "",
> 
> "hs\_createdate": "2024-08-13T09:47:36.607Z",
> 
> "hs\_lastmodifieddate": "2024-08-13T09:50:57.681Z",
> 
> "hs\_object\_id": "14507441252",
> 
> "hs\_object\_source": "INTEGRATION",
> 
> "hs\_object\_source\_id": "3559509",
> 
> "hs\_object\_source\_label": "INTEGRATION"
> 
> ```
> 
> },
> 
> “createdAt”: “2024-08-13T09:47:36.607Z”,
> 
> “updatedAt”: “2024-08-13T09:50:57.681Z”,
> 
> “archived”: false
> 
> }
> 
> And here is an example of a batch update request unsuccessfully updating the property:  
> **Request:**
> 
> curl --request POST \
> 
> --url [https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert](https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert) \
> 
> --header ‘authorization: Bearer YOUR\_ACCESS\_TOKEN’ \
> 
> --header ‘content-type: application/json’ \
> 
> --data '{
> 
> “inputs”: [
> 
> ```
> {
> 
> "idProperty": "uuid",
> 
> "id": "b755045b-ae0e-4ccb-a972-8cc5740f2bcc",
> 
> "properties": {
> 
> "delted\_at": ""
> 
> }
> 
> }
> 
> ```
> 
> ]
> 
> }’
> 
> **Response:**
> 
> HTTP 200
> 
> {
> 
> “status”: “COMPLETE”,
> 
> “results”: [
> 
> ```
> {
> 
> "id": "14507441243",
> 
> "properties": {
> 
> "hs\_createdate": "2024-08-13T09:47:36.607Z",
> 
> "hs\_lastmodifieddate": "2024-08-13T09:47:37.347Z",
> 
> "hs\_object\_id": "14507441243",
> 
> "hs\_object\_source": "INTEGRATION",
> 
> "hs\_object\_source\_id": "3559509",
> 
> "hs\_object\_source\_label": "INTEGRATION"
> 
> },
> 
> "createdAt": "2024-08-13T09:47:36.607Z",
> 
> "updatedAt": "2024-08-13T09:47:37.347Z",
> 
> "archived": false
> 
> }
> 
> ```
> 
> ],
> 
> “startedAt”: “2024-08-13T09:52:49.284Z”,
> 
> “completedAt”: “2024-08-13T09:52:49.412Z”
> 
> }
> 
> As you can see, this fails to update the property, which I have checked on the website.  
> How can I nullify blank properties via a batch upsert request?  
> Thanks
> 
> * * *

First, make sure that the property name is correct; a typo like “delted\_at” instead of “deleted\_at” could cause the update to fail. Additionally, rather than using an empty string (“”) to nullify the property, try setting the property to null in your batch request. This approach might better communicate to the API that you intend to clear the property’s value.

---

<div class="post-metadata">

**Author:** ![almrdog](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@almrdog](https://community.hubspot.com/u/almrdog)\
**Post date:** [August 21, 2024, 9:31am UTC](https://community.hubspot.com/t/cannot-update-properties-with-blank-values-on-batch-upsert-request/114389/3 "2024-08-21T09:31:12Z")

</div>

Hi HMir, did you receive my initial reply to your comment? I fixed the typo but the value still fails to be overwritten with a blank value…

---

<div class="post-metadata">

**Author:** ![almrdog](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@almrdog](https://community.hubspot.com/u/almrdog)\
**Post date:** [August 14, 2024, 8:30am UTC](https://community.hubspot.com/t/cannot-update-properties-with-blank-values-on-batch-upsert-request/114389/4 "2024-08-14T08:30:56Z")

</div>

Thanks for spotting the typo. However with this change and also changing the value to null, it still fails to clear the value as you can see in this new api request:

Request:

curl --request POST \

--url [https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert](https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert) \

--header ‘authorization: Bearer YOUR\_ACCESS\_TOKEN’ \

--header ‘content-type: application/json’ \

--data '{

“inputs”: [

{

“idProperty”: “uuid”,

“id”: “b755045b-ae0e-4ccb-a972-8cc5740f2bcc”,

“properties”: {

“deleted\_at”: null

}

}

]

}’

Response:

HTTP 200

{

“status”: “COMPLETE”,

“results”: [

{

“id”: “14507441243”,

“properties”: {

“deleted\_at”: “2024-08-08T15:55:21Z”,

“hs\_createdate”: “2024-08-13T09:47:36.607Z”,

“hs\_lastmodifieddate”: “2024-08-13T09:47:37.347Z”,

“hs\_object\_id”: “14507441243”,

“hs\_object\_source”: “INTEGRATION”,

“hs\_object\_source\_id”: “3559509”,

“hs\_object\_source\_label”: “INTEGRATION”

},

“createdAt”: “2024-08-13T09:47:36.607Z”,

“updatedAt”: “2024-08-13T09:47:37.347Z”,

“archived”: false

}

],

“startedAt”: “2024-08-14T08:27:18.496Z”,

“completedAt”: “2024-08-14T08:27:18.561Z”

}
