APIs & Integrations

Not applicable

How to unset a property

SOLVE

We’d like to remove a property from a deal.
eg we have created prop_1 = 0 under deal 1.
we would like this prop to no longer show up under that deal.
(this prop should still be available for other deals where it applies)
we’ve tried setting it to null, however it still shows up.
we’ve also tried deleting the property and re-adding it,
however that does nothing (the prop is not deleted under the deal if you remove the property)
any insights appreciated

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

How to unset a property

SOLVE

Welcome, @jrummell-elite!

Yes, this is still the case.

You can clear date and datetime-type properties by passing a blank string: "". I just tested and confirmed in my own account:

POST https://api.hubapi.com/contacts/v1/contact/vid/123/profile

{
  "properties": [
    {
      "property": "custom_date_picker",
      "value": ""
    }
  ]
}

Isaac Takushi

Associate Certification Manager

View solution in original post

6 Replies 6
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

How to unset a property

SOLVE

Welcome, @jrummell-elite!

Yes, this is still the case.

You can clear date and datetime-type properties by passing a blank string: "". I just tested and confirmed in my own account:

POST https://api.hubapi.com/contacts/v1/contact/vid/123/profile

{
  "properties": [
    {
      "property": "custom_date_picker",
      "value": ""
    }
  ]
}

Isaac Takushi

Associate Certification Manager
OVYA
Member

How to unset a property

SOLVE

Hi,

 

It's not a reliable solution because making a property to an empty string make this property as a know value (empty value) not an uncknow value (null value).

To my expericne it is not possible to set a property as uncknow with the api and outside a workflow…

Let me know if I'm wrong.
Regards.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

How to unset a property

SOLVE

Hi @laruellef,

Deleting the property will immediately make the property inaccessible via the HubSpot UI or API. Outside of that, the property values on the object will remain indefinitely (unless the object is deleted or the portal is purged).

0 Upvotes
Not applicable

How to unset a property

SOLVE

Is this still the case? I'm working on an API integration and need to fix a handful of property values on thousands of deals. Ideally, we'd like to unset them. For string properties I could try " " or "n/a", but what about date properties?

0 Upvotes
Not applicable

How to unset a property

SOLVE

ok, tks Derek,
if I delete the property alltogether,
will it ever be removed from the object?
if so, when?

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

How to unset a property

SOLVE

Hi @laruellef,

You can set the property value to a blank string ("") to clear out any value in that property. However once a property is given a value for a particular record, that property will continue to appear in the object even if the value is cleared (i.e. set to "").

0 Upvotes