Getting Only New Customers via API


We are syncing the HS database with an offline database via the API. We are using the recently updated api. Which works ok - except:

1.) I cannot filter for just new customers. I need to get all customers with a recent createdate or lastmodifieddate.
2.) The problem with that is that the lastmodifieddate - as far as I can tell - updates under many circumstances. The most common one seems to be upon the receipt of an email. So in a given day there may be 80,000 to 100,000 total “updates” that I have to sort through to get any new customers.
3) We also with to identify anybody that’s modified their contact data - such as name or address,e tc. Is there a way to filter for customer-generated modifications as opposed to analytic stuff? Even if the email sent/delivered could be separated from this field.

I am trying as best as I can to not have to pull down tens of thousands of records…

I have seen some suggestions on doing this by creating a list. But I’d rather be able to use the customer object and API only if possible.

I guess any best practice recommendations here would help.


Hi @mcmillansp

If you’re just looking for new contact records, you can use the endpoint to find recently create records:

You would page through the responses from that endpoint just like you’re page through the recently updated endpoint:

If you’re looking for recently created and updated records, you’d need to use this endpoint:

There isn’t a way to filter the returned records based on what specifically updated, but you can use &propertyMode=value_and_history in the request URL to include the history of the properties, which will tell you when the properties were updated, and what made the update (so you could check for a property being updated by HubSpot’s EMAIL or ANALYTICS processing, or whether the update came from a FORM).

You may also want to take a look at using Webhooks, since that would allow you to subscribe to contact creation, as well as subscribing to property changes for specific properties, so you could subscribe to the specific properties that you’d actually care about.


Thanks. The recently created records endpoint works well. Question - does this return 30 days the same as recently updated?

Also - for webhook - we are sending data via webhook on form submission. I do not see a “contact created” event. Do I filter on “Became Customer” or “Became Lead”? I want to make sure I get all new contacts regardless of source (uploads, form submissions, manual submissions, etc.).


If you’re using webhooks in workflows, we don’t have a trigger for a contact being created, but you can have the workflow trigger based on the email property. If you use the criteria contact property email is known, any new contacts will trigger the workflow (since email is required to create a contact), just make sure you set the workflow settings so that the workflow can only be triggered once.