APIs & Integrations

courtenaysfs
Participant

Updating a property via API is causing workflow to fail

SOLVE

Here's what I'm sending:

https://api.hubapi.com/contacts/v1/contact/email/<>/profile?hapikey=<>
With the following options:
{
headers: { Content-Type: "application/json" }
method: "post"
payload: "{"properties":[{"property":"anticipated_go_live_date","value":1540278000000}]}"
}

And here's the sample text of the error I'm getting:

The value to set the property to isn't valid and can't be set

Couldn't set "go_live_date_anticipated_" to "1544342400000" because "1544342400000" isn't a valid value

But as you can see, the value in the contact looks like a valid date:

Any idea what I'm doing wrong? Support suggested reaching out here.

0 Upvotes
1 Accepted solution
courtenaysfs
Solution
Participant

Updating a property via API is causing workflow to fail

SOLVE

Hi Harry, Try using UTC time format set to midnight of the date you need. Let me know how you get in with that suggestion.

This got me there. I was sending a time offset of my local timezone, and that was making it not a "midnight" time. Using the utc call fixed it!

View solution in original post

0 Upvotes
1 Reply 1
courtenaysfs
Solution
Participant

Updating a property via API is causing workflow to fail

SOLVE

Hi Harry, Try using UTC time format set to midnight of the date you need. Let me know how you get in with that suggestion.

This got me there. I was sending a time offset of my local timezone, and that was making it not a "midnight" time. Using the utc call fixed it!

0 Upvotes