Retrieving yesterday's updated contact list from HubSpot

Hey everyone,

I’m trying to pull a list of contacts from HubSpot that were updated yesterday. I’ve been using the C# API, but I’m running into some issues.

Here’s what I’ve tried so far:

string apiUrl = $"https://api.hubapi.com/contacts/v1/lists/recently_updated/contacts/recent?hapikey={apiKey}&property=email&property=lifecyclestage&count=100&timeOffset={yesterdayTimestamp}";

var response = await client.GetAsync(apiUrl);
var content = await response.Content.ReadAsStringAsync();

The problem is, this keeps giving me contacts updated in the last 30 days instead of just yesterday. I’ve double-checked my timestamp calculation, but it’s not working as expected.

Has anyone else run into this? Any tips on how to narrow down the results to just yesterday’s updates? Thanks in advance for any help!

hey josephk, i’ve had similar issues. try using the ‘Filter by property’ endpoint instead. something like:

GET /crm/v3/objects/contacts/search

with a JSON body specifying the lastmodifieddate property range. that worked better for me when i needed specific date ranges. good luck!