Backfilling custom events


We’re updating our lead scoring algorithm and would like to include important actions users take inside our app. We were looking at the custom events API and it looks like it will fit the bill.

The only trouble is we’d like to backfill contacts with actions they’ve previously taken, in order to ensure that actions users took in the past aren’t lost. Those actions might be important in our lead score, for example.

Is there anyway to send a timestamp along with an event so that it appears like it happened in the past?



Hi @dshorowitz

We don’t currently have a way to backdate events, so any events that are sent to HubSpot will always count at the time the event was actually triggered.

Backdating would be supported for Timeline Events, which could also be used for lead scoring:


Thanks! Would be nice to be able to send a timestamp along with the event :slight_smile:

Is there documentation describing how to use Timeline Events in both lead scoring and workflows? I don’t see it in the UI/UX (unless I’m missing something…)


The filters would work for properties set for an event, and the specific filters you’d get would be similar to the filters you’d get for contact properties of the same time.

You’ll only see the event type listed if you’ve installed an app that has event types, but once you do you’ll see the event listed at the bottom of the options.


That’s really great, thanks.

One last question. The Timeline API authentication system seems like it’s based around the concept of developing a custom app that connects to Hubspot (i.e., based on oauth). Our use case isn’t really an app … we just want to be able to fire off API calls based on certain actions the user takes.

Is Timeline API still the recommended approach?


You would need to create an app in HubSpot for this, since the timeline events get set up as part of the app, and you’d also need to use OAuth to create events after authorizing that app.

Apps don’t automatically get listed in any directory though, so it’s more than possible to create an app that you just use for your own integration.



I am migrating a customer from Pardot to HubSpot, and they want to import all of the past event activity from Pardot. I assume I can use the Timeline API for that as well, if I just create custom events like PardotClick, PardotOpen, PardotView for historical email and landing page activities?

Sounds like the main issue is that the time stamp will be the current time, not the historical time, correct?



@kjproteus you can set the timestamp of the event to set the time that the event should appear in the timeline, details for that timestamp are here.

If you’re going to be creating a large number of events, I’d recommend using the batch API:


I’ve got a similar objective as kjproteus. I think I’m using the timestamp as described in the documentation, and the timestamp is being recognized, but the events are still created with the timestamp of the api call rather than the timestamp I’m providing.

curl -X PUT
-H 'authorization: Bearer REDACTED
-H ‘content-type: application/json’
-d ‘{
“date_text”:“March 14, 2017 9:22:38 AM PDT”,

The result on the timeline is still this: