Get deal activity through API

Hello! First of all, thank you for taking the time to check my question!

I’m trying to retrieve deal activities through the API, but I’m having trouble finding the correct endpoint.

Here’s an example of what I want to achieve, based on the demo screenshot below:

As you can see, on August 11th, the deal was moved from “Tomador de decisão” to “Negócio fechado.” Then, on August 13th, the same deal was moved from “Negócio fechado” to “Contrato enviado,” and so on.

I want to fetch this information via API so my team can perform some analysis.

I’ve tried the timeline API, but as far as I understand, it’s mainly for posting custom events, while I need to retrieve default events.

Could you please provide some guidance?

Best regards!

Hey, @LIntelligence :waving_hand: Thanks for your question. Looking at the available endpoints, there isn’t an exact match for what you are after. You might start with exploring what the Search API can do for you. Webhooks may be an option for you as well. There are cases where there is no fidelity between what is available in-app versus what we can query using the API.

Let’s ask some of our brilliant community members if they have any suggestions for you — hey @zach_threadint @Mike_Eastwood @TomM2, do you have any thoughts on how @LIntelligence might accomplish their goals?

Thank you very much! — Jaycee

Hey Jaycee! Thanks for your awnser!

I’ll try the Search API

Hi @LIntelligence :waving_hand:

For each Deal Stage in your HubSpot Portal, there are 4 Deal properties that may be of interest here:

  1. hs_date_entered_internalDealStageId

(hidden, i.e. accessible only via API)

  1. hs_v2_date_entered_internalDealStageId
  2. hs_date_exited_internalDealStageId

(hidden, i.e. accessible only via API)

  1. hs_v2_date_exited_internalDealStageId

These relate to the date when a given Deal most recently entered and exited a given Deal Stage. More information on the upcoming transition to the V2 properties can be found here.

As @Jaycee_Lewis mentions, depending on your use case, you may be interested in HubSpot’s “webhooks” feature set -- this would effectively allow you to “listen” for changes in any of those properties and take action accordingly.

I hope this proves helpful. Please let me know if you have any follow-up questions.

Thanks a lot Zach!

Your awnser was very helpful!