I would like to identify how long each lead has been in a specific stage (eg. discovery vs pre qualification and etc). Does HubSpot keep track of time spent at each stage?
Is there an endpoint to pull this information for each deal? I have been able to specify properties for a deal such as dealstage but the only information I have there is dealstage value and timestamp. Not sure what I am missing here. Any clarification would help.
We don’t have equivalent properties for deals for tracking deal stage transitions, but if you’re pulling the contacts through the API you can look at the version history of the properties to see the previous values, and the time those previous values were set. You’ll need to include the &includePropertyVersions=true parameter to get the full history.
GET /deals/v1/deal/:dealId - Returns an object representing the deal with the id :dealId associated with the specified portal.
If you’re looking for this for all of your deals, you can can use the &propertiesWithHistory=dealstage parameter with this endpoint to get the previous values of that property:
There is a set of contact properties labeled “Became a {lifecycle stage} Date” (with the internal names hs_lifecyclestage_{lifecycle stage}_date) that show the time that the lifecycle stage of a record was updated. You can use those properties to calculate the time between the lifecycle stage changes.