Get Calls Count By Owner Id


#1

I am using Klipfolio to create a report which shows number of calls made by owner in last 30 days, klipfolio allows only single call and that said my API call should be as specific as it can.

I have went through engagement api which does not give me exact answers.

Though I have found an api call your portal is doing to fetch the exact value whose resource is this https://api.hubspot.com/contacts/search/v1/report/engagements?portalId=xxxx&clienttimeout=10000

POST request to above endpoint gives the exact data as I want, though the same is not found in your API documentation when I am sending the request from my REST client to above endpoint its not working can you send me the documentation of this api call so that I can send correct request https://api.hubspot.com/contacts/search/v1/report/engagements?portalId=xxxx&clienttimeout=10000

I am looking forward to to receive values from single API call.

  1. I thought this API resource can also help /engagements/v1/engagements/associated/:objectType/:objectId/paged

But I need the engagement based on owner id. Does owner id also have contact id as well? If yes can you point out to the correct API resource.

Specific help to pull calls for owners will be appreciated as I already have generic knowledge of your API.

Please let me know.


#3

Hi Guarav,

I would strongly discourage attempting to use the undocumented API you've highlighted in this article, as it's likely to change.

There's presently no documented API that you can use to pull in engagement data per owner using one single API call. You will have to do it with 2.

  1. https://developers.hubspot.com/docs/methods/engagements/get-all-engagements
  • After getting your data, you will need to filter your engagements by the ownerID key.
  1. use https://developers.hubspot.com/docs/methods/owners/get_owners to pull all the IDs within your portal for your owners, and match said IDs with the owner IDs in your first GET request.