Get Contact API how to get contact recently modified only yesterday?



I am using API
with this i am receiving data of today and yesterday last modified data.
but i want only yesterday modified day in response. so how can i make it?


Hi @kishan,

The Get recently updated and created contacts endpoint cannot filter results in this way.

The endpoint returns all recently created or modified contacts in order, so you must then set up a filter on your back end for contacts whose addedAt timestamp lies between the range you want.

HubSpot uses UNIX-formatted timestamps in milliseconds, so you will have to calculate "yesterday" in the same format.

In JavaScript, returns the current epoch time in milliseconds. Since there are 86400000 in a day, you could use - 86400000 to calculate the timestamp 24 hours before the current time.


Thank you so much :slight_smile:


Happy to help, @kishan!