Get Recent Engagements API Endpoint

Hi,

I have a concern regarding the “Get recent engagements” endpoint documented here : Accounts Dashboard | HubSpot

There’s a note saying we are only able to fetch the records created in the last 30 days BUT we are trying to fetch the most recent engagements which does not make sense in this case. Would there be a better way of solving this?

Hi @aiwu , this endpoint returns Engagements created within the past 30 days, e.g. the most recent Engagements created in your HubSpot account. If you need more than just engagements that go back more than 30 days, you’ll need to use the Get All Engagements API and filter from there on your end.

Hi @cbarley But this is the endpoint to fetch the most recent engagements hence it should return the last updated Engagements first no ? Thank you. Just wanted some explanation behind the meaning of this endpoint.

Yes, this endpoint fetches the most recently updated engagements within the last 30 days. It should return you an order of newest engagements to oldest. I realized I said it fetches the most recently created engagements in my last reply, which was wrong. It returns recently updated engagements, which will include recently created ones, but will also include any ones you’d recently edited as well

I would assume that’s the expected behavior but on the API docs, it says this:
“Note: This endpoint will only return records created in the last 30 days, or the 10k most recently created records. If you need to get all of your engagements, please use this endpoint.”

Hence my confusion. So does it really only return the “last created” ones for an last updated api call?

Hmm, good point - let me test

Hi @aiwu, it looks like this endpoint will return all updated engagements. I made a GET call to my own account and was able to see that a Call activity was the second engagement returned to me:

I then updated that engagement in the UI. If the engagement was returned to me first, rather than second, we would know that this endpoint returns all updated engagements instead of just created ones.

I made the same request after updating that engagement and that endpoint returned the changed engagement first.

This endpoint will return all updated engagements. I will alter the documentation’s language

Thank you for the response @cbarley , that would make more sense like that.