# Not Blank the value while using batch API in Upsert

**URL:** <https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285>\
**Category:** CRM\
**Tags:** crm\
**Created:** [October 28, 2024, 5:32am UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285 "2024-10-28T05:32:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ketulpatel111](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@ketulpatel111](https://community.hubspot.com/u/ketulpatel111)\
**Post date:** [October 28, 2024, 5:32am UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/1 "2024-10-28T05:32:04Z")

</div>

Hi HubSpot Community,

I’m currently working with the HubSpot Batch API to Upsert contacts, but I’m facing an issue with keeping certain fields unchanged when sending an empty value in the payload.

Here’s the issue:

1. **First request:** When I send a request to update firstname with “Contact1”, it works as expected, and firstname is set to “Contact1”.

2. **Second request:** Later, if I send another Upsert request with an empty string (“”) for firstname, it doesn’t clear the existing value (i.e., “Contact1” remains). Instead, I’d like it to either clear or ignore this field, based on the scenario.

For Example:

First Request:

{ “inputs”: [{ “id”: “contact\_id\_123”, “properties”: { “firstname”: “Contact1” } }] }

Second Request:

{ “inputs”: [{ “id”: “contact\_id\_123”, “properties”: { “firstname”: “” } }] }

In this scenario, I would expect that sending an empty string should either:

- Clear the value in HubSpot if possible (resulting in an empty firstname).

- Or at least have an option to leave the current value unchanged.

Has anyone encountered this behavior or found a way to manage field values so that empty values can clear fields, or otherwise, avoid overwriting values?

Any tips or guidance would be greatly appreciated!

Thanks!

---

<div class="post-metadata">

**Author:** ![PamCotton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pamcotton/32/47916_2.png) [@PamCotton](https://community.hubspot.com/u/PamCotton)\
**Post date:** [October 28, 2024, 7:35pm UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/2 "2024-10-28T19:35:02Z")

</div>

Hey @ketulpatel111, thank you for posting in our Community!

With the HubSpot Batch API, sending an empty string for a field won’t clear the value or keep it unchanged by default—it simply ignores empty strings, so the existing value remains. Currently, there isn’t an out-of-the-box way to clear fields with an empty string.

To handle this, you could try:

- **Using null instead of an empty string** may clear the field.
- If you want to ignore the field, omit it from the payload entirely.

To our top experts @Anton and @TomM2 do you have any recommendations?

This behavior can be limiting, but let us know if these options help or if you need further assistance!

Kindly,

Pam

---

<div class="post-metadata">

**Author:** ![ketulpatel111](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@ketulpatel111](https://community.hubspot.com/u/ketulpatel111)\
**Post date:** [October 29, 2024, 5:38am UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/3 "2024-10-29T05:38:41Z")

</div>

@PamCotton i also apply null and “” but it still not worked..  
here is my palyload..

{

“properties”: {

“firstname”: “hubspot”,

“lastname”: “contact101”,

“email”: “[hubspotcontact101@test.com](mailto:hubspotcontact101@test.com)”,

“phone”: “4545545454545454545”,

“address”: null,

“city”: null,

“state”: “”,

“country”: null,

“zip”: null,

“website”: null,

}

}

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 15, 2024, 3:50pm UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/4 "2024-11-15T15:50:36Z")

</div>

Hey @ketulpatel111, I hope that you are well!  
For information, we have a new tool just for that, could you please share your feedback here: “[Developer Feedback Tool](https://developers.hubspot.com/feedback)”.  
Thanks a lot!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![PFeldmann](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@PFeldmann](https://community.hubspot.com/u/PFeldmann)\
**Post date:** [November 14, 2024, 1:59pm UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/5 "2024-11-14T13:59:33Z")

</div>

I’m having the same behaviour and can confirm both **null** or “” (empty string) doesn’t clear the value.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 15, 2024, 5:11pm UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/6 "2024-11-15T17:11:12Z")

</div>

Hi @ketulpatel111,  
Just to follow up on this, I have just heard from the Team and they are actually working on a fix for this, as we speak.  
Thanks for your patience and your valuable feedback!  
I’ll keep you updated on this.  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![PFeldmann](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@PFeldmann](https://community.hubspot.com/u/PFeldmann)\
**Post date:** [November 18, 2024, 1:16pm UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/7 "2024-11-18T13:16:31Z")

</div>

Hi BérangèreL  
I can confirm the fix works for us. I have tested it.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 18, 2024, 2:38pm UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/8 "2024-11-18T14:38:45Z")

</div>

Hi @PFeldmann, great to hear and thanks for getting back to me on this!  
I am delighted to know that all is working now!  
Have a great week!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 18, 2024, 10:59am UTC](https://community.hubspot.com/t/not-blank-the-value-while-using-batch-api-in-upsert/119285/9 "2024-11-18T10:59:10Z")

</div>

Hi @ketulpatel111 and @PFeldmann, thanks for your patience as the Team was looking into this!  
I am glad to share that this is now fixed!  
If you set up a property to **“”** , then it resets it for **upserts** as usual as for **updates.**  
_ **Just to let you know, please be aware of this:** _  
- Setting a property to **null** does nothing  
- Setting a property to **“”** is the only way to “reset” it  
I hope this helps!  
Have a lovely day and please let me know if there is anything else I can help with. I’ll be delighted to do so!  
Best,  
Bérangère
