Date Time property for contacts

Hello All,

I am trying to create a field in Hubspot which would have a option to select a date and time. ( not the current time but a option to select a time).

Using this i get a 404 error .

Accounts Dashboard | HubSpot

Checked with google bard and it says the API has changed to V4.

How do i get this done?

Hey @JJoshi8,

The instructions in that video should still work. If you are getting a 404 error i’d double check to make sure your endpoint is correctly formatted. It should be:

https://api.hubapi.com/crm/v3/properties/contact

If you omit the last part where it says “contact” it’ll throw a 404 as it doens’t know what object you are creating the object against. To confirm that video was still working I ran through the exact same steps and the output can be seen below - a datetime property on the contact object:

An important thing to note is that even when you successfully get this working the HubSpot UI won’t actually show you the time nor will it let your users choose a time when inputting a value. It’s primarily used for integrations syncing data or for setting within a worklfow or calculated properties. What I mean by that is if I view the contact I’ll see:

Screenshot 2023-07-24 at 13.56.55.png

If I try to update the value within the UI I will see:

However if I was to run an API call to update the property with the below:

{
 "properties": {
 "date_time_property": "2023-07-24T13:50:06.678Z"
 }
}

I’d get a 200 ok and if I were to pull that same property I’d get:

{
 "id": "101",
 "properties": {
 "createdate": "2023-07-20T16:28:37.941Z",
 "date_time_property": "2023-07-24T13:50:06.678Z",
 "hs_object_id": "101",
 "lastmodifieddate": "2023-07-24T12:52:10.486Z"
 },
 "createdAt": "2023-07-20T16:28:37.941Z",
 "updatedAt": "2023-07-24T12:52:10.486Z",
 "archived": false
}

@coldrickjack Thank you for your prompt response.

Is there any way i can achive to add a property for the person to select a date and time? as based on that i need to further set another automation to create a calender event on the date/time selected.

many thanks for your help.

regards,

Jignesh

Hey @JJoshi8,

Unfortunately not I’m afraid! As mentioned it’s primarily used for integrations syncing data or for setting within a worklfow or calculated properties.